/*
- * Copyright (c) 2000-2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2017 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
struct stf_softc *sc;
int error;
const struct encaptab *p;
- struct ifnet_init_params stf_init;
+ struct ifnet_init_eparams stf_init;
stfinit();
lck_mtx_init(&sc->sc_ro_mtx, stf_mtx_grp, LCK_ATTR_NULL);
bzero(&stf_init, sizeof(stf_init));
+ stf_init.ver = IFNET_INIT_CURRENT_VERSION;
+ stf_init.len = sizeof (stf_init);
+ stf_init.flags = IFNET_INIT_LEGACY;
stf_init.name = "stf";
stf_init.unit = 0;
stf_init.type = IFT_STF;
stf_init.ioctl = stf_ioctl;
stf_init.set_bpf_tap = stf_set_bpf_tap;
- error = ifnet_allocate(&stf_init, &sc->sc_if);
+ error = ifnet_allocate_extended(&stf_init, &sc->sc_if);
if (error != 0) {
printf("stfattach, ifnet_allocate failed - %d\n", error);
encap_detach(sc->encap_cookie);
struct in6_ifaddr *ia6;
struct sockaddr_in *dst4;
struct ip_out_args ipoa =
- { IFSCOPE_NONE, { 0 }, IPOAF_SELECT_SRCIF, 0 };
+ { IFSCOPE_NONE, { 0 }, IPOAF_SELECT_SRCIF, 0,
+ SO_TC_UNSPEC, _NET_SERVICE_TYPE_UNSPEC };
errno_t result = 0;
sc = ifnet_softc(ifp);