Date: Sat, 9 Aug 2008 00:32:53 +1200 From: Ryan French <rfrench@freebsd.org> To: freebsd-net@freebsd.org Subject: Probem with protosw Message-ID: <200808090032.53611.rfrench@freebsd.org>
next in thread | raw e-mail | index | archive | help
Hi, I am working on my implementation of MPLS in FreeBSD and I'm having problems with integrating the code I have ported over into the FreeBSD networking stack. The problem I am having at the moment is trying to get my mpls protocol struct to compile. When I try to build the kernel I get a pr_* undeclared here (not in a function) error, for each field of the struct I have declared. I have included the code just in case anyone is able to figure this out. Thanks, Ryan French #include <sys/cdefs.h> #include <sys/param.h> #include <sys/kernel.h> #include <sys/socket.h> #include <sys/domain.h> #include <sys/protosw.h> #include <sys/queue.h> #include <sys/sysctl.h> #include <net/if.h> #include <net/route.h> #include <net/netisr.h> #include <netmpls/mpls.h> /* * MPLS protocol family: */ extern struct domain mplsdomain; struct protosw mplssw[] = { { pr_type = 0, pr_domain = &mplsdomain, pr_init = mpls_init, pr_sysctl = mpls_sysctl }, { pr_type = SOCK_DGRAM, pr_domain = &mplsdomain, pr_flags = PR_ATOMIC | PR_ADDR, pr_usrreq = mpls_raw_usrreq, pr_sysctl = mpls_sysctl }, /* raw wildcard */ { pr_type = SOCK_RAW, pr_domain = &mplsdomain, pr_flags = PR_ATOMIC | PR_ADDR, pr_usrreq = mpls_raw_usrreq, pr_sysctl = mpls_sysctl }, }; struct domain mplsdomain = { NETISR_MPLS, "mpls", mpls_init, 0, 0, mplssw, &mplssw[sizeof(mplssw)/sizeof(mplssw[0])], 0, rn_inithead, offsetof(struct sockaddr_mpls, smpls_in_ifindex) << 3, sizeof(struct sockaddr_mpls) };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808090032.53611.rfrench>