.pru_attach and kernel warnings
Ryan French
rfrench at freebsd.org
Sat Aug 16 01:56:28 UTC 2008
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.
More information about the freebsd-net
mailing list