Warning: This file is not a C or C++ file. It does not have highlighting.

1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * File: pn_dev.h
4 *
5 * Phonet network device
6 *
7 * Copyright (C) 2008 Nokia Corporation.
8 */
9
10#ifndef PN_DEV_H
11#define PN_DEV_H
12
13#include <linux/list.h>
14#include <linux/mutex.h>
15
16struct net;
17
18struct phonet_device_list {
19 struct list_head list;
20 struct mutex lock;
21};
22
23struct phonet_device_list *phonet_device_list(struct net *net);
24
25struct phonet_device {
26 struct list_head list;
27 struct net_device *netdev;
28 DECLARE_BITMAP(addrs, 64);
29 struct rcu_head rcu;
30};
31
32int phonet_device_init(void);
33void phonet_device_exit(void);
34int phonet_netlink_register(void);
35struct net_device *phonet_device_get(struct net *net);
36
37int phonet_address_add(struct net_device *dev, u8 addr);
38int phonet_address_del(struct net_device *dev, u8 addr);
39u8 phonet_address_get(struct net_device *dev, u8 addr);
40int phonet_address_lookup(struct net *net, u8 addr);
41void phonet_address_notify(int event, struct net_device *dev, u8 addr);
42
43int phonet_route_add(struct net_device *dev, u8 daddr);
44int phonet_route_del(struct net_device *dev, u8 daddr);
45void rtm_phonet_notify(int event, struct net_device *dev, u8 dst);
46struct net_device *phonet_route_get_rcu(struct net *net, u8 daddr);
47struct net_device *phonet_route_output(struct net *net, u8 daddr);
48
49#define PN_NO_ADDR 0xff
50
51extern const struct seq_operations pn_sock_seq_ops;
52extern const struct seq_operations pn_res_seq_ops;
53
54#endif
55

Warning: This file is not a C or C++ file. It does not have highlighting.

source code of linux/include/net/phonet/pn_dev.h