提交 90972b22 编写于 作者: J Joe Perches 提交者: David S. Miller

arp/neighbour.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.

Reflow modified prototypes to 80 columns.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 cd2cf63a
...@@ -46,22 +46,22 @@ static inline struct neighbour *__ipv4_neigh_lookup(struct net_device *dev, u32 ...@@ -46,22 +46,22 @@ static inline struct neighbour *__ipv4_neigh_lookup(struct net_device *dev, u32
return n; return n;
} }
extern void arp_init(void); void arp_init(void);
extern int arp_find(unsigned char *haddr, struct sk_buff *skb); int arp_find(unsigned char *haddr, struct sk_buff *skb);
extern int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg); int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg);
extern void arp_send(int type, int ptype, __be32 dest_ip, void arp_send(int type, int ptype, __be32 dest_ip,
struct net_device *dev, __be32 src_ip, struct net_device *dev, __be32 src_ip,
const unsigned char *dest_hw, const unsigned char *dest_hw,
const unsigned char *src_hw, const unsigned char *th); const unsigned char *src_hw, const unsigned char *th);
extern int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir); int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir);
extern void arp_ifdown(struct net_device *dev); void arp_ifdown(struct net_device *dev);
extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
struct net_device *dev, __be32 src_ip, struct net_device *dev, __be32 src_ip,
const unsigned char *dest_hw, const unsigned char *dest_hw,
const unsigned char *src_hw, const unsigned char *src_hw,
const unsigned char *target_hw); const unsigned char *target_hw);
extern void arp_xmit(struct sk_buff *skb); void arp_xmit(struct sk_buff *skb);
int arp_invalidate(struct net_device *dev, __be32 ip); int arp_invalidate(struct net_device *dev, __be32 ip);
#endif /* _ARP_H */ #endif /* _ARP_H */
...@@ -195,40 +195,36 @@ static inline void *neighbour_priv(const struct neighbour *n) ...@@ -195,40 +195,36 @@ static inline void *neighbour_priv(const struct neighbour *n)
#define NEIGH_UPDATE_F_ISROUTER 0x40000000 #define NEIGH_UPDATE_F_ISROUTER 0x40000000
#define NEIGH_UPDATE_F_ADMIN 0x80000000 #define NEIGH_UPDATE_F_ADMIN 0x80000000
extern void neigh_table_init(struct neigh_table *tbl); void neigh_table_init(struct neigh_table *tbl);
extern int neigh_table_clear(struct neigh_table *tbl); int neigh_table_clear(struct neigh_table *tbl);
extern struct neighbour * neigh_lookup(struct neigh_table *tbl, struct neighbour *neigh_lookup(struct neigh_table *tbl, const void *pkey,
const void *pkey,
struct net_device *dev); struct net_device *dev);
extern struct neighbour * neigh_lookup_nodev(struct neigh_table *tbl, struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net,
struct net *net,
const void *pkey); const void *pkey);
extern struct neighbour * __neigh_create(struct neigh_table *tbl, struct neighbour *__neigh_create(struct neigh_table *tbl, const void *pkey,
const void *pkey, struct net_device *dev, bool want_ref);
struct net_device *dev,
bool want_ref);
static inline struct neighbour *neigh_create(struct neigh_table *tbl, static inline struct neighbour *neigh_create(struct neigh_table *tbl,
const void *pkey, const void *pkey,
struct net_device *dev) struct net_device *dev)
{ {
return __neigh_create(tbl, pkey, dev, true); return __neigh_create(tbl, pkey, dev, true);
} }
extern void neigh_destroy(struct neighbour *neigh); void neigh_destroy(struct neighbour *neigh);
extern int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb); int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb);
extern int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, u32 flags);
u32 flags); void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev);
extern void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev); int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
extern int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev); int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb);
extern int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb); int neigh_connected_output(struct neighbour *neigh, struct sk_buff *skb);
extern int neigh_connected_output(struct neighbour *neigh, struct sk_buff *skb); int neigh_compat_output(struct neighbour *neigh, struct sk_buff *skb);
extern int neigh_compat_output(struct neighbour *neigh, struct sk_buff *skb); int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb);
extern int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb); struct neighbour *neigh_event_ns(struct neigh_table *tbl,
extern struct neighbour *neigh_event_ns(struct neigh_table *tbl,
u8 *lladdr, void *saddr, u8 *lladdr, void *saddr,
struct net_device *dev); struct net_device *dev);
extern struct neigh_parms *neigh_parms_alloc(struct net_device *dev, struct neigh_table *tbl); struct neigh_parms *neigh_parms_alloc(struct net_device *dev,
extern void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms); struct neigh_table *tbl);
void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms);
static inline static inline
struct net *neigh_parms_net(const struct neigh_parms *parms) struct net *neigh_parms_net(const struct neigh_parms *parms)
...@@ -236,27 +232,30 @@ struct net *neigh_parms_net(const struct neigh_parms *parms) ...@@ -236,27 +232,30 @@ struct net *neigh_parms_net(const struct neigh_parms *parms)
return read_pnet(&parms->net); return read_pnet(&parms->net);
} }
extern unsigned long neigh_rand_reach_time(unsigned long base); unsigned long neigh_rand_reach_time(unsigned long base);
extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p, void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p,
struct sk_buff *skb); struct sk_buff *skb);
extern struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev, int creat); struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net,
extern struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl, const void *key, struct net_device *dev,
struct net *net, int creat);
const void *key, struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl, struct net *net,
const void *key, struct net_device *dev);
int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key,
struct net_device *dev); struct net_device *dev);
extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev);
static inline static inline struct net *pneigh_net(const struct pneigh_entry *pneigh)
struct net *pneigh_net(const struct pneigh_entry *pneigh)
{ {
return read_pnet(&pneigh->net); return read_pnet(&pneigh->net);
} }
extern void neigh_app_ns(struct neighbour *n); void neigh_app_ns(struct neighbour *n);
extern void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie); void neigh_for_each(struct neigh_table *tbl,
extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct neighbour *)); void (*cb)(struct neighbour *, void *), void *cookie);
extern void pneigh_for_each(struct neigh_table *tbl, void (*cb)(struct pneigh_entry *)); void __neigh_for_each_release(struct neigh_table *tbl,
int (*cb)(struct neighbour *));
void pneigh_for_each(struct neigh_table *tbl,
void (*cb)(struct pneigh_entry *));
struct neigh_seq_state { struct neigh_seq_state {
struct seq_net_private p; struct seq_net_private p;
...@@ -270,15 +269,14 @@ struct neigh_seq_state { ...@@ -270,15 +269,14 @@ struct neigh_seq_state {
#define NEIGH_SEQ_IS_PNEIGH 0x00000002 #define NEIGH_SEQ_IS_PNEIGH 0x00000002
#define NEIGH_SEQ_SKIP_NOARP 0x00000004 #define NEIGH_SEQ_SKIP_NOARP 0x00000004
}; };
extern void *neigh_seq_start(struct seq_file *, loff_t *, struct neigh_table *, unsigned int); void *neigh_seq_start(struct seq_file *, loff_t *, struct neigh_table *,
extern void *neigh_seq_next(struct seq_file *, void *, loff_t *); unsigned int);
extern void neigh_seq_stop(struct seq_file *, void *); void *neigh_seq_next(struct seq_file *, void *, loff_t *);
void neigh_seq_stop(struct seq_file *, void *);
extern int neigh_sysctl_register(struct net_device *dev,
struct neigh_parms *p, int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
char *p_name, char *p_name, proc_handler *proc_handler);
proc_handler *proc_handler); void neigh_sysctl_unregister(struct neigh_parms *p);
extern void neigh_sysctl_unregister(struct neigh_parms *p);
static inline void __neigh_parms_put(struct neigh_parms *parms) static inline void __neigh_parms_put(struct neigh_parms *parms)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册