Home
last modified time | relevance | path

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

/xnu-12377.1.9/bsd/skywalk/namespace/
H A Dnetns.c294 in_port_t rand_port; in netns_ns_alloc() local
311 rand_port = first; in netns_ns_alloc()
313 read_frandom(&rand_port, sizeof(rand_port)); in netns_ns_alloc()
316 rand_port = last + (rand_port % (first - last)); in netns_ns_alloc()
318 rand_port = first + (rand_port % (last - first)); in netns_ns_alloc()
321 namespace->ns_last_ephemeral_port_down = rand_port; in netns_ns_alloc()
322 namespace->ns_last_ephemeral_port_up = rand_port; in netns_ns_alloc()
1280 in_port_t rand_port; in netns_reserve_ephemeral() local
1327 rand_port = first; in netns_reserve_ephemeral()
1331 read_frandom(&rand_port, sizeof(rand_port)); in netns_reserve_ephemeral()
[all …]
/xnu-12377.1.9/bsd/netinet6/
H A Din6_src.c1646 uint16_t lport = 0, first, last, rand_port; in in6_pcbsetport() local
1724 read_frandom(&rand_port, sizeof(rand_port)); in in6_pcbsetport()
1725 *lastport = first - (rand_port % (first - last)); in in6_pcbsetport()
1732 read_frandom(&rand_port, sizeof(rand_port)); in in6_pcbsetport()
1733 *lastport = first + (rand_port % (first - last)); in in6_pcbsetport()
/xnu-12377.1.9/bsd/netinet/
H A Din_pcb.c833 u_short lport = 0, rand_port = 0; in in_pcbbind() local
1164 read_frandom(&rand_port, sizeof(rand_port)); in in_pcbbind()
1166 first - (rand_port % (first - last)); in in_pcbbind()
1226 read_frandom(&rand_port, sizeof(rand_port)); in in_pcbbind()
1228 first + (rand_port % (first - last)); in in_pcbbind()
4506 uint16_t lport = 0, first, last, rand_port; in in_pcbsetport() local
4584 read_frandom(&rand_port, sizeof(rand_port)); in in_pcbsetport()
4585 *lastport = first - (rand_port % (first - last)); in in_pcbsetport()
4592 read_frandom(&rand_port, sizeof(rand_port)); in in_pcbsetport()
4593 *lastport = first + (rand_port % (first - last)); in in_pcbsetport()