| 2483 | } |
| 2484 | |
| 2485 | void * |
| 2486 | in6_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 | |
| 2520 | int |
| 2521 | in6_domifmtu(struct ifnet *ifp) |
nothing calls this directly
no test coverage detected