Date: Sat, 16 Aug 2008 13:56:26 +1200 From: Ryan French <rfrench@freebsd.org> To: freebsd-net@freebsd.org Subject: .pru_attach and kernel warnings Message-ID: <200808161356.26891.rfrench@freebsd.org>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808161356.26891.rfrench>