Searched refs:rand_port (Results 1 – 3 of 3) sorted by relevance
| /xnu-8792.41.9/bsd/skywalk/namespace/ |
| H A D | netns.c | 284 in_port_t rand_port; in netns_ns_alloc() local 301 rand_port = first; in netns_ns_alloc() 303 read_frandom(&rand_port, sizeof(rand_port)); in netns_ns_alloc() 306 rand_port = last + (rand_port % (first - last)); in netns_ns_alloc() 308 rand_port = first + (rand_port % (last - first)); in netns_ns_alloc() 311 namespace->ns_last_ephemeral_port_down = rand_port; in netns_ns_alloc() 312 namespace->ns_last_ephemeral_port_up = rand_port; in netns_ns_alloc() 1287 in_port_t rand_port; in netns_reserve_ephemeral() local 1334 rand_port = first; in netns_reserve_ephemeral() 1338 read_frandom(&rand_port, sizeof(rand_port)); in netns_reserve_ephemeral() [all …]
|
| /xnu-8792.41.9/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-8792.41.9/bsd/netinet/ |
| H A D | in_pcb.c | 756 u_short lport = 0, rand_port = 0; in in_pcbbind() local 1069 read_frandom(&rand_port, sizeof(rand_port)); in in_pcbbind() 1071 first - (rand_port % (first - last)); in in_pcbbind() 1130 read_frandom(&rand_port, sizeof(rand_port)); in in_pcbbind() 1132 first + (rand_port % (first - last)); in in_pcbbind()
|