Phonet: publicize the Netlink notification function
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
11687a1099
commit
c7a1a4c80f
@@ -45,6 +45,7 @@ int phonet_address_add(struct net_device *dev, u8 addr);
|
|||||||
int phonet_address_del(struct net_device *dev, u8 addr);
|
int phonet_address_del(struct net_device *dev, u8 addr);
|
||||||
u8 phonet_address_get(struct net_device *dev, u8 addr);
|
u8 phonet_address_get(struct net_device *dev, u8 addr);
|
||||||
int phonet_address_lookup(struct net *net, u8 addr);
|
int phonet_address_lookup(struct net *net, u8 addr);
|
||||||
|
void phonet_address_notify(int event, struct net_device *dev, u8 addr);
|
||||||
|
|
||||||
#define PN_NO_ADDR 0xff
|
#define PN_NO_ADDR 0xff
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
static int fill_addr(struct sk_buff *skb, struct net_device *dev, u8 addr,
|
static int fill_addr(struct sk_buff *skb, struct net_device *dev, u8 addr,
|
||||||
u32 pid, u32 seq, int event);
|
u32 pid, u32 seq, int event);
|
||||||
|
|
||||||
static void rtmsg_notify(int event, struct net_device *dev, u8 addr)
|
void phonet_address_notify(int event, struct net_device *dev, u8 addr)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
int err = -ENOBUFS;
|
int err = -ENOBUFS;
|
||||||
@@ -94,7 +94,7 @@ static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *attr)
|
|||||||
else
|
else
|
||||||
err = phonet_address_del(dev, pnaddr);
|
err = phonet_address_del(dev, pnaddr);
|
||||||
if (!err)
|
if (!err)
|
||||||
rtmsg_notify(nlh->nlmsg_type, dev, pnaddr);
|
phonet_address_notify(nlh->nlmsg_type, dev, pnaddr);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user