[NET]: dev: introduce generic net_device address lists
Introduce struct dev_addr_list and list maintenance functions based on dev_mc_list and the related functions. This will be used by follow-up patches for both multicast and secondary unicast addresses. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
75ebe8f736
commit
bf742482d7
@@ -177,6 +177,14 @@ struct netif_rx_stats
|
||||
|
||||
DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat);
|
||||
|
||||
struct dev_addr_list
|
||||
{
|
||||
struct dev_addr_list *next;
|
||||
u8 da_addr[MAX_ADDR_LEN];
|
||||
u8 da_addrlen;
|
||||
int da_users;
|
||||
int da_gusers;
|
||||
};
|
||||
|
||||
/*
|
||||
* We tag multicasts with these structures.
|
||||
@@ -1008,6 +1016,9 @@ extern void dev_mc_upload(struct net_device *dev);
|
||||
extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all);
|
||||
extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly);
|
||||
extern void dev_mc_discard(struct net_device *dev);
|
||||
extern int __dev_addr_delete(struct dev_addr_list **list, void *addr, int alen, int all);
|
||||
extern int __dev_addr_add(struct dev_addr_list **list, void *addr, int alen, int newonly);
|
||||
extern void __dev_addr_discard(struct dev_addr_list **list);
|
||||
extern void dev_set_promiscuity(struct net_device *dev, int inc);
|
||||
extern void dev_set_allmulti(struct net_device *dev, int inc);
|
||||
extern void netdev_state_change(struct net_device *dev);
|
||||
|
Reference in New Issue
Block a user