| 170 | vnet_gre_uninit, NULL); |
| 171 | |
| 172 | static int |
| 173 | gre_clone_create(struct if_clone *ifc, int unit, caddr_t params) |
| 174 | { |
| 175 | struct gre_softc *sc; |
| 176 | |
| 177 | sc = malloc(sizeof(struct gre_softc), M_GRE, M_WAITOK | M_ZERO); |
| 178 | sc->gre_fibnum = curthread->td_proc->p_fibnum; |
| 179 | GRE2IFP(sc) = if_alloc(IFT_TUNNEL); |
| 180 | GRE2IFP(sc)->if_softc = sc; |
| 181 | if_initname(GRE2IFP(sc), grename, unit); |
| 182 | |
| 183 | GRE2IFP(sc)->if_mtu = GREMTU; |
| 184 | GRE2IFP(sc)->if_flags = IFF_POINTOPOINT|IFF_MULTICAST; |
| 185 | GRE2IFP(sc)->if_output = gre_output; |
| 186 | GRE2IFP(sc)->if_ioctl = gre_ioctl; |
| 187 | GRE2IFP(sc)->if_transmit = gre_transmit; |
| 188 | GRE2IFP(sc)->if_qflush = gre_qflush; |
| 189 | #ifdef VIMAGE |
| 190 | GRE2IFP(sc)->if_reassign = gre_reassign; |
| 191 | #endif |
| 192 | GRE2IFP(sc)->if_capabilities |= IFCAP_LINKSTATE; |
| 193 | GRE2IFP(sc)->if_capenable |= IFCAP_LINKSTATE; |
| 194 | if_attach(GRE2IFP(sc)); |
| 195 | bpfattach(GRE2IFP(sc), DLT_NULL, sizeof(u_int32_t)); |
| 196 | return (0); |
| 197 | } |
| 198 | |
| 199 | #ifdef VIMAGE |
| 200 | static void |
nothing calls this directly
no test coverage detected