Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: mroute.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
#ifndef __LINUX_MROUTE_H
[1] Fix | Delete
#define __LINUX_MROUTE_H
[2] Fix | Delete
[3] Fix | Delete
#include <linux/sockios.h>
[4] Fix | Delete
#include <linux/types.h>
[5] Fix | Delete
#include <linux/in.h> /* For struct in_addr. */
[6] Fix | Delete
[7] Fix | Delete
/* Based on the MROUTING 3.5 defines primarily to keep
[8] Fix | Delete
* source compatibility with BSD.
[9] Fix | Delete
*
[10] Fix | Delete
* See the mrouted code for the original history.
[11] Fix | Delete
*
[12] Fix | Delete
* Protocol Independent Multicast (PIM) data structures included
[13] Fix | Delete
* Carlos Picoto (cap@di.fc.ul.pt)
[14] Fix | Delete
*/
[15] Fix | Delete
[16] Fix | Delete
#define MRT_BASE 200
[17] Fix | Delete
#define MRT_INIT (MRT_BASE) /* Activate the kernel mroute code */
[18] Fix | Delete
#define MRT_DONE (MRT_BASE+1) /* Shutdown the kernel mroute */
[19] Fix | Delete
#define MRT_ADD_VIF (MRT_BASE+2) /* Add a virtual interface */
[20] Fix | Delete
#define MRT_DEL_VIF (MRT_BASE+3) /* Delete a virtual interface */
[21] Fix | Delete
#define MRT_ADD_MFC (MRT_BASE+4) /* Add a multicast forwarding entry */
[22] Fix | Delete
#define MRT_DEL_MFC (MRT_BASE+5) /* Delete a multicast forwarding entry */
[23] Fix | Delete
#define MRT_VERSION (MRT_BASE+6) /* Get the kernel multicast version */
[24] Fix | Delete
#define MRT_ASSERT (MRT_BASE+7) /* Activate PIM assert mode */
[25] Fix | Delete
#define MRT_PIM (MRT_BASE+8) /* enable PIM code */
[26] Fix | Delete
#define MRT_TABLE (MRT_BASE+9) /* Specify mroute table ID */
[27] Fix | Delete
#define MRT_ADD_MFC_PROXY (MRT_BASE+10) /* Add a (*,*|G) mfc entry */
[28] Fix | Delete
#define MRT_DEL_MFC_PROXY (MRT_BASE+11) /* Del a (*,*|G) mfc entry */
[29] Fix | Delete
#define MRT_MAX (MRT_BASE+11)
[30] Fix | Delete
[31] Fix | Delete
#define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */
[32] Fix | Delete
#define SIOCGETSGCNT (SIOCPROTOPRIVATE+1)
[33] Fix | Delete
#define SIOCGETRPF (SIOCPROTOPRIVATE+2)
[34] Fix | Delete
[35] Fix | Delete
#define MAXVIFS 32
[36] Fix | Delete
typedef unsigned long vifbitmap_t; /* User mode code depends on this lot */
[37] Fix | Delete
typedef unsigned short vifi_t;
[38] Fix | Delete
#define ALL_VIFS ((vifi_t)(-1))
[39] Fix | Delete
[40] Fix | Delete
/* Same idea as select */
[41] Fix | Delete
[42] Fix | Delete
#define VIFM_SET(n,m) ((m)|=(1<<(n)))
[43] Fix | Delete
#define VIFM_CLR(n,m) ((m)&=~(1<<(n)))
[44] Fix | Delete
#define VIFM_ISSET(n,m) ((m)&(1<<(n)))
[45] Fix | Delete
#define VIFM_CLRALL(m) ((m)=0)
[46] Fix | Delete
#define VIFM_COPY(mfrom,mto) ((mto)=(mfrom))
[47] Fix | Delete
#define VIFM_SAME(m1,m2) ((m1)==(m2))
[48] Fix | Delete
[49] Fix | Delete
/* Passed by mrouted for an MRT_ADD_VIF - again we use the
[50] Fix | Delete
* mrouted 3.6 structures for compatibility
[51] Fix | Delete
*/
[52] Fix | Delete
struct vifctl {
[53] Fix | Delete
vifi_t vifc_vifi; /* Index of VIF */
[54] Fix | Delete
unsigned char vifc_flags; /* VIFF_ flags */
[55] Fix | Delete
unsigned char vifc_threshold; /* ttl limit */
[56] Fix | Delete
unsigned int vifc_rate_limit; /* Rate limiter values (NI) */
[57] Fix | Delete
union {
[58] Fix | Delete
struct in_addr vifc_lcl_addr; /* Local interface address */
[59] Fix | Delete
int vifc_lcl_ifindex; /* Local interface index */
[60] Fix | Delete
};
[61] Fix | Delete
struct in_addr vifc_rmt_addr; /* IPIP tunnel addr */
[62] Fix | Delete
};
[63] Fix | Delete
[64] Fix | Delete
#define VIFF_TUNNEL 0x1 /* IPIP tunnel */
[65] Fix | Delete
#define VIFF_SRCRT 0x2 /* NI */
[66] Fix | Delete
#define VIFF_REGISTER 0x4 /* register vif */
[67] Fix | Delete
#define VIFF_USE_IFINDEX 0x8 /* use vifc_lcl_ifindex instead of
[68] Fix | Delete
vifc_lcl_addr to find an interface */
[69] Fix | Delete
[70] Fix | Delete
/* Cache manipulation structures for mrouted and PIMd */
[71] Fix | Delete
struct mfcctl {
[72] Fix | Delete
struct in_addr mfcc_origin; /* Origin of mcast */
[73] Fix | Delete
struct in_addr mfcc_mcastgrp; /* Group in question */
[74] Fix | Delete
vifi_t mfcc_parent; /* Where it arrived */
[75] Fix | Delete
unsigned char mfcc_ttls[MAXVIFS]; /* Where it is going */
[76] Fix | Delete
unsigned int mfcc_pkt_cnt; /* pkt count for src-grp */
[77] Fix | Delete
unsigned int mfcc_byte_cnt;
[78] Fix | Delete
unsigned int mfcc_wrong_if;
[79] Fix | Delete
int mfcc_expire;
[80] Fix | Delete
};
[81] Fix | Delete
[82] Fix | Delete
/* Group count retrieval for mrouted */
[83] Fix | Delete
struct sioc_sg_req {
[84] Fix | Delete
struct in_addr src;
[85] Fix | Delete
struct in_addr grp;
[86] Fix | Delete
unsigned long pktcnt;
[87] Fix | Delete
unsigned long bytecnt;
[88] Fix | Delete
unsigned long wrong_if;
[89] Fix | Delete
};
[90] Fix | Delete
[91] Fix | Delete
/* To get vif packet counts */
[92] Fix | Delete
struct sioc_vif_req {
[93] Fix | Delete
vifi_t vifi; /* Which iface */
[94] Fix | Delete
unsigned long icount; /* In packets */
[95] Fix | Delete
unsigned long ocount; /* Out packets */
[96] Fix | Delete
unsigned long ibytes; /* In bytes */
[97] Fix | Delete
unsigned long obytes; /* Out bytes */
[98] Fix | Delete
};
[99] Fix | Delete
[100] Fix | Delete
/* This is the format the mroute daemon expects to see IGMP control
[101] Fix | Delete
* data. Magically happens to be like an IP packet as per the original
[102] Fix | Delete
*/
[103] Fix | Delete
struct igmpmsg {
[104] Fix | Delete
__u32 unused1,unused2;
[105] Fix | Delete
unsigned char im_msgtype; /* What is this */
[106] Fix | Delete
unsigned char im_mbz; /* Must be zero */
[107] Fix | Delete
unsigned char im_vif; /* Interface (this ought to be a vifi_t!) */
[108] Fix | Delete
unsigned char unused3;
[109] Fix | Delete
struct in_addr im_src,im_dst;
[110] Fix | Delete
};
[111] Fix | Delete
[112] Fix | Delete
/* ipmr netlink table attributes */
[113] Fix | Delete
enum {
[114] Fix | Delete
IPMRA_TABLE_UNSPEC,
[115] Fix | Delete
IPMRA_TABLE_ID,
[116] Fix | Delete
IPMRA_TABLE_CACHE_RES_QUEUE_LEN,
[117] Fix | Delete
IPMRA_TABLE_MROUTE_REG_VIF_NUM,
[118] Fix | Delete
IPMRA_TABLE_MROUTE_DO_ASSERT,
[119] Fix | Delete
IPMRA_TABLE_MROUTE_DO_PIM,
[120] Fix | Delete
IPMRA_TABLE_VIFS,
[121] Fix | Delete
__IPMRA_TABLE_MAX
[122] Fix | Delete
};
[123] Fix | Delete
#define IPMRA_TABLE_MAX (__IPMRA_TABLE_MAX - 1)
[124] Fix | Delete
[125] Fix | Delete
/* ipmr netlink vif attribute format
[126] Fix | Delete
* [ IPMRA_TABLE_VIFS ] - nested attribute
[127] Fix | Delete
* [ IPMRA_VIF ] - nested attribute
[128] Fix | Delete
* [ IPMRA_VIFA_xxx ]
[129] Fix | Delete
*/
[130] Fix | Delete
enum {
[131] Fix | Delete
IPMRA_VIF_UNSPEC,
[132] Fix | Delete
IPMRA_VIF,
[133] Fix | Delete
__IPMRA_VIF_MAX
[134] Fix | Delete
};
[135] Fix | Delete
#define IPMRA_VIF_MAX (__IPMRA_VIF_MAX - 1)
[136] Fix | Delete
[137] Fix | Delete
/* vif-specific attributes */
[138] Fix | Delete
enum {
[139] Fix | Delete
IPMRA_VIFA_UNSPEC,
[140] Fix | Delete
IPMRA_VIFA_IFINDEX,
[141] Fix | Delete
IPMRA_VIFA_VIF_ID,
[142] Fix | Delete
IPMRA_VIFA_FLAGS,
[143] Fix | Delete
IPMRA_VIFA_BYTES_IN,
[144] Fix | Delete
IPMRA_VIFA_BYTES_OUT,
[145] Fix | Delete
IPMRA_VIFA_PACKETS_IN,
[146] Fix | Delete
IPMRA_VIFA_PACKETS_OUT,
[147] Fix | Delete
IPMRA_VIFA_LOCAL_ADDR,
[148] Fix | Delete
IPMRA_VIFA_REMOTE_ADDR,
[149] Fix | Delete
IPMRA_VIFA_PAD,
[150] Fix | Delete
__IPMRA_VIFA_MAX
[151] Fix | Delete
};
[152] Fix | Delete
#define IPMRA_VIFA_MAX (__IPMRA_VIFA_MAX - 1)
[153] Fix | Delete
[154] Fix | Delete
/* ipmr netlink cache report attributes */
[155] Fix | Delete
enum {
[156] Fix | Delete
IPMRA_CREPORT_UNSPEC,
[157] Fix | Delete
IPMRA_CREPORT_MSGTYPE,
[158] Fix | Delete
IPMRA_CREPORT_VIF_ID,
[159] Fix | Delete
IPMRA_CREPORT_SRC_ADDR,
[160] Fix | Delete
IPMRA_CREPORT_DST_ADDR,
[161] Fix | Delete
IPMRA_CREPORT_PKT,
[162] Fix | Delete
__IPMRA_CREPORT_MAX
[163] Fix | Delete
};
[164] Fix | Delete
#define IPMRA_CREPORT_MAX (__IPMRA_CREPORT_MAX - 1)
[165] Fix | Delete
[166] Fix | Delete
/* That's all usermode folks */
[167] Fix | Delete
[168] Fix | Delete
#define MFC_ASSERT_THRESH (3*HZ) /* Maximal freq. of asserts */
[169] Fix | Delete
[170] Fix | Delete
/* Pseudo messages used by mrouted */
[171] Fix | Delete
#define IGMPMSG_NOCACHE 1 /* Kern cache fill request to mrouted */
[172] Fix | Delete
#define IGMPMSG_WRONGVIF 2 /* For PIM assert processing (unused) */
[173] Fix | Delete
#define IGMPMSG_WHOLEPKT 3 /* For PIM Register processing */
[174] Fix | Delete
[175] Fix | Delete
#endif /* __LINUX_MROUTE_H */
[176] Fix | Delete
[177] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function