~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/net/bridge/br.c

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *      Generic parts
  3  *      Linux ethernet bridge
  4  *
  5  *      Authors:
  6  *      Lennert Buytenhek               <buytenh@gnu.org>
  7  *
  8  *      $Id: br.c,v 1.45 2000/10/22 18:26:07 davem Exp $
  9  *
 10  *      This program is free software; you can redistribute it and/or
 11  *      modify it under the terms of the GNU General Public License
 12  *      as published by the Free Software Foundation; either version
 13  *      2 of the License, or (at your option) any later version.
 14  */
 15 
 16 #include <linux/config.h>
 17 #include <linux/module.h>
 18 #include <linux/kernel.h>
 19 #include <linux/miscdevice.h>
 20 #include <linux/netdevice.h>
 21 #include <linux/etherdevice.h>
 22 #include <linux/init.h>
 23 #include <linux/if_bridge.h>
 24 #include <asm/uaccess.h>
 25 #include "br_private.h"
 26 
 27 #if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
 28 #include "../atm/lec.h"
 29 #endif
 30 
 31 void br_dec_use_count()
 32 {
 33         MOD_DEC_USE_COUNT;
 34 }
 35 
 36 void br_inc_use_count()
 37 {
 38         MOD_INC_USE_COUNT;
 39 }
 40 
 41 static int __init br_init(void)
 42 {
 43         printk(KERN_INFO "NET4: Ethernet Bridge 008 for NET4.0\n");
 44 
 45         br_handle_frame_hook = br_handle_frame;
 46 #ifdef CONFIG_INET
 47         br_ioctl_hook = br_ioctl_deviceless_stub;
 48 #endif
 49 #if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
 50         br_fdb_get_hook = br_fdb_get;
 51         br_fdb_put_hook = br_fdb_put;
 52 #endif
 53         register_netdevice_notifier(&br_device_notifier);
 54 
 55         return 0;
 56 }
 57 
 58 static void __br_clear_frame_hook(void)
 59 {
 60         br_handle_frame_hook = NULL;
 61 }
 62 
 63 static void __br_clear_ioctl_hook(void)
 64 {
 65 #ifdef CONFIG_INET
 66         br_ioctl_hook = NULL;
 67 #endif  
 68 }
 69 
 70 static void __exit br_deinit(void)
 71 {
 72         unregister_netdevice_notifier(&br_device_notifier);
 73         br_call_ioctl_atomic(__br_clear_ioctl_hook);
 74         net_call_rx_atomic(__br_clear_frame_hook);
 75 #if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
 76         br_fdb_get_hook = NULL;
 77         br_fdb_put_hook = NULL;
 78 #endif
 79 }
 80 
 81 EXPORT_NO_SYMBOLS;
 82 
 83 module_init(br_init)
 84 module_exit(br_deinit)
 85 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.