Lines Matching refs:snum
226 int udp_lib_get_port(struct sock *sk, unsigned short snum, in udp_lib_get_port() argument
234 if (!snum) { in udp_lib_get_port()
254 udp_lib_lport_inuse(net, snum, hslot, bitmap, sk, in udp_lib_get_port()
257 snum = first; in udp_lib_get_port()
264 if (low <= snum && snum <= high && in udp_lib_get_port()
265 !test_bit(snum >> udptable->log, bitmap) && in udp_lib_get_port()
266 !inet_is_local_reserved_port(net, snum)) in udp_lib_get_port()
268 snum += rand; in udp_lib_get_port()
269 } while (snum != first); in udp_lib_get_port()
275 hslot = udp_hashslot(udptable, net, snum); in udp_lib_get_port()
279 unsigned int slot2 = udp_sk(sk)->udp_portaddr_hash ^ snum; in udp_lib_get_port()
288 exist = udp_lib_lport_inuse2(net, snum, hslot2, sk); in udp_lib_get_port()
291 exist = udp_lib_lport_inuse2(net, snum, hslot2, in udp_lib_get_port()
300 if (udp_lib_lport_inuse(net, snum, hslot, NULL, sk, 0)) in udp_lib_get_port()
304 inet_sk(sk)->inet_num = snum; in udp_lib_get_port()
305 udp_sk(sk)->udp_port_hash = snum; in udp_lib_get_port()
306 udp_sk(sk)->udp_portaddr_hash ^= snum; in udp_lib_get_port()
312 udp_sk(sk)->udp_portaddr_hash ^= snum; in udp_lib_get_port()
341 int udp_v4_get_port(struct sock *sk, unsigned short snum) in udp_v4_get_port() argument
344 ipv4_portaddr_hash(sock_net(sk), htonl(INADDR_ANY), snum); in udp_v4_get_port()
350 return udp_lib_get_port(sk, snum, hash2_nulladdr); in udp_v4_get_port()