?? neighbour.h
字號(hào):
/* neighbout.h * linqianghe@163.com * 2006-09-26 */#ifndef INCLUDED_NEIGHBOUR_H#define INCLUDED_NEIGHBOUR_H#include "log.h"#include <net/neighbour.h>void myneigh_table_init( struct neigh_table *tbl );void myneigh_table_destroy( struct neigh_table *tbl );void myneigh_destroy( struct neighbour *neigh );void myneigh_parms_destroy( struct neigh_parms *parms );int __myneigh_event_send( struct neighbour *neigh, struct sk_buff *skb );int myneigh_connected_output(struct sk_buff *skb);int myneigh_compat_output( struct sk_buff *skb );int myneigh_resolve_output( struct sk_buff *skb );struct neighbour *myneigh_lookup( struct neigh_table *tbl, const void *pkey, struct net_device *dev );struct neighbour *myneigh_create( struct neigh_table *tbl, const void *pkey, struct net_device *dev );struct neigh_parms *myneigh_parms_alloc(struct net_device *dev, struct neigh_table *tbl);void myneigh_parms_release( struct neigh_table *tbl, struct neigh_parms *parms );int myneigh_ifdown( struct neigh_table *tbl, struct net_device *dev );static inline void myneigh_release(struct neighbour *neigh){ if( atomic_dec_and_test(&neigh->refcnt) ) myneigh_destroy( neigh );}static inline void myneigh_parms_put(struct neigh_parms *parms){ if (atomic_dec_and_test(&parms->refcnt)) myneigh_parms_destroy(parms);}static inline int myneigh_event_send(struct neighbour *neigh, struct sk_buff *skb){ neigh->used = jiffies; if( !(neigh->nud_state & (NUD_CONNECTED | NUD_DELAY | NUD_PROBE)) ) return __myneigh_event_send( neigh, skb ); return 0;}static inline struct neighbour * __myneigh_lookup_errno( struct neigh_table *tbl, const void *pkey, struct net_device *dev ){ struct neighbour *n = myneigh_lookup(tbl, pkey, dev); if (n) return n; return myneigh_create( tbl, pkey, dev );}static inline struct neigh_parms *myneigh_parms_clone(struct neigh_parms *parms){ atomic_inc(&parms->refcnt); return parms;}void __init myarp_init(void);void __exit myarp_exit(void);#endif //INCLUDED_NEIGHBOUR_H
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -