Commit 5c3a0fd7 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

ip*.h: Remove extern from function prototypes

There are a mix of function prototypes with and without extern
in the kernel sources.  Standardize on not using extern for
function prototypes.

Function prototypes don't need to be written with extern.
extern is assumed by the compiler.  Its use is as unnecessary as
using auto to declare automatic/local variables in a block.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1fd51155
...@@ -86,52 +86,50 @@ struct packet_type; ...@@ -86,52 +86,50 @@ struct packet_type;
struct rtable; struct rtable;
struct sockaddr; struct sockaddr;
extern int igmp_mc_proc_init(void); int igmp_mc_proc_init(void);
/* /*
* Functions provided by ip.c * Functions provided by ip.c
*/ */
extern int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk, int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk,
__be32 saddr, __be32 daddr, __be32 saddr, __be32 daddr,
struct ip_options_rcu *opt); struct ip_options_rcu *opt);
extern int ip_rcv(struct sk_buff *skb, struct net_device *dev, int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt,
struct packet_type *pt, struct net_device *orig_dev); struct net_device *orig_dev);
extern int ip_local_deliver(struct sk_buff *skb); int ip_local_deliver(struct sk_buff *skb);
extern int ip_mr_input(struct sk_buff *skb); int ip_mr_input(struct sk_buff *skb);
extern int ip_output(struct sk_buff *skb); int ip_output(struct sk_buff *skb);
extern int ip_mc_output(struct sk_buff *skb); int ip_mc_output(struct sk_buff *skb);
extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *));
extern int ip_do_nat(struct sk_buff *skb); int ip_do_nat(struct sk_buff *skb);
extern void ip_send_check(struct iphdr *ip); void ip_send_check(struct iphdr *ip);
extern int __ip_local_out(struct sk_buff *skb); int __ip_local_out(struct sk_buff *skb);
extern int ip_local_out(struct sk_buff *skb); int ip_local_out(struct sk_buff *skb);
extern int ip_queue_xmit(struct sk_buff *skb, struct flowi *fl); int ip_queue_xmit(struct sk_buff *skb, struct flowi *fl);
extern void ip_init(void); void ip_init(void);
extern int ip_append_data(struct sock *sk, struct flowi4 *fl4, int ip_append_data(struct sock *sk, struct flowi4 *fl4,
int getfrag(void *from, char *to, int offset, int len, int getfrag(void *from, char *to, int offset, int len,
int odd, struct sk_buff *skb), int odd, struct sk_buff *skb),
void *from, int len, int protolen, void *from, int len, int protolen,
struct ipcm_cookie *ipc, struct ipcm_cookie *ipc,
struct rtable **rt, struct rtable **rt,
unsigned int flags); unsigned int flags);
extern int ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb); int ip_generic_getfrag(void *from, char *to, int offset, int len, int odd,
extern ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page, struct sk_buff *skb);
ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
int offset, size_t size, int flags); int offset, size_t size, int flags);
extern struct sk_buff *__ip_make_skb(struct sock *sk, struct sk_buff *__ip_make_skb(struct sock *sk, struct flowi4 *fl4,
struct flowi4 *fl4,
struct sk_buff_head *queue, struct sk_buff_head *queue,
struct inet_cork *cork); struct inet_cork *cork);
extern int ip_send_skb(struct net *net, struct sk_buff *skb); int ip_send_skb(struct net *net, struct sk_buff *skb);
extern int ip_push_pending_frames(struct sock *sk, struct flowi4 *fl4); int ip_push_pending_frames(struct sock *sk, struct flowi4 *fl4);
extern void ip_flush_pending_frames(struct sock *sk); void ip_flush_pending_frames(struct sock *sk);
extern struct sk_buff *ip_make_skb(struct sock *sk, struct sk_buff *ip_make_skb(struct sock *sk, struct flowi4 *fl4,
struct flowi4 *fl4, int getfrag(void *from, char *to, int offset,
int getfrag(void *from, char *to, int offset, int len, int len, int odd, struct sk_buff *skb),
int odd, struct sk_buff *skb),
void *from, int length, int transhdrlen, void *from, int length, int transhdrlen,
struct ipcm_cookie *ipc, struct ipcm_cookie *ipc, struct rtable **rtp,
struct rtable **rtp,
unsigned int flags); unsigned int flags);
static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4) static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4)
...@@ -140,10 +138,9 @@ static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4) ...@@ -140,10 +138,9 @@ static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4)
} }
/* datagram.c */ /* datagram.c */
extern int ip4_datagram_connect(struct sock *sk, int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len);
struct sockaddr *uaddr, int addr_len);
extern void ip4_datagram_release_cb(struct sock *sk); void ip4_datagram_release_cb(struct sock *sk);
struct ip_reply_arg { struct ip_reply_arg {
struct kvec iov[1]; struct kvec iov[1];
...@@ -184,16 +181,16 @@ extern struct ipv4_config ipv4_config; ...@@ -184,16 +181,16 @@ extern struct ipv4_config ipv4_config;
#define NET_ADD_STATS_BH(net, field, adnd) SNMP_ADD_STATS_BH((net)->mib.net_statistics, field, adnd) #define NET_ADD_STATS_BH(net, field, adnd) SNMP_ADD_STATS_BH((net)->mib.net_statistics, field, adnd)
#define NET_ADD_STATS_USER(net, field, adnd) SNMP_ADD_STATS_USER((net)->mib.net_statistics, field, adnd) #define NET_ADD_STATS_USER(net, field, adnd) SNMP_ADD_STATS_USER((net)->mib.net_statistics, field, adnd)
extern unsigned long snmp_fold_field(void __percpu *mib[], int offt); unsigned long snmp_fold_field(void __percpu *mib[], int offt);
#if BITS_PER_LONG==32 #if BITS_PER_LONG==32
extern u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t sync_off); u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t sync_off);
#else #else
static inline u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t syncp_off) static inline u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t syncp_off)
{ {
return snmp_fold_field(mib, offt); return snmp_fold_field(mib, offt);
} }
#endif #endif
extern int snmp_mib_init(void __percpu *ptr[2], size_t mibsize, size_t align); int snmp_mib_init(void __percpu *ptr[2], size_t mibsize, size_t align);
static inline void snmp_mib_free(void __percpu *ptr[SNMP_ARRAY_SZ]) static inline void snmp_mib_free(void __percpu *ptr[SNMP_ARRAY_SZ])
{ {
...@@ -210,7 +207,7 @@ extern struct local_ports { ...@@ -210,7 +207,7 @@ extern struct local_ports {
seqlock_t lock; seqlock_t lock;
int range[2]; int range[2];
} sysctl_local_ports; } sysctl_local_ports;
extern void inet_get_local_port_range(int *low, int *high); void inet_get_local_port_range(int *low, int *high);
extern unsigned long *sysctl_local_reserved_ports; extern unsigned long *sysctl_local_reserved_ports;
static inline int inet_is_reserved_local_port(int port) static inline int inet_is_reserved_local_port(int port)
...@@ -231,9 +228,9 @@ extern int sysctl_ip_early_demux; ...@@ -231,9 +228,9 @@ extern int sysctl_ip_early_demux;
/* From ip_output.c */ /* From ip_output.c */
extern int sysctl_ip_dynaddr; extern int sysctl_ip_dynaddr;
extern void ipfrag_init(void); void ipfrag_init(void);
extern void ip_static_sysctl_init(void); void ip_static_sysctl_init(void);
static inline bool ip_is_fragment(const struct iphdr *iph) static inline bool ip_is_fragment(const struct iphdr *iph)
{ {
...@@ -262,7 +259,7 @@ int ip_dont_fragment(struct sock *sk, struct dst_entry *dst) ...@@ -262,7 +259,7 @@ int ip_dont_fragment(struct sock *sk, struct dst_entry *dst)
!(dst_metric_locked(dst, RTAX_MTU))); !(dst_metric_locked(dst, RTAX_MTU)));
} }
extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more);
static inline void ip_select_ident(struct sk_buff *skb, struct dst_entry *dst, struct sock *sk) static inline void ip_select_ident(struct sk_buff *skb, struct dst_entry *dst, struct sock *sk)
{ {
...@@ -390,7 +387,7 @@ static inline int sk_mc_loop(struct sock *sk) ...@@ -390,7 +387,7 @@ static inline int sk_mc_loop(struct sock *sk)
return 1; return 1;
} }
extern bool ip_call_ra_chain(struct sk_buff *skb); bool ip_call_ra_chain(struct sk_buff *skb);
/* /*
* Functions provided by ip_fragment.c * Functions provided by ip_fragment.c
...@@ -428,50 +425,52 @@ int ip_frag_nqueues(struct net *net); ...@@ -428,50 +425,52 @@ int ip_frag_nqueues(struct net *net);
* Functions provided by ip_forward.c * Functions provided by ip_forward.c
*/ */
extern int ip_forward(struct sk_buff *skb); int ip_forward(struct sk_buff *skb);
/* /*
* Functions provided by ip_options.c * Functions provided by ip_options.c
*/ */
extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt, void ip_options_build(struct sk_buff *skb, struct ip_options *opt,
__be32 daddr, struct rtable *rt, int is_frag); __be32 daddr, struct rtable *rt, int is_frag);
extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb); int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb);
extern void ip_options_fragment(struct sk_buff *skb); void ip_options_fragment(struct sk_buff *skb);
extern int ip_options_compile(struct net *net, int ip_options_compile(struct net *net, struct ip_options *opt,
struct ip_options *opt, struct sk_buff *skb); struct sk_buff *skb);
extern int ip_options_get(struct net *net, struct ip_options_rcu **optp, int ip_options_get(struct net *net, struct ip_options_rcu **optp,
unsigned char *data, int optlen); unsigned char *data, int optlen);
extern int ip_options_get_from_user(struct net *net, struct ip_options_rcu **optp, int ip_options_get_from_user(struct net *net, struct ip_options_rcu **optp,
unsigned char __user *data, int optlen); unsigned char __user *data, int optlen);
extern void ip_options_undo(struct ip_options * opt); void ip_options_undo(struct ip_options *opt);
extern void ip_forward_options(struct sk_buff *skb); void ip_forward_options(struct sk_buff *skb);
extern int ip_options_rcv_srr(struct sk_buff *skb); int ip_options_rcv_srr(struct sk_buff *skb);
/* /*
* Functions provided by ip_sockglue.c * Functions provided by ip_sockglue.c
*/ */
extern void ipv4_pktinfo_prepare(struct sk_buff *skb); void ipv4_pktinfo_prepare(struct sk_buff *skb);
extern void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb); void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb);
extern int ip_cmsg_send(struct net *net, int ip_cmsg_send(struct net *net, struct msghdr *msg, struct ipcm_cookie *ipc);
struct msghdr *msg, struct ipcm_cookie *ipc); int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval,
extern int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen); unsigned int optlen);
extern int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen); int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval,
extern int compat_ip_setsockopt(struct sock *sk, int level, int __user *optlen);
int optname, char __user *optval, unsigned int optlen); int compat_ip_setsockopt(struct sock *sk, int level, int optname,
extern int compat_ip_getsockopt(struct sock *sk, int level, char __user *optval, unsigned int optlen);
int optname, char __user *optval, int __user *optlen); int compat_ip_getsockopt(struct sock *sk, int level, int optname,
extern int ip_ra_control(struct sock *sk, unsigned char on, void (*destructor)(struct sock *)); char __user *optval, int __user *optlen);
int ip_ra_control(struct sock *sk, unsigned char on,
extern int ip_recv_error(struct sock *sk, struct msghdr *msg, int len); void (*destructor)(struct sock *));
extern void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
__be16 port, u32 info, u8 *payload); int ip_recv_error(struct sock *sk, struct msghdr *msg, int len);
extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port,
u32 info, u8 *payload);
void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport,
u32 info); u32 info);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
extern int ip_misc_proc_init(void); int ip_misc_proc_init(void);
#endif #endif
#endif /* _IP_H */ #endif /* _IP_H */
...@@ -267,13 +267,12 @@ typedef struct rt6_info *(*pol_lookup_t)(struct net *, ...@@ -267,13 +267,12 @@ typedef struct rt6_info *(*pol_lookup_t)(struct net *,
* exported functions * exported functions
*/ */
extern struct fib6_table *fib6_get_table(struct net *net, u32 id); struct fib6_table *fib6_get_table(struct net *net, u32 id);
extern struct fib6_table *fib6_new_table(struct net *net, u32 id); struct fib6_table *fib6_new_table(struct net *net, u32 id);
extern struct dst_entry *fib6_rule_lookup(struct net *net, struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6,
struct flowi6 *fl6, int flags, int flags, pol_lookup_t lookup);
pol_lookup_t lookup);
extern struct fib6_node *fib6_lookup(struct fib6_node *root, struct fib6_node *fib6_lookup(struct fib6_node *root,
const struct in6_addr *daddr, const struct in6_addr *daddr,
const struct in6_addr *saddr); const struct in6_addr *saddr);
...@@ -281,34 +280,28 @@ struct fib6_node *fib6_locate(struct fib6_node *root, ...@@ -281,34 +280,28 @@ struct fib6_node *fib6_locate(struct fib6_node *root,
const struct in6_addr *daddr, int dst_len, const struct in6_addr *daddr, int dst_len,
const struct in6_addr *saddr, int src_len); const struct in6_addr *saddr, int src_len);
extern void fib6_clean_all_ro(struct net *net, void fib6_clean_all_ro(struct net *net,
int (*func)(struct rt6_info *, void *arg), int (*func)(struct rt6_info *, void *arg),
int prune, void *arg); int prune, void *arg);
extern void fib6_clean_all(struct net *net, void fib6_clean_all(struct net *net, int (*func)(struct rt6_info *, void *arg),
int (*func)(struct rt6_info *, void *arg),
int prune, void *arg); int prune, void *arg);
extern int fib6_add(struct fib6_node *root, int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info);
struct rt6_info *rt,
struct nl_info *info);
extern int fib6_del(struct rt6_info *rt, int fib6_del(struct rt6_info *rt, struct nl_info *info);
struct nl_info *info);
extern void inet6_rt_notify(int event, struct rt6_info *rt, void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info);
struct nl_info *info);
extern void fib6_run_gc(unsigned long expires, void fib6_run_gc(unsigned long expires, struct net *net, bool force);
struct net *net, bool force);
extern void fib6_gc_cleanup(void); void fib6_gc_cleanup(void);
extern int fib6_init(void); int fib6_init(void);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES #ifdef CONFIG_IPV6_MULTIPLE_TABLES
extern int fib6_rules_init(void); int fib6_rules_init(void);
extern void fib6_rules_cleanup(void); void fib6_rules_cleanup(void);
#else #else
static inline int fib6_rules_init(void) static inline int fib6_rules_init(void)
{ {
......
...@@ -51,7 +51,7 @@ static inline unsigned int rt6_flags2srcprefs(int flags) ...@@ -51,7 +51,7 @@ static inline unsigned int rt6_flags2srcprefs(int flags)
return (flags >> 3) & 7; return (flags >> 3) & 7;
} }
extern void rt6_bind_peer(struct rt6_info *rt, int create); void rt6_bind_peer(struct rt6_info *rt, int create);
static inline struct inet_peer *__rt6_get_peer(struct rt6_info *rt, int create) static inline struct inet_peer *__rt6_get_peer(struct rt6_info *rt, int create)
{ {
...@@ -72,70 +72,58 @@ static inline struct inet_peer *rt6_get_peer_create(struct rt6_info *rt) ...@@ -72,70 +72,58 @@ static inline struct inet_peer *rt6_get_peer_create(struct rt6_info *rt)
return __rt6_get_peer(rt, 1); return __rt6_get_peer(rt, 1);
} }
extern void ip6_route_input(struct sk_buff *skb); void ip6_route_input(struct sk_buff *skb);
extern struct dst_entry * ip6_route_output(struct net *net, struct dst_entry *ip6_route_output(struct net *net, const struct sock *sk,
const struct sock *sk,
struct flowi6 *fl6); struct flowi6 *fl6);
extern struct dst_entry * ip6_route_lookup(struct net *net, struct dst_entry *ip6_route_lookup(struct net *net, struct flowi6 *fl6,
struct flowi6 *fl6, int flags); int flags);
extern int ip6_route_init(void); int ip6_route_init(void);
extern void ip6_route_cleanup(void); void ip6_route_cleanup(void);
extern int ipv6_route_ioctl(struct net *net, int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg);
unsigned int cmd,
void __user *arg);
extern int ip6_route_add(struct fib6_config *cfg); int ip6_route_add(struct fib6_config *cfg);
extern int ip6_ins_rt(struct rt6_info *); int ip6_ins_rt(struct rt6_info *);
extern int ip6_del_rt(struct rt6_info *); int ip6_del_rt(struct rt6_info *);
extern int ip6_route_get_saddr(struct net *net, int ip6_route_get_saddr(struct net *net, struct rt6_info *rt,
struct rt6_info *rt, const struct in6_addr *daddr, unsigned int prefs,
const struct in6_addr *daddr,
unsigned int prefs,
struct in6_addr *saddr); struct in6_addr *saddr);
extern struct rt6_info *rt6_lookup(struct net *net, struct rt6_info *rt6_lookup(struct net *net, const struct in6_addr *daddr,
const struct in6_addr *daddr, const struct in6_addr *saddr, int oif, int flags);
const struct in6_addr *saddr,
int oif, int flags);
extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev, struct dst_entry *icmp6_dst_alloc(struct net_device *dev, struct flowi6 *fl6);
struct flowi6 *fl6); int icmp6_dst_gc(void);
extern int icmp6_dst_gc(void);
extern void fib6_force_start_gc(struct net *net); void fib6_force_start_gc(struct net *net);
extern struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
const struct in6_addr *addr, const struct in6_addr *addr, bool anycast);
bool anycast);
/* /*
* support functions for ND * support functions for ND
* *
*/ */
extern struct rt6_info * rt6_get_dflt_router(const struct in6_addr *addr, struct rt6_info *rt6_get_dflt_router(const struct in6_addr *addr,
struct net_device *dev); struct net_device *dev);
extern struct rt6_info * rt6_add_dflt_router(const struct in6_addr *gwaddr, struct rt6_info *rt6_add_dflt_router(const struct in6_addr *gwaddr,
struct net_device *dev, struct net_device *dev, unsigned int pref);
unsigned int pref);
extern void rt6_purge_dflt_routers(struct net *net); void rt6_purge_dflt_routers(struct net *net);
extern int rt6_route_rcv(struct net_device *dev, int rt6_route_rcv(struct net_device *dev, u8 *opt, int len,
u8 *opt, int len,
const struct in6_addr *gwaddr); const struct in6_addr *gwaddr);
extern void ip6_update_pmtu(struct sk_buff *skb, struct net *net, __be32 mtu, void ip6_update_pmtu(struct sk_buff *skb, struct net *net, __be32 mtu, int oif,
int oif, u32 mark); u32 mark);
extern void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu);
__be32 mtu); void ip6_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark);
extern void ip6_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark); void ip6_redirect_no_header(struct sk_buff *skb, struct net *net, int oif,
extern void ip6_redirect_no_header(struct sk_buff *skb, struct net *net, int oif,
u32 mark); u32 mark);
extern void ip6_sk_redirect(struct sk_buff *skb, struct sock *sk); void ip6_sk_redirect(struct sk_buff *skb, struct sock *sk);
struct netlink_callback; struct netlink_callback;
...@@ -145,10 +133,10 @@ struct rt6_rtnl_dump_arg { ...@@ -145,10 +133,10 @@ struct rt6_rtnl_dump_arg {
struct net *net; struct net *net;
}; };
extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); int rt6_dump_route(struct rt6_info *rt, void *p_arg);
extern void rt6_ifdown(struct net *net, struct net_device *dev); void rt6_ifdown(struct net *net, struct net_device *dev);
extern void rt6_mtu_change(struct net_device *dev, unsigned int mtu); void rt6_mtu_change(struct net_device *dev, unsigned int mtu);
extern void rt6_remove_prefsrc(struct inet6_ifaddr *ifp); void rt6_remove_prefsrc(struct inet6_ifaddr *ifp);
/* /*
......
...@@ -165,7 +165,7 @@ struct fib_result_nl { ...@@ -165,7 +165,7 @@ struct fib_result_nl {
#define FIB_TABLE_HASHSZ 2 #define FIB_TABLE_HASHSZ 2
#endif #endif
extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh);
#define FIB_RES_SADDR(net, res) \ #define FIB_RES_SADDR(net, res) \
((FIB_RES_NH(res).nh_saddr_genid == \ ((FIB_RES_NH(res).nh_saddr_genid == \
...@@ -187,14 +187,14 @@ struct fib_table { ...@@ -187,14 +187,14 @@ struct fib_table {
unsigned long tb_data[0]; unsigned long tb_data[0];
}; };
extern int fib_table_lookup(struct fib_table *tb, const struct flowi4 *flp, int fib_table_lookup(struct fib_table *tb, const struct flowi4 *flp,
struct fib_result *res, int fib_flags); struct fib_result *res, int fib_flags);
extern int fib_table_insert(struct fib_table *, struct fib_config *); int fib_table_insert(struct fib_table *, struct fib_config *);
extern int fib_table_delete(struct fib_table *, struct fib_config *); int fib_table_delete(struct fib_table *, struct fib_config *);
extern int fib_table_dump(struct fib_table *table, struct sk_buff *skb, int fib_table_dump(struct fib_table *table, struct sk_buff *skb,
struct netlink_callback *cb); struct netlink_callback *cb);
extern int fib_table_flush(struct fib_table *table); int fib_table_flush(struct fib_table *table);
extern void fib_free_table(struct fib_table *tb); void fib_free_table(struct fib_table *tb);
...@@ -234,14 +234,13 @@ static inline int fib_lookup(struct net *net, const struct flowi4 *flp, ...@@ -234,14 +234,13 @@ static inline int fib_lookup(struct net *net, const struct flowi4 *flp,
} }
#else /* CONFIG_IP_MULTIPLE_TABLES */ #else /* CONFIG_IP_MULTIPLE_TABLES */
extern int __net_init fib4_rules_init(struct net *net); int __net_init fib4_rules_init(struct net *net);
extern void __net_exit fib4_rules_exit(struct net *net); void __net_exit fib4_rules_exit(struct net *net);
extern struct fib_table *fib_new_table(struct net *net, u32 id); struct fib_table *fib_new_table(struct net *net, u32 id);
extern struct fib_table *fib_get_table(struct net *net, u32 id); struct fib_table *fib_get_table(struct net *net, u32 id);
extern int __fib_lookup(struct net *net, struct flowi4 *flp, int __fib_lookup(struct net *net, struct flowi4 *flp, struct fib_result *res);
struct fib_result *res);
static inline int fib_lookup(struct net *net, struct flowi4 *flp, static inline int fib_lookup(struct net *net, struct flowi4 *flp,
struct fib_result *res) struct fib_result *res)
...@@ -269,12 +268,12 @@ static inline int fib_lookup(struct net *net, struct flowi4 *flp, ...@@ -269,12 +268,12 @@ static inline int fib_lookup(struct net *net, struct flowi4 *flp,
/* Exported by fib_frontend.c */ /* Exported by fib_frontend.c */
extern const struct nla_policy rtm_ipv4_policy[]; extern const struct nla_policy rtm_ipv4_policy[];
extern void ip_fib_init(void); void ip_fib_init(void);
extern __be32 fib_compute_spec_dst(struct sk_buff *skb); __be32 fib_compute_spec_dst(struct sk_buff *skb);
extern int fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst, int fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst,
u8 tos, int oif, struct net_device *dev, u8 tos, int oif, struct net_device *dev,
struct in_device *idev, u32 *itag); struct in_device *idev, u32 *itag);
extern void fib_select_default(struct fib_result *res); void fib_select_default(struct fib_result *res);
#ifdef CONFIG_IP_ROUTE_CLASSID #ifdef CONFIG_IP_ROUTE_CLASSID
static inline int fib_num_tclassid_users(struct net *net) static inline int fib_num_tclassid_users(struct net *net)
{ {
...@@ -288,15 +287,15 @@ static inline int fib_num_tclassid_users(struct net *net) ...@@ -288,15 +287,15 @@ static inline int fib_num_tclassid_users(struct net *net)
#endif #endif
/* Exported by fib_semantics.c */ /* Exported by fib_semantics.c */
extern int ip_fib_check_default(__be32 gw, struct net_device *dev); int ip_fib_check_default(__be32 gw, struct net_device *dev);
extern int fib_sync_down_dev(struct net_device *dev, int force); int fib_sync_down_dev(struct net_device *dev, int force);
extern int fib_sync_down_addr(struct net *net, __be32 local); int fib_sync_down_addr(struct net *net, __be32 local);
extern int fib_sync_up(struct net_device *dev); int fib_sync_up(struct net_device *dev);
extern void fib_select_multipath(struct fib_result *res); void fib_select_multipath(struct fib_result *res);
/* Exported by fib_trie.c */ /* Exported by fib_trie.c */
extern void fib_trie_init(void); void fib_trie_init(void);
extern struct fib_table *fib_trie_table(u32 id); struct fib_table *fib_trie_table(u32 id);
static inline void fib_combine_itag(u32 *itag, const struct fib_result *res) static inline void fib_combine_itag(u32 *itag, const struct fib_result *res)
{ {
...@@ -314,7 +313,7 @@ static inline void fib_combine_itag(u32 *itag, const struct fib_result *res) ...@@ -314,7 +313,7 @@ static inline void fib_combine_itag(u32 *itag, const struct fib_result *res)
#endif #endif
} }
extern void free_fib_info(struct fib_info *fi); void free_fib_info(struct fib_info *fi);
static inline void fib_info_put(struct fib_info *fi) static inline void fib_info_put(struct fib_info *fi)
{ {
...@@ -323,8 +322,8 @@ static inline void fib_info_put(struct fib_info *fi) ...@@ -323,8 +322,8 @@ static inline void fib_info_put(struct fib_info *fi)
} }
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
extern int __net_init fib_proc_init(struct net *net); int __net_init fib_proc_init(struct net *net);
extern void __net_exit fib_proc_exit(struct net *net); void __net_exit fib_proc_exit(struct net *net);
#else #else
static inline int fib_proc_init(struct net *net) static inline int fib_proc_init(struct net *net)
{ {
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment