| 94 | } |
| 95 | |
| 96 | struct scope6_id * |
| 97 | scope6_ifattach(struct ifnet *ifp) |
| 98 | { |
| 99 | struct scope6_id *sid; |
| 100 | |
| 101 | sid = malloc(sizeof(*sid), M_IFADDR, M_WAITOK | M_ZERO); |
| 102 | /* |
| 103 | * XXX: IPV6_ADDR_SCOPE_xxx macros are not standard. |
| 104 | * Should we rather hardcode here? |
| 105 | */ |
| 106 | sid->s6id_list[IPV6_ADDR_SCOPE_INTFACELOCAL] = ifp->if_index; |
| 107 | sid->s6id_list[IPV6_ADDR_SCOPE_LINKLOCAL] = ifp->if_index; |
| 108 | return (sid); |
| 109 | } |
| 110 | |
| 111 | void |
| 112 | scope6_ifdetach(struct scope6_id *sid) |
no test coverage detected