+ /* Register protocol registration functions */
+
+ bzero(&enet_protoreg, sizeof(enet_protoreg));
+ enet_protoreg.attach_proto = ether_attach_inet;
+ enet_protoreg.detach_proto = ether_detach_inet;
+
+ if (error = dlil_reg_proto_module(PF_INET, APPLE_IF_FAM_ETHERNET, &enet_protoreg) != 0) {
+ printf("ether_family_init: dlil_reg_proto_module failed for AF_INET error=%d\n", error);
+ goto done;
+ }
+
+ enet_protoreg.attach_proto = ether_attach_inet6;
+ enet_protoreg.detach_proto = ether_detach_inet6;
+
+ if (error = dlil_reg_proto_module(PF_INET6, APPLE_IF_FAM_ETHERNET, &enet_protoreg) != 0) {
+ printf("ether_family_init: dlil_reg_proto_module failed for AF_INET6 error=%d\n", error);
+ goto done;
+ }
+ vlan_family_init();
+
+ done:
+ thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL);
+
+ return (error);