• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/xnu-2422.115.4/bsd/net/

Lines Matching defs:proto

283 static unsigned int dlif_phash_size;	/* size of ifnet proto hash table */
284 static struct zone *dlif_phash_zone; /* zone for ifnet proto hash table */
769 struct if_proto *proto = NULL;
775 proto = SLIST_FIRST(&ifp->if_proto_hash[i]);
777 while (proto != NULL && proto->protocol_family != protocol_family)
778 proto = SLIST_NEXT(proto, next_hash);
780 if (proto != NULL)
781 if_proto_ref(proto);
783 return (proto);
787 if_proto_ref(struct if_proto *proto)
789 atomic_add_32(&proto->refcount, 1);
795 if_proto_free(struct if_proto *proto)
798 struct ifnet *ifp = proto->ifp;
799 u_int32_t proto_family = proto->protocol_family;
802 oldval = atomic_add_32_ov(&proto->refcount, -1);
807 VERIFY(proto->detached);
809 if (proto->proto_kpi == kProtoKPI_v1) {
810 if (proto->kpi.v1.detached)
811 proto->kpi.v1.detached(ifp, proto->protocol_family);
813 if (proto->proto_kpi == kProtoKPI_v2) {
814 if (proto->kpi.v2.detached)
815 proto->kpi.v2.detached(ifp, proto->protocol_family);
837 zfree(dlif_proto_zone, proto);
942 struct if_proto *proto;
943 SLIST_FOREACH(proto, &ifp->if_proto_hash[i], next_hash) {
3387 /* callee holds a proto refcnt upon success */
3490 struct if_proto *proto;
3492 SLIST_FOREACH(proto, &ifp->if_proto_hash[i],
3495 (proto->proto_kpi == kProtoKPI_v1 ?
3496 proto->kpi.v1.event :
3497 proto->kpi.v2.event);
3500 if_proto_ref(proto);
3503 eventp(ifp, proto->protocol_family,
3507 if_proto_free(proto);
3691 struct if_proto *proto = NULL;
3719 /* callee holds a proto refcnt upon success */
3720 proto = find_attached_proto(ifp, proto_family);
3721 if (proto == NULL) {
3738 proto_media_preout preoutp = (proto->proto_kpi == kProtoKPI_v1 ?
3739 proto->kpi.v1.pre_output : proto->kpi.v2.pre_output);
3967 if (proto != NULL)
3968 if_proto_free(proto);
4031 struct if_proto *proto;
4033 /* callee holds a proto refcnt upon success */
4035 proto = find_attached_proto(ifp, proto_fam);
4037 if (proto != NULL) {
4039 (proto->proto_kpi == kProtoKPI_v1 ?
4040 proto->kpi.v1.ioctl : proto->kpi.v2.ioctl);
4045 if_proto_free(proto);
4108 struct if_proto *proto;
4117 /* Call the protocol first; callee holds a proto refcnt upon success */
4119 proto = find_attached_proto(ifp, proto_addr->sa_family);
4121 if (proto != NULL) {
4122 resolvep = (proto->proto_kpi == kProtoKPI_v1 ?
4123 proto->kpi.v1.resolve_multi : proto->kpi.v2.resolve_multi);
4127 if_proto_free(proto);
4148 struct if_proto *proto;
4151 /* callee holds a proto refcnt upon success */
4153 proto = find_attached_proto(ifp, target_proto->sa_family);
4155 if (proto == NULL) {
4159 arpp = (proto->proto_kpi == kProtoKPI_v1 ?
4160 proto->kpi.v1.send_arp : proto->kpi.v2.send_arp);
4177 if_proto_free(proto);
4519 dlil_attach_protocol_internal(struct if_proto *proto,
4523 struct ifnet *ifp = proto->ifp;
4525 u_int32_t hash_value = proto_hash_value(proto->protocol_family);
4529 /* callee holds a proto refcnt upon success */
4531 _proto = find_attached_proto(ifp, proto->protocol_family);
4542 retval = ifp->if_add_proto(ifp, proto->protocol_family, demux_list,
4556 SLIST_INSERT_AFTER(prev_proto, proto, next_hash);
4559 proto, next_hash);
4561 /* hold a proto refcnt for attach */
4562 if_proto_ref(proto);
4568 ev_pr_data.proto_family = proto->protocol_family;
4693 struct if_proto *proto = NULL;
4702 /* callee holds a proto refcnt upon success */
4703 proto = find_attached_proto(ifp, proto_family);
4704 if (proto == NULL) {
4712 ifp->if_del_proto(ifp, proto->protocol_family);
4715 proto, if_proto, next_hash);
4717 if (proto->proto_kpi == kProtoKPI_v1) {
4718 proto->kpi.v1.input = ifproto_media_input_v1;
4719 proto->kpi.v1.pre_output= ifproto_media_preout;
4720 proto->kpi.v1.event = ifproto_media_event;
4721 proto->kpi.v1.ioctl = ifproto_media_ioctl;
4722 proto->kpi.v1.resolve_multi = ifproto_media_resolve_multi;
4723 proto->kpi.v1.send_arp = ifproto_media_send_arp;
4725 proto->kpi.v2.input = ifproto_media_input_v2;
4726 proto->kpi.v2.pre_output = ifproto_media_preout;
4727 proto->kpi.v2.event = ifproto_media_event;
4728 proto->kpi.v2.ioctl = ifproto_media_ioctl;
4729 proto->kpi.v2.resolve_multi = ifproto_media_resolve_multi;
4730 proto->kpi.v2.send_arp = ifproto_media_send_arp;
4732 proto->detached = 1;
4737 (proto->proto_kpi == kProtoKPI_v1) ?
4741 /* release proto refcnt held during protocol attach */
4742 if_proto_free(proto);
4745 * Release proto refcnt held during lookup; the rest of
4746 * protocol detach steps will happen when the last proto
4749 if_proto_free(proto);
5576 struct if_proto *proto;
5578 proto = SLIST_FIRST(&ifp->if_proto_hash[i]);
5579 while (proto != NULL) {
5580 protocol_family_t family = proto->protocol_family;
5584 proto = SLIST_FIRST(&ifp->if_proto_hash[i]);