From owner-freebsd-net@FreeBSD.ORG Sat Aug 16 01:56:28 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 DEC381065677 for ; Sat, 16 Aug 2008 01:56:28 +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 BEFF68FC1C for ; Sat, 16 Aug 2008 01:56:28 +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 B5CD6464105 for ; Sat, 16 Aug 2008 13:59:43 +1200 (NZST) From: Ryan French To: freebsd-net@freebsd.org Date: Sat, 16 Aug 2008 13:56:26 +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: <200808161356.26891.rfrench@freebsd.org> Subject: .pru_attach and kernel warnings 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: Sat, 16 Aug 2008 01:56:28 -0000 Hi everyone, I'm having issues with trying to build my kernel at the moment with my MPLS development code included. I'm trying to build a pr_usrreqs struct and with my attach method I am getting the warning 'initialization from incompatible pointer type', but as far as I can see the way I have done it is the same as other protocols. static int mpls_attach(struct socket *so) { int error = 0; if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) { error = soreserve(so, mpls_raw_sendspace, mpls_raw_recvspace); return error; } else return EOPNOTSUPP; } struct pr_usrreqs mpls_raw_usrreq = { .pru_accept = pru_accept_notsupp, .pru_attach = mpls_attach, .pru_bind = pru_bind_notsupp, .pru_connect = pru_connect_notsupp, .pru_connect2 = pru_connect2_notsupp, .pru_control = mpls_control, .pru_disconnect = pru_disconnect_notsupp, .pru_listen = pru_listen_notsupp, .pru_peeraddr = pru_peeraddr_notsupp, .pru_rcvd = pru_rcvd_notsupp, .pru_rcvoob = pru_rcvoob_notsupp, .pru_send = pru_send_notsupp, .pru_sense = pru_sense_null, .pru_shutdown = pru_shutdown_notsupp, .pru_sockaddr = pru_sockaddr_notsupp, .pru_sosend = pru_sosend_notsupp, .pru_soreceive = pru_soreceive_notsupp, .pru_sopoll = pru_sopoll_notsupp }; Should I ignore this warning or is there a problem with my code that I'm missing? Thanks for any help.