From owner-freebsd-net@FreeBSD.ORG Fri Aug 8 12:49:16 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 147D41065674 for ; Fri, 8 Aug 2008 12:49:16 +0000 (UTC) (envelope-from rfrench@freebsd.org) Received: from oberon.wxnz.net (oberon.wxnz.net [58.28.6.13]) by mx1.freebsd.org (Postfix) with ESMTP id CCDAF8FC2C for ; Fri, 8 Aug 2008 12:49:15 +0000 (UTC) (envelope-from rfrench@freebsd.org) Received: from mini-tank.local (ip-58-28-152-154.static-xdsl.xnet.co.nz [58.28.152.154]) by oberon.wxnz.net (Postfix) with ESMTP id 981BF464515 for ; Sat, 9 Aug 2008 00:35:57 +1200 (NZST) From: Ryan French To: freebsd-net@freebsd.org Date: Sat, 9 Aug 2008 00:32:53 +1200 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808090032.53611.rfrench@freebsd.org> Subject: Probem with protosw X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2008 12:49:16 -0000 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 #include #include #include #include #include #include #include #include #include #include #include /* * 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) };