Home
last modified time | relevance | path

Searched refs:rand_port (Results 1 – 3 of 3) sorted by relevance

/xnu-10063.101.15/bsd/skywalk/namespace/
H A Dnetns.c285 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()
1270 in_port_t rand_port; in netns_reserve_ephemeral() local
1317 rand_port = first; in netns_reserve_ephemeral()
1321 read_frandom(&rand_port, sizeof(rand_port)); in netns_reserve_ephemeral()
[all …]
/xnu-10063.101.15/bsd/netinet6/
H A Din6_src.c1636 uint16_t lport = 0, first, last, *lastport, rand_port; in in6_pcbsetport() local
1713 read_frandom(&rand_port, sizeof(rand_port)); in in6_pcbsetport()
1714 *lastport = first - (rand_port % (first - last)); in in6_pcbsetport()
1721 read_frandom(&rand_port, sizeof(rand_port)); in in6_pcbsetport()
1722 *lastport = first + (rand_port % (first - last)); in in6_pcbsetport()
/xnu-10063.101.15/bsd/netinet/
H A Din_pcb.c838 u_short lport = 0, rand_port = 0; in in_pcbbind() local
1172 read_frandom(&rand_port, sizeof(rand_port)); in in_pcbbind()
1174 first - (rand_port % (first - last)); in in_pcbbind()
1234 read_frandom(&rand_port, sizeof(rand_port)); in in_pcbbind()
1236 first + (rand_port % (first - last)); in in_pcbbind()