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

Function in6_domifattach

freebsd/netinet6/in6.c:2485–2518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2483}
2484
2485void *
2486in6_domifattach(struct ifnet *ifp)
2487{
2488 struct in6_ifextra *ext;
2489
2490 /* There are not IPv6-capable interfaces. */
2491 switch (ifp->if_type) {
2492 case IFT_PFLOG:
2493 case IFT_PFSYNC:
2494 case IFT_USB:
2495 return (NULL);
2496 }
2497 ext = (struct in6_ifextra *)malloc(sizeof(*ext), M_IFADDR, M_WAITOK);
2498 bzero(ext, sizeof(*ext));
2499
2500 ext->in6_ifstat = malloc(sizeof(counter_u64_t) *
2501 sizeof(struct in6_ifstat) / sizeof(uint64_t), M_IFADDR, M_WAITOK);
2502 COUNTER_ARRAY_ALLOC(ext->in6_ifstat,
2503 sizeof(struct in6_ifstat) / sizeof(uint64_t), M_WAITOK);
2504
2505 ext->icmp6_ifstat = malloc(sizeof(counter_u64_t) *
2506 sizeof(struct icmp6_ifstat) / sizeof(uint64_t), M_IFADDR,
2507 M_WAITOK);
2508 COUNTER_ARRAY_ALLOC(ext->icmp6_ifstat,
2509 sizeof(struct icmp6_ifstat) / sizeof(uint64_t), M_WAITOK);
2510
2511 ext->nd_ifinfo = nd6_ifattach(ifp);
2512 ext->scope6_id = scope6_ifattach(ifp);
2513 ext->lltable = in6_lltattach(ifp);
2514
2515 ext->mld_ifinfo = mld_domifattach(ifp);
2516
2517 return ext;
2518}
2519
2520int
2521in6_domifmtu(struct ifnet *ifp)

Callers

nothing calls this directly

Calls 6

mallocFunction · 0.85
bzeroFunction · 0.85
nd6_ifattachFunction · 0.85
scope6_ifattachFunction · 0.85
in6_lltattachFunction · 0.85
mld_domifattachFunction · 0.85

Tested by

no test coverage detected