Searched refs:rand_port (Results 1 – 3 of 3) sorted by relevance
| /xnu-11215.1.10/bsd/skywalk/namespace/ |
| H A D | netns.c | 288 in_port_t rand_port; in netns_ns_alloc() local 305 rand_port = first; in netns_ns_alloc() 307 read_frandom(&rand_port, sizeof(rand_port)); in netns_ns_alloc() 310 rand_port = last + (rand_port % (first - last)); in netns_ns_alloc() 312 rand_port = first + (rand_port % (last - first)); in netns_ns_alloc() 315 namespace->ns_last_ephemeral_port_down = rand_port; in netns_ns_alloc() 316 namespace->ns_last_ephemeral_port_up = rand_port; in netns_ns_alloc() 1273 in_port_t rand_port; in netns_reserve_ephemeral() local 1320 rand_port = first; in netns_reserve_ephemeral() 1324 read_frandom(&rand_port, sizeof(rand_port)); in netns_reserve_ephemeral() [all …]
|
| /xnu-11215.1.10/bsd/netinet6/ |
| H A D | in6_src.c | 1643 uint16_t lport = 0, first, last, rand_port; in in6_pcbsetport() local 1721 read_frandom(&rand_port, sizeof(rand_port)); in in6_pcbsetport() 1722 *lastport = first - (rand_port % (first - last)); in in6_pcbsetport() 1729 read_frandom(&rand_port, sizeof(rand_port)); in in6_pcbsetport() 1730 *lastport = first + (rand_port % (first - last)); in in6_pcbsetport()
|
| /xnu-11215.1.10/bsd/netinet/ |
| H A D | in_pcb.c | 873 u_short lport = 0, rand_port = 0; in in_pcbbind() local 1207 read_frandom(&rand_port, sizeof(rand_port)); in in_pcbbind() 1209 first - (rand_port % (first - last)); in in_pcbbind() 1269 read_frandom(&rand_port, sizeof(rand_port)); in in_pcbbind() 1271 first + (rand_port % (first - last)); in in_pcbbind()
|