]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - include/linux/mroute_base.h
ip6mr: Align hash implementation to ipmr
[mirror_ubuntu-jammy-kernel.git] / include / linux / mroute_base.h
CommitLineData
6853f21f
YM
1#ifndef __LINUX_MROUTE_BASE_H
2#define __LINUX_MROUTE_BASE_H
3
4#include <linux/netdevice.h>
5
6/**
7 * struct vif_device - interface representor for multicast routing
8 * @dev: network device being used
9 * @bytes_in: statistic; bytes ingressing
10 * @bytes_out: statistic; bytes egresing
11 * @pkt_in: statistic; packets ingressing
12 * @pkt_out: statistic; packets egressing
13 * @rate_limit: Traffic shaping (NI)
14 * @threshold: TTL threshold
15 * @flags: Control flags
16 * @link: Physical interface index
17 * @dev_parent_id: device parent id
18 * @local: Local address
19 * @remote: Remote address for tunnels
20 */
21struct vif_device {
22 struct net_device *dev;
23 unsigned long bytes_in, bytes_out;
24 unsigned long pkt_in, pkt_out;
25 unsigned long rate_limit;
26 unsigned char threshold;
27 unsigned short flags;
28 int link;
29
30 /* Currently only used by ipmr */
31 struct netdev_phys_item_id dev_parent_id;
32 __be32 local, remote;
33};
34
35#ifdef CONFIG_IP_MROUTE_COMMON
36void vif_device_init(struct vif_device *v,
37 struct net_device *dev,
38 unsigned long rate_limit,
39 unsigned char threshold,
40 unsigned short flags,
41 unsigned short get_iflink_mask);
42#else
43static inline void vif_device_init(struct vif_device *v,
44 struct net_device *dev,
45 unsigned long rate_limit,
46 unsigned char threshold,
47 unsigned short flags,
48 unsigned short get_iflink_mask)
49{
50}
51#endif
52#endif