Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux
File: mroute6.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
#ifndef __LINUX_MROUTE6_H
[1] Fix | Delete
#define __LINUX_MROUTE6_H
[2] Fix | Delete
[3] Fix | Delete
#include <linux/kernel.h>
[4] Fix | Delete
#include <linux/types.h>
[5] Fix | Delete
#include <linux/sockios.h>
[6] Fix | Delete
#include <linux/in6.h> /* For struct sockaddr_in6. */
[7] Fix | Delete
[8] Fix | Delete
/*
[9] Fix | Delete
* Based on the MROUTING 3.5 defines primarily to keep
[10] Fix | Delete
* source compatibility with BSD.
[11] Fix | Delete
*
[12] Fix | Delete
* See the pim6sd code for the original history.
[13] Fix | Delete
*
[14] Fix | Delete
* Protocol Independent Multicast (PIM) data structures included
[15] Fix | Delete
* Carlos Picoto (cap@di.fc.ul.pt)
[16] Fix | Delete
*
[17] Fix | Delete
*/
[18] Fix | Delete
[19] Fix | Delete
#define MRT6_BASE 200
[20] Fix | Delete
#define MRT6_INIT (MRT6_BASE) /* Activate the kernel mroute code */
[21] Fix | Delete
#define MRT6_DONE (MRT6_BASE+1) /* Shutdown the kernel mroute */
[22] Fix | Delete
#define MRT6_ADD_MIF (MRT6_BASE+2) /* Add a virtual interface */
[23] Fix | Delete
#define MRT6_DEL_MIF (MRT6_BASE+3) /* Delete a virtual interface */
[24] Fix | Delete
#define MRT6_ADD_MFC (MRT6_BASE+4) /* Add a multicast forwarding entry */
[25] Fix | Delete
#define MRT6_DEL_MFC (MRT6_BASE+5) /* Delete a multicast forwarding entry */
[26] Fix | Delete
#define MRT6_VERSION (MRT6_BASE+6) /* Get the kernel multicast version */
[27] Fix | Delete
#define MRT6_ASSERT (MRT6_BASE+7) /* Activate PIM assert mode */
[28] Fix | Delete
#define MRT6_PIM (MRT6_BASE+8) /* enable PIM code */
[29] Fix | Delete
#define MRT6_TABLE (MRT6_BASE+9) /* Specify mroute table ID */
[30] Fix | Delete
#define MRT6_ADD_MFC_PROXY (MRT6_BASE+10) /* Add a (*,*|G) mfc entry */
[31] Fix | Delete
#define MRT6_DEL_MFC_PROXY (MRT6_BASE+11) /* Del a (*,*|G) mfc entry */
[32] Fix | Delete
#define MRT6_MAX (MRT6_BASE+11)
[33] Fix | Delete
[34] Fix | Delete
#define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE /* IP protocol privates */
[35] Fix | Delete
#define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1)
[36] Fix | Delete
#define SIOCGETRPF (SIOCPROTOPRIVATE+2)
[37] Fix | Delete
[38] Fix | Delete
#define MAXMIFS 32
[39] Fix | Delete
typedef unsigned long mifbitmap_t; /* User mode code depends on this lot */
[40] Fix | Delete
typedef unsigned short mifi_t;
[41] Fix | Delete
#define ALL_MIFS ((mifi_t)(-1))
[42] Fix | Delete
[43] Fix | Delete
#ifndef IF_SETSIZE
[44] Fix | Delete
#define IF_SETSIZE 256
[45] Fix | Delete
#endif
[46] Fix | Delete
[47] Fix | Delete
typedef __u32 if_mask;
[48] Fix | Delete
#define NIFBITS (sizeof(if_mask) * 8) /* bits per mask */
[49] Fix | Delete
[50] Fix | Delete
typedef struct if_set {
[51] Fix | Delete
if_mask ifs_bits[__KERNEL_DIV_ROUND_UP(IF_SETSIZE, NIFBITS)];
[52] Fix | Delete
} if_set;
[53] Fix | Delete
[54] Fix | Delete
#define IF_SET(n, p) ((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS)))
[55] Fix | Delete
#define IF_CLR(n, p) ((p)->ifs_bits[(n)/NIFBITS] &= ~(1 << ((n) % NIFBITS)))
[56] Fix | Delete
#define IF_ISSET(n, p) ((p)->ifs_bits[(n)/NIFBITS] & (1 << ((n) % NIFBITS)))
[57] Fix | Delete
#define IF_COPY(f, t) bcopy(f, t, sizeof(*(f)))
[58] Fix | Delete
#define IF_ZERO(p) bzero(p, sizeof(*(p)))
[59] Fix | Delete
[60] Fix | Delete
/*
[61] Fix | Delete
* Passed by mrouted for an MRT_ADD_MIF - again we use the
[62] Fix | Delete
* mrouted 3.6 structures for compatibility
[63] Fix | Delete
*/
[64] Fix | Delete
[65] Fix | Delete
struct mif6ctl {
[66] Fix | Delete
mifi_t mif6c_mifi; /* Index of MIF */
[67] Fix | Delete
unsigned char mif6c_flags; /* MIFF_ flags */
[68] Fix | Delete
unsigned char vifc_threshold; /* ttl limit */
[69] Fix | Delete
__u16 mif6c_pifi; /* the index of the physical IF */
[70] Fix | Delete
unsigned int vifc_rate_limit; /* Rate limiter values (NI) */
[71] Fix | Delete
};
[72] Fix | Delete
[73] Fix | Delete
#define MIFF_REGISTER 0x1 /* register vif */
[74] Fix | Delete
[75] Fix | Delete
/*
[76] Fix | Delete
* Cache manipulation structures for mrouted and PIMd
[77] Fix | Delete
*/
[78] Fix | Delete
[79] Fix | Delete
struct mf6cctl {
[80] Fix | Delete
struct sockaddr_in6 mf6cc_origin; /* Origin of mcast */
[81] Fix | Delete
struct sockaddr_in6 mf6cc_mcastgrp; /* Group in question */
[82] Fix | Delete
mifi_t mf6cc_parent; /* Where it arrived */
[83] Fix | Delete
struct if_set mf6cc_ifset; /* Where it is going */
[84] Fix | Delete
};
[85] Fix | Delete
[86] Fix | Delete
/*
[87] Fix | Delete
* Group count retrieval for pim6sd
[88] Fix | Delete
*/
[89] Fix | Delete
[90] Fix | Delete
struct sioc_sg_req6 {
[91] Fix | Delete
struct sockaddr_in6 src;
[92] Fix | Delete
struct sockaddr_in6 grp;
[93] Fix | Delete
unsigned long pktcnt;
[94] Fix | Delete
unsigned long bytecnt;
[95] Fix | Delete
unsigned long wrong_if;
[96] Fix | Delete
};
[97] Fix | Delete
[98] Fix | Delete
/*
[99] Fix | Delete
* To get vif packet counts
[100] Fix | Delete
*/
[101] Fix | Delete
[102] Fix | Delete
struct sioc_mif_req6 {
[103] Fix | Delete
mifi_t mifi; /* Which iface */
[104] Fix | Delete
unsigned long icount; /* In packets */
[105] Fix | Delete
unsigned long ocount; /* Out packets */
[106] Fix | Delete
unsigned long ibytes; /* In bytes */
[107] Fix | Delete
unsigned long obytes; /* Out bytes */
[108] Fix | Delete
};
[109] Fix | Delete
[110] Fix | Delete
/*
[111] Fix | Delete
* That's all usermode folks
[112] Fix | Delete
*/
[113] Fix | Delete
[114] Fix | Delete
[115] Fix | Delete
[116] Fix | Delete
/*
[117] Fix | Delete
* Structure used to communicate from kernel to multicast router.
[118] Fix | Delete
* We'll overlay the structure onto an MLD header (not an IPv6 heder like igmpmsg{}
[119] Fix | Delete
* used for IPv4 implementation). This is because this structure will be passed via an
[120] Fix | Delete
* IPv6 raw socket, on which an application will only receiver the payload i.e the data after
[121] Fix | Delete
* the IPv6 header and all the extension headers. (See section 3 of RFC 3542)
[122] Fix | Delete
*/
[123] Fix | Delete
[124] Fix | Delete
struct mrt6msg {
[125] Fix | Delete
#define MRT6MSG_NOCACHE 1
[126] Fix | Delete
#define MRT6MSG_WRONGMIF 2
[127] Fix | Delete
#define MRT6MSG_WHOLEPKT 3 /* used for use level encap */
[128] Fix | Delete
__u8 im6_mbz; /* must be zero */
[129] Fix | Delete
__u8 im6_msgtype; /* what type of message */
[130] Fix | Delete
__u16 im6_mif; /* mif rec'd on */
[131] Fix | Delete
__u32 im6_pad; /* padding for 64 bit arch */
[132] Fix | Delete
struct in6_addr im6_src, im6_dst;
[133] Fix | Delete
};
[134] Fix | Delete
[135] Fix | Delete
/* ip6mr netlink cache report attributes */
[136] Fix | Delete
enum {
[137] Fix | Delete
IP6MRA_CREPORT_UNSPEC,
[138] Fix | Delete
IP6MRA_CREPORT_MSGTYPE,
[139] Fix | Delete
IP6MRA_CREPORT_MIF_ID,
[140] Fix | Delete
IP6MRA_CREPORT_SRC_ADDR,
[141] Fix | Delete
IP6MRA_CREPORT_DST_ADDR,
[142] Fix | Delete
IP6MRA_CREPORT_PKT,
[143] Fix | Delete
__IP6MRA_CREPORT_MAX
[144] Fix | Delete
};
[145] Fix | Delete
#define IP6MRA_CREPORT_MAX (__IP6MRA_CREPORT_MAX - 1)
[146] Fix | Delete
[147] Fix | Delete
#endif /* __LINUX_MROUTE6_H */
[148] Fix | Delete
[149] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function