MCPcopy Create free account
hub / github.com/F-Stack/f-stack / udp_init

Function udp_init

freebsd/netinet/udp_usrreq.c:199–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199void
200udp_init(void)
201{
202
203 /*
204 * For now default to 2-tuple UDP hashing - until the fragment
205 * reassembly code can also update the flowid.
206 *
207 * Once we can calculate the flowid that way and re-establish
208 * a 4-tuple, flip this to 4-tuple.
209 */
210 in_pcbinfo_init(&V_udbinfo, "udp", &V_udb, UDBHASHSIZE, UDBHASHSIZE,
211 "udp_inpcb", udp_inpcb_init, IPI_HASHFIELDS_2TUPLE);
212 V_udpcb_zone = uma_zcreate("udpcb", sizeof(struct udpcb),
213 NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
214 uma_zone_set_max(V_udpcb_zone, maxsockets);
215 uma_zone_set_warning(V_udpcb_zone, "kern.ipc.maxsockets limit reached");
216 EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL,
217 EVENTHANDLER_PRI_ANY);
218}
219
220void
221udplite_init(void)

Callers

nothing calls this directly

Calls 4

in_pcbinfo_initFunction · 0.85
uma_zcreateFunction · 0.85
uma_zone_set_maxFunction · 0.85
uma_zone_set_warningFunction · 0.85

Tested by

no test coverage detected