Lines Matching refs:snum
232 int udp_lib_get_port(struct sock *sk, unsigned short snum, in udp_lib_get_port() argument
240 if (!snum) { in udp_lib_get_port()
260 udp_lib_lport_inuse(net, snum, hslot, bitmap, sk, in udp_lib_get_port()
263 snum = first; in udp_lib_get_port()
270 if (low <= snum && snum <= high && in udp_lib_get_port()
271 !test_bit(snum >> udptable->log, bitmap) && in udp_lib_get_port()
272 !inet_is_local_reserved_port(net, snum)) in udp_lib_get_port()
274 snum += rand; in udp_lib_get_port()
275 } while (snum != first); in udp_lib_get_port()
281 hslot = udp_hashslot(udptable, net, snum); in udp_lib_get_port()
285 unsigned int slot2 = udp_sk(sk)->udp_portaddr_hash ^ snum; in udp_lib_get_port()
294 exist = udp_lib_lport_inuse2(net, snum, hslot2, sk); in udp_lib_get_port()
297 exist = udp_lib_lport_inuse2(net, snum, hslot2, in udp_lib_get_port()
306 if (udp_lib_lport_inuse(net, snum, hslot, NULL, sk, 0)) in udp_lib_get_port()
310 inet_sk(sk)->inet_num = snum; in udp_lib_get_port()
311 udp_sk(sk)->udp_port_hash = snum; in udp_lib_get_port()
312 udp_sk(sk)->udp_portaddr_hash ^= snum; in udp_lib_get_port()
318 udp_sk(sk)->udp_portaddr_hash ^= snum; in udp_lib_get_port()
347 int udp_v4_get_port(struct sock *sk, unsigned short snum) in udp_v4_get_port() argument
350 ipv4_portaddr_hash(sock_net(sk), htonl(INADDR_ANY), snum); in udp_v4_get_port()
356 return udp_lib_get_port(sk, snum, hash2_nulladdr); in udp_v4_get_port()