Lines Matching refs:snum
230 int udp_lib_get_port(struct sock *sk, unsigned short snum, in udp_lib_get_port() argument
238 if (!snum) { in udp_lib_get_port()
258 udp_lib_lport_inuse(net, snum, hslot, bitmap, sk, in udp_lib_get_port()
261 snum = first; in udp_lib_get_port()
268 if (low <= snum && snum <= high && in udp_lib_get_port()
269 !test_bit(snum >> udptable->log, bitmap) && in udp_lib_get_port()
270 !inet_is_local_reserved_port(net, snum)) in udp_lib_get_port()
272 snum += rand; in udp_lib_get_port()
273 } while (snum != first); in udp_lib_get_port()
279 hslot = udp_hashslot(udptable, net, snum); in udp_lib_get_port()
283 unsigned int slot2 = udp_sk(sk)->udp_portaddr_hash ^ snum; in udp_lib_get_port()
292 exist = udp_lib_lport_inuse2(net, snum, hslot2, sk); in udp_lib_get_port()
295 exist = udp_lib_lport_inuse2(net, snum, hslot2, in udp_lib_get_port()
304 if (udp_lib_lport_inuse(net, snum, hslot, NULL, sk, 0)) in udp_lib_get_port()
308 inet_sk(sk)->inet_num = snum; in udp_lib_get_port()
309 udp_sk(sk)->udp_port_hash = snum; in udp_lib_get_port()
310 udp_sk(sk)->udp_portaddr_hash ^= snum; in udp_lib_get_port()
316 udp_sk(sk)->udp_portaddr_hash ^= snum; in udp_lib_get_port()
345 int udp_v4_get_port(struct sock *sk, unsigned short snum) in udp_v4_get_port() argument
348 ipv4_portaddr_hash(sock_net(sk), htonl(INADDR_ANY), snum); in udp_v4_get_port()
354 return udp_lib_get_port(sk, snum, hash2_nulladdr); in udp_v4_get_port()