aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-06-27 04:28:10 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-11 01:15:56 -0400
commit4417da668c0021903464f92db278ddae348e0299 (patch)
treea4330cbc2e69a5714fee0a04bcfbabe97109de46 /include/linux/netdevice.h
parent3fba5a8b1e3df2384b90493538161e83cf15dd5f (diff)
[NET]: dev: secondary unicast address support
Add support for configuring secondary unicast addresses on network devices. To support this devices capable of filtering multiple unicast addresses need to change their set_multicast_list function to configure unicast filters as well and assign it to dev->set_rx_mode instead of dev->set_multicast_list. Other devices are put into promiscous mode when secondary unicast addresses are present. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9e114e77e54d..2c0cc19edfb2 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -397,6 +397,9 @@ struct net_device
397 unsigned char addr_len; /* hardware address length */ 397 unsigned char addr_len; /* hardware address length */
398 unsigned short dev_id; /* for shared network cards */ 398 unsigned short dev_id; /* for shared network cards */
399 399
400 struct dev_addr_list *uc_list; /* Secondary unicast mac addresses */
401 int uc_count; /* Number of installed ucasts */
402 int uc_promisc;
400 struct dev_addr_list *mc_list; /* Multicast mac addresses */ 403 struct dev_addr_list *mc_list; /* Multicast mac addresses */
401 int mc_count; /* Number of installed mcasts */ 404 int mc_count; /* Number of installed mcasts */
402 int promiscuity; 405 int promiscuity;
@@ -502,6 +505,8 @@ struct net_device
502 void *saddr, 505 void *saddr,
503 unsigned len); 506 unsigned len);
504 int (*rebuild_header)(struct sk_buff *skb); 507 int (*rebuild_header)(struct sk_buff *skb);
508#define HAVE_SET_RX_MODE
509 void (*set_rx_mode)(struct net_device *dev);
505#define HAVE_MULTICAST 510#define HAVE_MULTICAST
506 void (*set_multicast_list)(struct net_device *dev); 511 void (*set_multicast_list)(struct net_device *dev);
507#define HAVE_SET_MAC_ADDR 512#define HAVE_SET_MAC_ADDR
@@ -1008,8 +1013,11 @@ extern struct net_device *alloc_netdev(int sizeof_priv, const char *name,
1008 void (*setup)(struct net_device *)); 1013 void (*setup)(struct net_device *));
1009extern int register_netdev(struct net_device *dev); 1014extern int register_netdev(struct net_device *dev);
1010extern void unregister_netdev(struct net_device *dev); 1015extern void unregister_netdev(struct net_device *dev);
1011/* Functions used for multicast support */ 1016/* Functions used for secondary unicast and multicast support */
1012extern void dev_mc_upload(struct net_device *dev); 1017extern void dev_set_rx_mode(struct net_device *dev);
1018extern void __dev_set_rx_mode(struct net_device *dev);
1019extern int dev_unicast_delete(struct net_device *dev, void *addr, int alen);
1020extern int dev_unicast_add(struct net_device *dev, void *addr, int alen);
1013extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); 1021extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all);
1014extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); 1022extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly);
1015extern void dev_mc_discard(struct net_device *dev); 1023extern void dev_mc_discard(struct net_device *dev);