diff options
author | will <will@FreeBSD.org> | 2010-08-11 20:18:19 +0000 |
---|---|---|
committer | will <will@FreeBSD.org> | 2010-08-11 20:18:19 +0000 |
commit | d548943ae909fff2cc91f964186d557895e14bab (patch) | |
tree | 04a9bbb85e9f7f4a28b5bef19bf56f932ebf0ea4 /sys/netinet | |
parent | 9198b19835979cee1b431f818f01d9859c25f48f (diff) | |
download | FreeBSD-src-d548943ae909fff2cc91f964186d557895e14bab.zip FreeBSD-src-d548943ae909fff2cc91f964186d557895e14bab.tar.gz |
Unbreak LINT by moving all carp hooks to net/if.c / netinet/ip_carp.h, with
the appropriate ifdefs.
Reviewed by: bz
Approved by: ken (mentor)
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_ether.c | 7 | ||||
-rw-r--r-- | sys/netinet/ip_carp.c | 20 | ||||
-rw-r--r-- | sys/netinet/ip_carp.h | 20 |
3 files changed, 23 insertions, 24 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index bdc981a..a6ea36e 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -64,6 +64,9 @@ __FBSDID("$FreeBSD$"); #include <netinet/in_var.h> #include <net/if_llatbl.h> #include <netinet/if_ether.h> +#if defined(INET) || defined(INET6) +#include <netinet/ip_carp.h> +#endif #include <net/if_arc.h> #include <net/iso88025.h> @@ -118,10 +121,6 @@ static void arptimer(void *); #ifdef INET static void in_arpinput(struct mbuf *); #endif -#if defined(INET) || defined(INET6) -int (*carp_iamatch_p)(struct ifnet *, struct in_ifaddr *, struct in_addr *, - u_int8_t **); -#endif static const struct netisr_handler arp_nh = { .nh_name = "arp", diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 1820ae0..8de1684 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -135,26 +135,6 @@ struct carp_softc { }; #define SC2IFP(sc) ((sc)->sc_ifp) -/* These are external networking stack hooks for CARP */ -/* net/if.c */ -extern void (*carp_linkstate_p)(struct ifnet *); -/* net/if_bridge.c net/if_ethersubr.c */ -extern struct ifnet *(*carp_forus_p)(struct ifnet *, u_char *); -/* net/if_ethersubr.c */ -extern int (*carp_output_p)(struct ifnet *, struct mbuf *, - struct sockaddr *, struct rtentry *); -#ifdef INET -/* netinet/if_ether.c */ -extern int (*carp_iamatch_p)(struct ifnet *, struct in_ifaddr *, - struct in_addr *, u_int8_t **); -#endif -#ifdef INET6 -/* netinet6/nd6_nbr.c */ -extern struct ifaddr *(*carp_iamatch6_p)(struct ifnet *, struct in6_addr *); -extern caddr_t (*carp_macmatch6_p)(struct ifnet *, struct mbuf *, - const struct in6_addr *); -#endif - int carp_suppress_preempt = 0; int carp_opts[CARPCTL_MAXID] = { 0, 1, 0, 1, 0, 0 }; /* XXX for now */ SYSCTL_NODE(_net_inet, IPPROTO_CARP, carp, CTLFLAG_RW, 0, "CARP"); diff --git a/sys/netinet/ip_carp.h b/sys/netinet/ip_carp.h index 1e06806..2f2b4f2 100644 --- a/sys/netinet/ip_carp.h +++ b/sys/netinet/ip_carp.h @@ -167,5 +167,25 @@ int carp_iamatch (struct ifnet *, struct in_ifaddr *, struct in_addr *, struct ifaddr *carp_iamatch6(struct ifnet *, struct in6_addr *); caddr_t carp_macmatch6(struct ifnet *, struct mbuf *, const struct in6_addr *); struct ifnet *carp_forus (struct ifnet *, u_char *); + +/* These are external networking stack hooks for CARP */ +/* net/if.c */ +extern void (*carp_linkstate_p)(struct ifnet *); +/* net/if_bridge.c net/if_ethersubr.c */ +extern struct ifnet *(*carp_forus_p)(struct ifnet *, u_char *); +/* net/if_ethersubr.c */ +extern int (*carp_output_p)(struct ifnet *, struct mbuf *, + struct sockaddr *, struct rtentry *); +#ifdef INET +/* netinet/if_ether.c */ +extern int (*carp_iamatch_p)(struct ifnet *, struct in_ifaddr *, + struct in_addr *, u_int8_t **); +#endif +#ifdef INET6 +/* netinet6/nd6_nbr.c */ +extern struct ifaddr *(*carp_iamatch6_p)(struct ifnet *, struct in6_addr *); +extern caddr_t (*carp_macmatch6_p)(struct ifnet *, struct mbuf *, + const struct in6_addr *); +#endif #endif #endif /* _IP_CARP_H */ |