Searched refs:rand_port (Results 1 – 3 of 3) sorted by relevance
| /xnu-8019.80.24/bsd/skywalk/namespace/ |
| H A D | netns.c | 285 in_port_t rand_port; in netns_ns_alloc() local 302 rand_port = first; in netns_ns_alloc() 304 read_frandom(&rand_port, sizeof(rand_port)); in netns_ns_alloc() 307 rand_port = last + (rand_port % (first - last)); in netns_ns_alloc() 309 rand_port = first + (rand_port % (last - first)); in netns_ns_alloc() 312 namespace->ns_last_ephemeral_port_down = rand_port; in netns_ns_alloc() 313 namespace->ns_last_ephemeral_port_up = rand_port; in netns_ns_alloc() 1298 in_port_t rand_port; in netns_reserve_ephemeral() local 1345 rand_port = first; in netns_reserve_ephemeral() 1349 read_frandom(&rand_port, sizeof(rand_port)); in netns_reserve_ephemeral() [all …]
|
| /xnu-8019.80.24/bsd/netinet6/ |
| H A D | in6_src.c | 1549 uint16_t lport = 0, first, last, *lastport, rand_port; in in6_pcbsetport() local 1626 read_frandom(&rand_port, sizeof(rand_port)); in in6_pcbsetport() 1627 *lastport = first - (rand_port % (first - last)); in in6_pcbsetport() 1634 read_frandom(&rand_port, sizeof(rand_port)); in in6_pcbsetport() 1635 *lastport = first + (rand_port % (first - last)); in in6_pcbsetport()
|
| /xnu-8019.80.24/bsd/netinet/ |
| H A D | in_pcb.c | 750 u_short lport = 0, rand_port = 0; in in_pcbbind() local 1063 read_frandom(&rand_port, sizeof(rand_port)); in in_pcbbind() 1065 first - (rand_port % (first - last)); in in_pcbbind() 1124 read_frandom(&rand_port, sizeof(rand_port)); in in_pcbbind() 1126 first + (rand_port % (first - last)); in in_pcbbind()
|