+void stf_reg_if_mods()
+{
+ struct dlil_ifmod_reg_str stf_ifmod;
+ struct dlil_protomod_reg_str stf_protoreg;
+ int error;
+
+ bzero(&stf_ifmod, sizeof(stf_ifmod));
+ stf_ifmod.add_if = stf_add_if;
+ stf_ifmod.del_if = stf_del_if;
+ stf_ifmod.add_proto = stf_add_proto;
+ stf_ifmod.del_proto = stf_del_proto;
+ stf_ifmod.ifmod_ioctl = 0;
+ stf_ifmod.shutdown = stf_shutdown;
+
+
+ if (dlil_reg_if_modules(APPLE_IF_FAM_STF, &stf_ifmod))
+ panic("Couldn't register stf modules\n");
+
+ /* Register protocol registration functions */
+
+ bzero(&stf_protoreg, sizeof(stf_protoreg));
+ stf_protoreg.attach_proto = stf_attach_inet6;
+ stf_protoreg.detach_proto = stf_detach_inet6;
+
+ if ( error = dlil_reg_proto_module(AF_INET6, APPLE_IF_FAM_STF, &stf_protoreg) != 0)
+ kprintf("dlil_reg_proto_module failed for AF_INET6 error=%d\n", error);
+}