Lines Matching refs:ifproto
975 dlil_ifproto_input(struct if_proto * ifproto, mbuf_t m)
979 if (ifproto->proto_kpi == kProtoKPI_v1) {
989 error = (*ifproto->kpi.v1.input)(ifproto->ifp,
990 ifproto->protocol_family,
997 else if (ifproto->proto_kpi == kProtoKPI_v2) {
999 error = (*ifproto->kpi.v2.input)(ifproto->ifp,
1000 ifproto->protocol_family,
1024 struct if_proto * ifproto = NULL;
1073 ifproto = NULL;
1079 ifproto = last_ifproto;
1082 ifproto = find_attached_proto(ifp, protocol_family);
1084 if (ifproto == NULL) {
1089 if (ifproto != last_ifproto) {
1090 /* make sure ifproto can't go away during input */
1091 if_proto_ref(ifproto);
1101 last_ifproto = ifproto;
2090 struct if_proto *ifproto = NULL;
2095 ifproto = _MALLOC(sizeof(struct if_proto), M_IFADDR, M_WAITOK);
2096 if (ifproto == 0) {
2101 bzero(ifproto, sizeof(*ifproto));
2103 ifproto->ifp = ifp;
2104 ifproto->protocol_family = protocol;
2105 ifproto->proto_kpi = kProtoKPI_v1;
2106 ifproto->kpi.v1.input = proto_details->input;
2107 ifproto->kpi.v1.pre_output = proto_details->pre_output;
2108 ifproto->kpi.v1.event = proto_details->event;
2109 ifproto->kpi.v1.ioctl = proto_details->ioctl;
2110 ifproto->kpi.v1.detached = proto_details->detached;
2111 ifproto->kpi.v1.resolve_multi = proto_details->resolve;
2112 ifproto->kpi.v1.send_arp = proto_details->send_arp;
2114 retval = dlil_attach_protocol_internal(ifproto,
2118 if (retval && ifproto)
2119 FREE(ifproto, M_IFADDR);
2128 struct if_proto *ifproto = NULL;
2133 ifproto = _MALLOC(sizeof(struct if_proto), M_IFADDR, M_WAITOK);
2134 if (ifproto == 0) {
2139 bzero(ifproto, sizeof(*ifproto));
2141 ifproto->ifp = ifp;
2142 ifproto->protocol_family = protocol;
2143 ifproto->proto_kpi = kProtoKPI_v2;
2144 ifproto->kpi.v2.input = proto_details->input;
2145 ifproto->kpi.v2.pre_output = proto_details->pre_output;
2146 ifproto->kpi.v2.event = proto_details->event;
2147 ifproto->kpi.v2.ioctl = proto_details->ioctl;
2148 ifproto->kpi.v2.detached = proto_details->detached;
2149 ifproto->kpi.v2.resolve_multi = proto_details->resolve;
2150 ifproto->kpi.v2.send_arp = proto_details->send_arp;
2152 retval = dlil_attach_protocol_internal(ifproto,
2156 if (retval && ifproto)
2157 FREE(ifproto, M_IFADDR);