Lines Matching refs:dp
82 void init_domain(struct domain *dp) __attribute__((section("__TEXT, initcode")));
83 void prepend_domain(struct domain *dp) __attribute__((section("__TEXT, initcode")));
120 init_domain(struct domain *dp)
124 if ((dp->dom_mtx = lck_mtx_alloc_init(domain_proto_mtx_grp, domain_proto_mtx_attr)) == NULL) {
125 printf("init_domain: can't init domain mtx for domain=%s\n", dp->dom_name);
129 if (dp->dom_init)
130 (*dp->dom_init)();
134 for (pr = dp->dom_protosw; pr; pr = pr->pr_next) {
137 dp->dom_name,
138 (int)(pr - dp->dom_protosw));
146 dp->dom_name, pr->pr_protocol);
159 if (dp->dom_protohdrlen > _max_protohdr)
160 _max_protohdr = dp->dom_protohdrlen;
168 prepend_domain(struct domain *dp)
171 dp->dom_next = domains;
172 domains = dp;
176 net_add_domain(struct domain *dp)
180 kprintf("Adding domain %s (family %d)\n", dp->dom_name,
181 dp->dom_family);
185 prepend_domain(dp);
187 init_domain(dp);
193 net_del_domain(struct domain *dp)
200 if (dp->dom_refs) {
206 { if (dp == dp1)
227 net_add_proto(struct protosw *pp, struct domain *dp)
230 for (pp2 = NULL, pp1 = dp->dom_protosw; pp1; pp1 = pp1->pr_next)
238 dp->dom_protosw = pp;
255 net_del_proto(int type, int protocol, struct domain *dp)
259 for (pp2 = NULL, pp1 = dp->dom_protosw; pp1; pp1 = pp1->pr_next)
271 dp->dom_protosw = pp1->pr_next;
302 register struct domain *dp;
356 for (dp = domains; dp; dp = dp->dom_next)
357 init_domain(dp);
366 struct domain *dp;
368 dp = domains;
369 while (dp != NULL)
370 { if (dp->dom_family == pf) {
373 dp = dp->dom_next;
375 return (dp);
381 register struct domain *dp;
386 dp = pffinddomain_locked(family);
387 if (dp == NULL) {
391 for (pr = dp->dom_protosw; pr; pr = pr->pr_next)
403 struct domain *dp;
407 dp = pffinddomain_locked(pf);
409 return(dp);
426 register struct domain *dp;
432 dp = pffinddomain_locked(family);
433 if (dp == NULL) {
436 for (pr = dp->dom_protosw; pr; pr = pr->pr_next) {
450 register struct domain *dp;
455 dp = pffinddomain_locked(family);
456 if (dp == NULL) {
459 for (pr = dp->dom_protosw; pr; pr = pr->pr_next) {
485 register struct domain *dp;
503 for (dp = domains; dp; dp = dp->dom_next)
504 if (dp->dom_family == family)
509 for (pr = dp->dom_protosw; pr; pr = pr->pr_next)
529 struct domain *dp;
537 for (dp = domains; dp; dp = dp->dom_next)
538 for (pr = dp->dom_protosw; pr; pr = pr->pr_next)
547 register struct domain *dp;
559 for (dp = domains; dp; dp = dp->dom_next)
560 for (pr = dp->dom_protosw; pr; pr = pr->pr_next) {