Displaying 1 result from an estimated 1 matches for "bridge_fdb_init".
2007 Apr 18
1
[Bridge] A question about modify bridge source
....
Sorry my english is so poor:)
Thanks !
//my own bridge struct
struct Bridge{
rwlock_t lock;
rwlock_t hash_lock;
struct net_device dev;
struct Bridge_fdb_entry *hash[BR_HASH_SIZE];
};
extern struct Bridge *brg;
//the bridge initiation , will be called in module_init
struct Bridge *Bridge_fdb_init()
{
struct Bridge *br;
if ((br = kmalloc(sizeof(*br),GFP_KERNEL)) == NULL)
return NULL;
memset(br,0,sizeof(*br));
strncpy(br->dev.name,"BRIDGE",IFNAMSIZ);
ether_setup(&br->dev);
Bridge_dev_setup(&br->dev);
br->lock = RW_LOCK_UNLOCKED;
br->hash_lock =...