1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Phonet network device
7 * Copyright (C) 2008 Nokia Corporation.
13 #include <linux/list.h>
14 #include <linux/spinlock.h>
18 struct phonet_device_list {
19 struct list_head list;
23 struct phonet_device_list *phonet_device_list(struct net *net);
25 struct phonet_device {
26 struct list_head list;
27 struct net_device *netdev;
28 DECLARE_BITMAP(addrs, 64);
32 int phonet_device_init(void);
33 void phonet_device_exit(void);
34 int phonet_netlink_register(void);
35 struct net_device *phonet_device_get(struct net *net);
37 int phonet_address_add(struct net_device *dev, u8 addr);
38 int phonet_address_del(struct net_device *dev, u8 addr);
39 u8 phonet_address_get(struct net_device *dev, u8 addr);
40 int phonet_address_lookup(struct net *net, u8 addr);
41 void phonet_address_notify(struct net *net, int event, u32 ifindex, u8 addr);
43 int phonet_route_add(struct net_device *dev, u8 daddr);
44 int phonet_route_del(struct net_device *dev, u8 daddr);
45 void rtm_phonet_notify(struct net *net, int event, u32 ifindex, u8 dst);
46 struct net_device *phonet_route_get_rcu(struct net *net, u8 daddr);
47 struct net_device *phonet_route_output(struct net *net, u8 daddr);
49 #define PN_NO_ADDR 0xff
51 extern const struct seq_operations pn_sock_seq_ops;
52 extern const struct seq_operations pn_res_seq_ops;