| 2116 | } |
| 2117 | |
| 2118 | static struct llentry * |
| 2119 | in6_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 | |
| 2137 | static int |
| 2138 | in6_lltable_match_prefix(const struct sockaddr *saddr, |
no test coverage detected