udp: add protocol method declarations to udp_var.h
They are shared between UDP over IPv4 and over IPv6. To prevent all
possible kernel build failures wrap them in #ifdef _SYS_PROTOSW_H_.
Prompted by feedback from jhb@ and jrtc27@ on c93db4abf4
.
This commit is contained in:
parent
5bfc014f23
commit
1aed3b3430
@ -94,7 +94,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <netinet/toecore.h>
|
||||
#endif
|
||||
#include <netinet/udp.h>
|
||||
#include <netinet/udp_var.h>
|
||||
|
||||
#include <netipsec/ipsec_support.h>
|
||||
|
||||
|
@ -1037,7 +1037,6 @@ udp_v4mapped_pktinfo(struct cmsghdr *cm, struct sockaddr_in * src,
|
||||
}
|
||||
#endif /* INET6 */
|
||||
|
||||
pr_send_t udp_send; /* shared with udp6_usrreq.c */
|
||||
int
|
||||
udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
|
||||
struct mbuf *control, struct thread *td)
|
||||
@ -1445,7 +1444,6 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
|
||||
return (error);
|
||||
}
|
||||
|
||||
pr_abort_t udp_abort; /* shared with udp6_usrreq.c */
|
||||
void
|
||||
udp_abort(struct socket *so)
|
||||
{
|
||||
@ -1630,7 +1628,6 @@ udp_detach(struct socket *so)
|
||||
in_pcbfree(inp);
|
||||
}
|
||||
|
||||
pr_disconnect_t udp_disconnect; /* shared with udp6_usrreq.c */
|
||||
int
|
||||
udp_disconnect(struct socket *so)
|
||||
{
|
||||
|
@ -176,6 +176,12 @@ int udp_shutdown(struct socket *so);
|
||||
int udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f,
|
||||
udp_tun_icmp_t i, void *ctx);
|
||||
|
||||
#ifdef _SYS_PROTOSW_H_
|
||||
pr_abort_t udp_abort;
|
||||
pr_disconnect_t udp_disconnect;
|
||||
pr_send_t udp_send;
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _NETINET_UDP_VAR_H_ */
|
||||
|
@ -131,12 +131,6 @@ SYSCTL_INT(_net_inet6_udp6, OID_AUTO, rfc6935_port, CTLFLAG_VNET | CTLFLAG_RW,
|
||||
&VNET_NAME(zero_checksum_port), 0,
|
||||
"Zero UDP checksum allowed for traffic to/from this port.");
|
||||
|
||||
|
||||
/* netinet/udp_usrreqs.c */
|
||||
pr_abort_t udp_abort;
|
||||
pr_disconnect_t udp_disconnect;
|
||||
pr_send_t udp_send;
|
||||
|
||||
/*
|
||||
* UDP protocol implementation.
|
||||
* Per RFC 768, August, 1980.
|
||||
|
Loading…
Reference in New Issue
Block a user