0001
0002
0003
0004
0005
0006
0007 #ifndef _NET_BATMAN_ADV_SOFT_INTERFACE_H_
0008 #define _NET_BATMAN_ADV_SOFT_INTERFACE_H_
0009
0010 #include "main.h"
0011
0012 #include <linux/kref.h>
0013 #include <linux/netdevice.h>
0014 #include <linux/skbuff.h>
0015 #include <linux/types.h>
0016 #include <net/rtnetlink.h>
0017
0018 int batadv_skb_head_push(struct sk_buff *skb, unsigned int len);
0019 void batadv_interface_rx(struct net_device *soft_iface,
0020 struct sk_buff *skb, int hdr_size,
0021 struct batadv_orig_node *orig_node);
0022 bool batadv_softif_is_valid(const struct net_device *net_dev);
0023 extern struct rtnl_link_ops batadv_link_ops;
0024 int batadv_softif_create_vlan(struct batadv_priv *bat_priv, unsigned short vid);
0025 void batadv_softif_vlan_release(struct kref *ref);
0026 struct batadv_softif_vlan *batadv_softif_vlan_get(struct batadv_priv *bat_priv,
0027 unsigned short vid);
0028
0029
0030
0031
0032
0033
0034 static inline void batadv_softif_vlan_put(struct batadv_softif_vlan *vlan)
0035 {
0036 if (!vlan)
0037 return;
0038
0039 kref_put(&vlan->refcount, batadv_softif_vlan_release);
0040 }
0041
0042 #endif