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

Function in6_lltable_new

freebsd/netinet6/in6.c:2118–2135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2116}
2117
2118static struct llentry *
2119in6_lltable_new(const struct in6_addr *addr6, u_int flags)
2120{
2121 struct in6_llentry *lle;
2122
2123 lle = malloc(sizeof(struct in6_llentry), M_LLTABLE, M_NOWAIT | M_ZERO);
2124 if (lle == NULL) /* NB: caller generates msg */
2125 return NULL;
2126
2127 lle->base.r_l3addr.addr6 = *addr6;
2128 lle->base.lle_refcnt = 1;
2129 lle->base.lle_free = in6_lltable_destroy_lle;
2130 LLE_LOCK_INIT(&lle->base);
2131 LLE_REQ_INIT(&lle->base);
2132 callout_init(&lle->base.lle_timer, 1);
2133
2134 return (&lle->base);
2135}
2136
2137static int
2138in6_lltable_match_prefix(const struct sockaddr *saddr,

Callers 1

in6_lltable_allocFunction · 0.85

Calls 2

mallocFunction · 0.85
callout_initFunction · 0.50

Tested by

no test coverage detected