#include #include #include #include #include #include #include #include #include #include #include #include #include extern struct domain npdomain; static struct pr_usrreqs nousrreqs; struct protosw npsw[] = { { .pr_type = 0, .pr_domain = &npdomain, .pr_protocol = NPPROTO_NP, .pr_init = np_init, .pr_slowtimo = np_slowtimo, .pr_drain = np_drain, .pr_usrreqs = &nousrreqs }, { .pr_type = SOCK_DGRAM, .pr_domain = &npdomain, .pr_protocol = NPPROTO_UDP, .pr_flags = PR_ATOMIC|PR_ADDR, .pr_input = udp_np_input, .pr_ctlinput = udp_np_ctlinput, .pr_ctloutput = np_ctloutput, .pr_usrreqs = &udp_np_usrreqs, }, }; extern int in_inithead(void **, int); /*XXX : Change in_inithead at some point, need to include appropriate files for now however to make it work*/ struct domain npdomain = { .dom_family = AF_NP, .dom_name = "np++", .dom_protosw = npsw, .dom_protoswNPROTOSW = &npsw[sizeof(npsw)/sizeof(npsw[0])], .dom_rtattach = in_inithead, .dom_rtoffset = 32, .dom_maxrtkey = sizeof(struct sockaddr_in) }; DOMAIN_SET(np); SYSCTL_NODE(_net, PF_NP, np, CTLFLAG_RW, 0, "NP Family") ;