+struct protosw *
+pffindprotonotype_locked(int family, int protocol, __unused int type)
+{
+ register struct domain *dp;
+ register struct protosw *pr;
+
+ if (family == 0)
+ return (0);
+ dp = pffinddomain_locked(family);
+ if (dp == NULL) {
+ return (NULL);
+ }
+ for (pr = dp->dom_protosw; pr; pr = pr->pr_next) {
+ if (pr->pr_protocol == protocol) {
+ return (pr);
+ }
+ }
+ return (NULL);
+}
+
+struct protosw *
+pffindprotonotype(int family, int protocol)
+{
+ register struct protosw *pr;
+ if (protocol == 0) {
+ return (NULL);
+ }
+ lck_mtx_assert(domain_proto_mtx, LCK_MTX_ASSERT_NOTOWNED);
+ lck_mtx_lock(domain_proto_mtx);
+ pr = pffindprotonotype_locked(family, protocol, 0);
+ lck_mtx_unlock(domain_proto_mtx);
+ return (pr);
+}
+