--- zzzz-none-000/linux-2.6.13.1/net/core/dev_mcast.c 2005-09-10 02:42:58.000000000 +0000 +++ ohio-7170-487/linux-2.6.13.1/net/core/dev_mcast.c 2007-08-17 12:10:39.000000000 +0000 @@ -1,12 +1,12 @@ /* - * Linux NET3: Multicast List maintenance. + * Linux NET3: Multicast List maintenance. * * Authors: - * Tim Kordas + * Tim Kordas * Richard Underwood * * Stir fried together from the IP multicast and CAP patches above - * Alan Cox + * Alan Cox * * Fixes: * Alan Cox : Update the device on a real delete @@ -21,8 +21,8 @@ * 2 of the License, or (at your option) any later version. */ -#include -#include +#include +#include #include #include #include @@ -51,11 +51,11 @@ /* - * Device multicast list maintenance. + * Device multicast list maintenance. * - * This is used both by IP and by the user level maintenance functions. - * Unlike BSD we maintain a usage count on a given multicast address so - * that a casual user application can add/delete multicasts used by + * This is used both by IP and by the user level maintenance functions. + * Unlike BSD we maintain a usage count on a given multicast address so + * that a casual user application can add/delete multicasts used by * protocols without doing damage to the protocols when it deletes the * entries. It also helps IP as it tracks overlapping maps. * @@ -68,7 +68,7 @@ /* * Update the multicast list into the physical NIC controller. */ - + static void __dev_mc_upload(struct net_device *dev) { /* Don't do anything till we up the interface @@ -101,7 +101,7 @@ /* * Delete a device level multicast */ - + int dev_mc_delete(struct net_device *dev, void *addr, int alen, int glbl) { int err = 0; @@ -138,7 +138,7 @@ * loaded filter is now wrong. Fix it */ __dev_mc_upload(dev); - + spin_unlock_bh(&dev->xmit_lock); return 0; } @@ -152,7 +152,7 @@ /* * Add a device level multicast */ - + int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl) { int err = 0; @@ -188,7 +188,7 @@ dev->mc_count++; __dev_mc_upload(dev); - + spin_unlock_bh(&dev->xmit_lock); return 0; @@ -206,7 +206,7 @@ void dev_mc_discard(struct net_device *dev) { spin_lock_bh(&dev->xmit_lock); - + while (dev->mc_list != NULL) { struct dev_mc_list *tmp = dev->mc_list; dev->mc_list = tmp->next; @@ -227,7 +227,7 @@ read_lock(&dev_base_lock); for (dev = dev_base; dev; dev = dev->next) { - if (off++ == *pos) + if (off++ == *pos) return dev; } return NULL; @@ -289,10 +289,12 @@ #endif +#if defined(CONFIG_PROC_FS) void __init dev_mcast_init(void) { proc_net_fops_create("dev_mcast", 0, &dev_mc_seq_fops); } +#endif /*--- #if defined(CONFIG_PROC_FS) ---*/ EXPORT_SYMBOL(dev_mc_add); EXPORT_SYMBOL(dev_mc_delete);