Lines Matching refs:port

62  * Allocate and initialize a new local port bind bucket.
76 tb->port = snum;
97 unsigned short port, int l3mdev)
99 return net_eq(ib_net(tb), net) && tb->port == port &&
106 unsigned short port, int l3mdev,
111 tb->port = port;
127 unsigned short port,
134 inet_bind2_bucket_init(tb, net, head, port, l3mdev, sk);
169 struct inet_bind2_bucket *tb2, unsigned short port)
171 inet_sk(sk)->inet_num = port;
179 * Get rid of any references to a local port held by the given sock.
224 unsigned short port = inet_sk(child)->inet_num;
233 bhash = inet_bhashfn(net, port, table->bhash_size);
235 head2 = inet_bhashfn_portaddr(table, child, net, port);
246 if (tb->port != port) {
250 * on a different listener port breaks the assumption
255 if (inet_bind_bucket_match(tb, net, port, l3mdev))
260 net, head, port, l3mdev);
275 tb2 = inet_bind2_bucket_find(head2, net, port, l3mdev, child);
278 net, head2, port,
286 inet_bind_hash(child, tb, tb2, port);
349 * @sport: source port.
351 * @hnum: destination port in host byte order.
377 * does not allow a listening sock to specify the remote port nor the
821 const struct net *net, unsigned short port,
824 if (!net_eq(ib2_net(tb), net) || tb->port != port ||
832 unsigned short port, int l3mdev, const struct sock *sk)
834 if (!net_eq(ib2_net(tb), net) || tb->port != port ||
856 unsigned short port, int l3mdev, const struct sock *sk)
861 if (inet_bind2_bucket_match(bhash2, net, port, l3mdev, sk))
868 inet_bhash2_addr_any_hashbucket(const struct sock *sk, const struct net *net, int port)
875 hash = ipv6_portaddr_hash(net, &in6addr_any, port);
878 hash = ipv4_portaddr_hash(net, 0, port);
902 int port = inet_sk(sk)->inet_num;
923 /* The (INADDR_ANY, port) bucket might have already
935 bhash = inet_bhashfn(net, port, hinfo->bhash_size);
937 head2 = inet_bhashfn_portaddr(hinfo, sk, net, port);
954 head2 = inet_bhashfn_portaddr(hinfo, sk, net, port);
957 tb2 = inet_bind2_bucket_find(head2, net, port, l3mdev, sk);
960 inet_bind2_bucket_init(tb2, net, head2, port, l3mdev, sk);
1008 int port = inet_sk(sk)->inet_num;
1018 if (port) {
1020 ret = check_established(death_row, sk, port, NULL);
1045 port = low + offset;
1046 for (i = 0; i < remaining; i += 2, port += 2) {
1047 if (unlikely(port >= high))
1048 port -= remaining;
1049 if (inet_is_local_reserved_port(net, port))
1051 head = &hinfo->bhash[inet_bhashfn(net, port,
1059 if (inet_bind_bucket_match(tb, net, port, l3mdev)) {
1065 port, &tw))
1072 net, head, port, l3mdev);
1096 head2 = inet_bhashfn_portaddr(hinfo, sk, net, port);
1099 tb2 = inet_bind2_bucket_find(head2, net, port, l3mdev, sk);
1102 head2, port, l3mdev, sk);
1108 * port that will be chosen. We use a max() with a random here so that
1116 inet_bind_hash(sk, tb, tb2, port);
1119 inet_sk(sk)->inet_sport = htons(port);
1165 * Bind a port for a connect operation and hash it.