Page MenuHomeFreeBSD

D36723.id111011.diff
No OneTemporary

D36723.id111011.diff

diff --git a/sys/netinet/in.h b/sys/netinet/in.h
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -696,23 +696,6 @@
#define satosin(sa) ((struct sockaddr_in *)(sa))
#define sintosa(sin) ((struct sockaddr *)(sin))
#define ifatoia(ifa) ((struct in_ifaddr *)(ifa))
-
-typedef int ipproto_input_t(struct mbuf **, int *, int);
-typedef void ipproto_ctlinput_t(int, struct sockaddr *, void *);
-int ipproto_register(uint8_t, ipproto_input_t, ipproto_ctlinput_t);
-int ipproto_unregister(uint8_t);
-int ip6proto_register(uint8_t, ipproto_input_t, ipproto_ctlinput_t);
-int ip6proto_unregister(uint8_t);
-#define IPPROTO_REGISTER(prot, input, ctl) do { \
- int error __diagused; \
- error = ipproto_register(prot, input, ctl); \
- MPASS(error == 0); \
-} while (0)
-#define IP6PROTO_REGISTER(prot, input, ctl) do { \
- int error __diagused; \
- error = ip6proto_register(prot, input, ctl); \
- MPASS(error == 0); \
-} while (0)
#endif /* _KERNEL */
/* INET6 stuff */
diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h
--- a/sys/netinet/ip_var.h
+++ b/sys/netinet/ip_var.h
@@ -239,6 +239,16 @@
extern void (*ip_rsvp_force_done)(struct socket *);
extern int (*rsvp_input_p)(struct mbuf **, int *, int);
+typedef int ipproto_input_t(struct mbuf **, int *, int);
+typedef void ipproto_ctlinput_t(int, struct sockaddr *, void *);
+int ipproto_register(uint8_t, ipproto_input_t, ipproto_ctlinput_t);
+int ipproto_unregister(uint8_t);
+#define IPPROTO_REGISTER(prot, input, ctl) do { \
+ int error __diagused; \
+ error = ipproto_register(prot, input, ctl); \
+ MPASS(error == 0); \
+} while (0)
+
VNET_DECLARE(struct pfil_head *, inet_pfil_head);
#define V_inet_pfil_head VNET(inet_pfil_head)
#define PFIL_INET_NAME "inet"
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -131,9 +131,9 @@
#include <netinet6/ip6protosw.h>
-ipproto_input_t *ip6_protox[IPPROTO_MAX] = {
+ip6proto_input_t *ip6_protox[IPPROTO_MAX] = {
[0 ... IPPROTO_MAX - 1] = rip6_input };
-ipproto_ctlinput_t *ip6_ctlprotox[IPPROTO_MAX] = {
+ip6proto_ctlinput_t *ip6_ctlprotox[IPPROTO_MAX] = {
[0 ... IPPROTO_MAX - 1] = rip6_ctlinput };
VNET_DEFINE(struct in6_ifaddrhead, in6_ifaddrhead);
@@ -308,7 +308,8 @@
SYSINIT(ip6_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, ip6_init, NULL);
int
-ip6proto_register(uint8_t proto, ipproto_input_t input, ipproto_ctlinput_t ctl)
+ip6proto_register(uint8_t proto, ip6proto_input_t input,
+ ip6proto_ctlinput_t ctl)
{
MPASS(proto > 0);
diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h
--- a/sys/netinet6/ip6_var.h
+++ b/sys/netinet6/ip6_var.h
@@ -413,6 +413,16 @@
u_int32_t ip6_randomid(void);
u_int32_t ip6_randomflowlabel(void);
void in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset);
+
+typedef int ip6proto_input_t(struct mbuf **, int *, int);
+typedef void ip6proto_ctlinput_t(int, struct sockaddr *, void *);
+int ip6proto_register(uint8_t, ip6proto_input_t, ip6proto_ctlinput_t);
+int ip6proto_unregister(uint8_t);
+#define IP6PROTO_REGISTER(prot, input, ctl) do { \
+ int error __diagused; \
+ error = ip6proto_register(prot, input, ctl); \
+ MPASS(error == 0); \
+} while (0)
#endif /* _KERNEL */
#endif /* !_NETINET6_IP6_VAR_H_ */

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 4:10 PM (20 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14660532
Default Alt Text
D36723.id111011.diff (3 KB)

Event Timeline