Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: rtnetlink.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
#ifndef __LINUX_RTNETLINK_H
[1] Fix | Delete
#define __LINUX_RTNETLINK_H
[2] Fix | Delete
[3] Fix | Delete
#include <linux/types.h>
[4] Fix | Delete
#include <linux/netlink.h>
[5] Fix | Delete
#include <linux/if_link.h>
[6] Fix | Delete
#include <linux/if_addr.h>
[7] Fix | Delete
#include <linux/neighbour.h>
[8] Fix | Delete
[9] Fix | Delete
/* rtnetlink families. Values up to 127 are reserved for real address
[10] Fix | Delete
* families, values above 128 may be used arbitrarily.
[11] Fix | Delete
*/
[12] Fix | Delete
#define RTNL_FAMILY_IPMR 128
[13] Fix | Delete
#define RTNL_FAMILY_IP6MR 129
[14] Fix | Delete
#define RTNL_FAMILY_MAX 129
[15] Fix | Delete
[16] Fix | Delete
/****
[17] Fix | Delete
* Routing/neighbour discovery messages.
[18] Fix | Delete
****/
[19] Fix | Delete
[20] Fix | Delete
/* Types of messages */
[21] Fix | Delete
[22] Fix | Delete
enum {
[23] Fix | Delete
RTM_BASE = 16,
[24] Fix | Delete
#define RTM_BASE RTM_BASE
[25] Fix | Delete
[26] Fix | Delete
RTM_NEWLINK = 16,
[27] Fix | Delete
#define RTM_NEWLINK RTM_NEWLINK
[28] Fix | Delete
RTM_DELLINK,
[29] Fix | Delete
#define RTM_DELLINK RTM_DELLINK
[30] Fix | Delete
RTM_GETLINK,
[31] Fix | Delete
#define RTM_GETLINK RTM_GETLINK
[32] Fix | Delete
RTM_SETLINK,
[33] Fix | Delete
#define RTM_SETLINK RTM_SETLINK
[34] Fix | Delete
[35] Fix | Delete
RTM_NEWADDR = 20,
[36] Fix | Delete
#define RTM_NEWADDR RTM_NEWADDR
[37] Fix | Delete
RTM_DELADDR,
[38] Fix | Delete
#define RTM_DELADDR RTM_DELADDR
[39] Fix | Delete
RTM_GETADDR,
[40] Fix | Delete
#define RTM_GETADDR RTM_GETADDR
[41] Fix | Delete
[42] Fix | Delete
RTM_NEWROUTE = 24,
[43] Fix | Delete
#define RTM_NEWROUTE RTM_NEWROUTE
[44] Fix | Delete
RTM_DELROUTE,
[45] Fix | Delete
#define RTM_DELROUTE RTM_DELROUTE
[46] Fix | Delete
RTM_GETROUTE,
[47] Fix | Delete
#define RTM_GETROUTE RTM_GETROUTE
[48] Fix | Delete
[49] Fix | Delete
RTM_NEWNEIGH = 28,
[50] Fix | Delete
#define RTM_NEWNEIGH RTM_NEWNEIGH
[51] Fix | Delete
RTM_DELNEIGH,
[52] Fix | Delete
#define RTM_DELNEIGH RTM_DELNEIGH
[53] Fix | Delete
RTM_GETNEIGH,
[54] Fix | Delete
#define RTM_GETNEIGH RTM_GETNEIGH
[55] Fix | Delete
[56] Fix | Delete
RTM_NEWRULE = 32,
[57] Fix | Delete
#define RTM_NEWRULE RTM_NEWRULE
[58] Fix | Delete
RTM_DELRULE,
[59] Fix | Delete
#define RTM_DELRULE RTM_DELRULE
[60] Fix | Delete
RTM_GETRULE,
[61] Fix | Delete
#define RTM_GETRULE RTM_GETRULE
[62] Fix | Delete
[63] Fix | Delete
RTM_NEWQDISC = 36,
[64] Fix | Delete
#define RTM_NEWQDISC RTM_NEWQDISC
[65] Fix | Delete
RTM_DELQDISC,
[66] Fix | Delete
#define RTM_DELQDISC RTM_DELQDISC
[67] Fix | Delete
RTM_GETQDISC,
[68] Fix | Delete
#define RTM_GETQDISC RTM_GETQDISC
[69] Fix | Delete
[70] Fix | Delete
RTM_NEWTCLASS = 40,
[71] Fix | Delete
#define RTM_NEWTCLASS RTM_NEWTCLASS
[72] Fix | Delete
RTM_DELTCLASS,
[73] Fix | Delete
#define RTM_DELTCLASS RTM_DELTCLASS
[74] Fix | Delete
RTM_GETTCLASS,
[75] Fix | Delete
#define RTM_GETTCLASS RTM_GETTCLASS
[76] Fix | Delete
[77] Fix | Delete
RTM_NEWTFILTER = 44,
[78] Fix | Delete
#define RTM_NEWTFILTER RTM_NEWTFILTER
[79] Fix | Delete
RTM_DELTFILTER,
[80] Fix | Delete
#define RTM_DELTFILTER RTM_DELTFILTER
[81] Fix | Delete
RTM_GETTFILTER,
[82] Fix | Delete
#define RTM_GETTFILTER RTM_GETTFILTER
[83] Fix | Delete
[84] Fix | Delete
RTM_NEWACTION = 48,
[85] Fix | Delete
#define RTM_NEWACTION RTM_NEWACTION
[86] Fix | Delete
RTM_DELACTION,
[87] Fix | Delete
#define RTM_DELACTION RTM_DELACTION
[88] Fix | Delete
RTM_GETACTION,
[89] Fix | Delete
#define RTM_GETACTION RTM_GETACTION
[90] Fix | Delete
[91] Fix | Delete
RTM_NEWPREFIX = 52,
[92] Fix | Delete
#define RTM_NEWPREFIX RTM_NEWPREFIX
[93] Fix | Delete
[94] Fix | Delete
RTM_GETMULTICAST = 58,
[95] Fix | Delete
#define RTM_GETMULTICAST RTM_GETMULTICAST
[96] Fix | Delete
[97] Fix | Delete
RTM_GETANYCAST = 62,
[98] Fix | Delete
#define RTM_GETANYCAST RTM_GETANYCAST
[99] Fix | Delete
[100] Fix | Delete
RTM_NEWNEIGHTBL = 64,
[101] Fix | Delete
#define RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL
[102] Fix | Delete
RTM_GETNEIGHTBL = 66,
[103] Fix | Delete
#define RTM_GETNEIGHTBL RTM_GETNEIGHTBL
[104] Fix | Delete
RTM_SETNEIGHTBL,
[105] Fix | Delete
#define RTM_SETNEIGHTBL RTM_SETNEIGHTBL
[106] Fix | Delete
[107] Fix | Delete
RTM_NEWNDUSEROPT = 68,
[108] Fix | Delete
#define RTM_NEWNDUSEROPT RTM_NEWNDUSEROPT
[109] Fix | Delete
[110] Fix | Delete
RTM_NEWADDRLABEL = 72,
[111] Fix | Delete
#define RTM_NEWADDRLABEL RTM_NEWADDRLABEL
[112] Fix | Delete
RTM_DELADDRLABEL,
[113] Fix | Delete
#define RTM_DELADDRLABEL RTM_DELADDRLABEL
[114] Fix | Delete
RTM_GETADDRLABEL,
[115] Fix | Delete
#define RTM_GETADDRLABEL RTM_GETADDRLABEL
[116] Fix | Delete
[117] Fix | Delete
RTM_GETDCB = 78,
[118] Fix | Delete
#define RTM_GETDCB RTM_GETDCB
[119] Fix | Delete
RTM_SETDCB,
[120] Fix | Delete
#define RTM_SETDCB RTM_SETDCB
[121] Fix | Delete
[122] Fix | Delete
RTM_NEWNETCONF = 80,
[123] Fix | Delete
#define RTM_NEWNETCONF RTM_NEWNETCONF
[124] Fix | Delete
RTM_DELNETCONF,
[125] Fix | Delete
#define RTM_DELNETCONF RTM_DELNETCONF
[126] Fix | Delete
RTM_GETNETCONF = 82,
[127] Fix | Delete
#define RTM_GETNETCONF RTM_GETNETCONF
[128] Fix | Delete
[129] Fix | Delete
RTM_NEWMDB = 84,
[130] Fix | Delete
#define RTM_NEWMDB RTM_NEWMDB
[131] Fix | Delete
RTM_DELMDB = 85,
[132] Fix | Delete
#define RTM_DELMDB RTM_DELMDB
[133] Fix | Delete
RTM_GETMDB = 86,
[134] Fix | Delete
#define RTM_GETMDB RTM_GETMDB
[135] Fix | Delete
[136] Fix | Delete
RTM_NEWNSID = 88,
[137] Fix | Delete
#define RTM_NEWNSID RTM_NEWNSID
[138] Fix | Delete
RTM_DELNSID = 89,
[139] Fix | Delete
#define RTM_DELNSID RTM_DELNSID
[140] Fix | Delete
RTM_GETNSID = 90,
[141] Fix | Delete
#define RTM_GETNSID RTM_GETNSID
[142] Fix | Delete
[143] Fix | Delete
RTM_NEWSTATS = 92,
[144] Fix | Delete
#define RTM_NEWSTATS RTM_NEWSTATS
[145] Fix | Delete
RTM_GETSTATS = 94,
[146] Fix | Delete
#define RTM_GETSTATS RTM_GETSTATS
[147] Fix | Delete
[148] Fix | Delete
RTM_NEWCACHEREPORT = 96,
[149] Fix | Delete
#define RTM_NEWCACHEREPORT RTM_NEWCACHEREPORT
[150] Fix | Delete
[151] Fix | Delete
RTM_NEWCHAIN = 100,
[152] Fix | Delete
#define RTM_NEWCHAIN RTM_NEWCHAIN
[153] Fix | Delete
RTM_DELCHAIN,
[154] Fix | Delete
#define RTM_DELCHAIN RTM_DELCHAIN
[155] Fix | Delete
RTM_GETCHAIN,
[156] Fix | Delete
#define RTM_GETCHAIN RTM_GETCHAIN
[157] Fix | Delete
[158] Fix | Delete
RTM_NEWNEXTHOP = 104,
[159] Fix | Delete
#define RTM_NEWNEXTHOP RTM_NEWNEXTHOP
[160] Fix | Delete
RTM_DELNEXTHOP,
[161] Fix | Delete
#define RTM_DELNEXTHOP RTM_DELNEXTHOP
[162] Fix | Delete
RTM_GETNEXTHOP,
[163] Fix | Delete
#define RTM_GETNEXTHOP RTM_GETNEXTHOP
[164] Fix | Delete
[165] Fix | Delete
RTM_NEWLINKPROP = 108,
[166] Fix | Delete
#define RTM_NEWLINKPROP RTM_NEWLINKPROP
[167] Fix | Delete
RTM_DELLINKPROP,
[168] Fix | Delete
#define RTM_DELLINKPROP RTM_DELLINKPROP
[169] Fix | Delete
RTM_GETLINKPROP,
[170] Fix | Delete
#define RTM_GETLINKPROP RTM_GETLINKPROP
[171] Fix | Delete
[172] Fix | Delete
RTM_NEWVLAN = 112,
[173] Fix | Delete
#define RTM_NEWNVLAN RTM_NEWVLAN
[174] Fix | Delete
RTM_DELVLAN,
[175] Fix | Delete
#define RTM_DELVLAN RTM_DELVLAN
[176] Fix | Delete
RTM_GETVLAN,
[177] Fix | Delete
#define RTM_GETVLAN RTM_GETVLAN
[178] Fix | Delete
[179] Fix | Delete
__RTM_MAX,
[180] Fix | Delete
#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
[181] Fix | Delete
};
[182] Fix | Delete
[183] Fix | Delete
#define RTM_NR_MSGTYPES (RTM_MAX + 1 - RTM_BASE)
[184] Fix | Delete
#define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2)
[185] Fix | Delete
#define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2)
[186] Fix | Delete
[187] Fix | Delete
/*
[188] Fix | Delete
Generic structure for encapsulation of optional route information.
[189] Fix | Delete
It is reminiscent of sockaddr, but with sa_family replaced
[190] Fix | Delete
with attribute type.
[191] Fix | Delete
*/
[192] Fix | Delete
[193] Fix | Delete
struct rtattr {
[194] Fix | Delete
unsigned short rta_len;
[195] Fix | Delete
unsigned short rta_type;
[196] Fix | Delete
};
[197] Fix | Delete
[198] Fix | Delete
/* Macros to handle rtattributes */
[199] Fix | Delete
[200] Fix | Delete
#define RTA_ALIGNTO 4U
[201] Fix | Delete
#define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) )
[202] Fix | Delete
#define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \
[203] Fix | Delete
(rta)->rta_len >= sizeof(struct rtattr) && \
[204] Fix | Delete
(rta)->rta_len <= (len))
[205] Fix | Delete
#define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \
[206] Fix | Delete
(struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len)))
[207] Fix | Delete
#define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len))
[208] Fix | Delete
#define RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len))
[209] Fix | Delete
#define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0)))
[210] Fix | Delete
#define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0))
[211] Fix | Delete
[212] Fix | Delete
[213] Fix | Delete
[214] Fix | Delete
[215] Fix | Delete
/******************************************************************************
[216] Fix | Delete
* Definitions used in routing table administration.
[217] Fix | Delete
****/
[218] Fix | Delete
[219] Fix | Delete
struct rtmsg {
[220] Fix | Delete
unsigned char rtm_family;
[221] Fix | Delete
unsigned char rtm_dst_len;
[222] Fix | Delete
unsigned char rtm_src_len;
[223] Fix | Delete
unsigned char rtm_tos;
[224] Fix | Delete
[225] Fix | Delete
unsigned char rtm_table; /* Routing table id */
[226] Fix | Delete
unsigned char rtm_protocol; /* Routing protocol; see below */
[227] Fix | Delete
unsigned char rtm_scope; /* See below */
[228] Fix | Delete
unsigned char rtm_type; /* See below */
[229] Fix | Delete
[230] Fix | Delete
unsigned rtm_flags;
[231] Fix | Delete
};
[232] Fix | Delete
[233] Fix | Delete
/* rtm_type */
[234] Fix | Delete
[235] Fix | Delete
enum {
[236] Fix | Delete
RTN_UNSPEC,
[237] Fix | Delete
RTN_UNICAST, /* Gateway or direct route */
[238] Fix | Delete
RTN_LOCAL, /* Accept locally */
[239] Fix | Delete
RTN_BROADCAST, /* Accept locally as broadcast,
[240] Fix | Delete
send as broadcast */
[241] Fix | Delete
RTN_ANYCAST, /* Accept locally as broadcast,
[242] Fix | Delete
but send as unicast */
[243] Fix | Delete
RTN_MULTICAST, /* Multicast route */
[244] Fix | Delete
RTN_BLACKHOLE, /* Drop */
[245] Fix | Delete
RTN_UNREACHABLE, /* Destination is unreachable */
[246] Fix | Delete
RTN_PROHIBIT, /* Administratively prohibited */
[247] Fix | Delete
RTN_THROW, /* Not in this table */
[248] Fix | Delete
RTN_NAT, /* Translate this address */
[249] Fix | Delete
RTN_XRESOLVE, /* Use external resolver */
[250] Fix | Delete
__RTN_MAX
[251] Fix | Delete
};
[252] Fix | Delete
[253] Fix | Delete
#define RTN_MAX (__RTN_MAX - 1)
[254] Fix | Delete
[255] Fix | Delete
[256] Fix | Delete
/* rtm_protocol */
[257] Fix | Delete
[258] Fix | Delete
#define RTPROT_UNSPEC 0
[259] Fix | Delete
#define RTPROT_REDIRECT 1 /* Route installed by ICMP redirects;
[260] Fix | Delete
not used by current IPv4 */
[261] Fix | Delete
#define RTPROT_KERNEL 2 /* Route installed by kernel */
[262] Fix | Delete
#define RTPROT_BOOT 3 /* Route installed during boot */
[263] Fix | Delete
#define RTPROT_STATIC 4 /* Route installed by administrator */
[264] Fix | Delete
[265] Fix | Delete
/* Values of protocol >= RTPROT_STATIC are not interpreted by kernel;
[266] Fix | Delete
they are just passed from user and back as is.
[267] Fix | Delete
It will be used by hypothetical multiple routing daemons.
[268] Fix | Delete
Note that protocol values should be standardized in order to
[269] Fix | Delete
avoid conflicts.
[270] Fix | Delete
*/
[271] Fix | Delete
[272] Fix | Delete
#define RTPROT_GATED 8 /* Apparently, GateD */
[273] Fix | Delete
#define RTPROT_RA 9 /* RDISC/ND router advertisements */
[274] Fix | Delete
#define RTPROT_MRT 10 /* Merit MRT */
[275] Fix | Delete
#define RTPROT_ZEBRA 11 /* Zebra */
[276] Fix | Delete
#define RTPROT_BIRD 12 /* BIRD */
[277] Fix | Delete
#define RTPROT_DNROUTED 13 /* DECnet routing daemon */
[278] Fix | Delete
#define RTPROT_XORP 14 /* XORP */
[279] Fix | Delete
#define RTPROT_NTK 15 /* Netsukuku */
[280] Fix | Delete
#define RTPROT_DHCP 16 /* DHCP client */
[281] Fix | Delete
#define RTPROT_MROUTED 17 /* Multicast daemon */
[282] Fix | Delete
#define RTPROT_BABEL 42 /* Babel daemon */
[283] Fix | Delete
#define RTPROT_BGP 186 /* BGP Routes */
[284] Fix | Delete
#define RTPROT_ISIS 187 /* ISIS Routes */
[285] Fix | Delete
#define RTPROT_OSPF 188 /* OSPF Routes */
[286] Fix | Delete
#define RTPROT_RIP 189 /* RIP Routes */
[287] Fix | Delete
#define RTPROT_EIGRP 192 /* EIGRP Routes */
[288] Fix | Delete
[289] Fix | Delete
/* rtm_scope
[290] Fix | Delete
[291] Fix | Delete
Really it is not scope, but sort of distance to the destination.
[292] Fix | Delete
NOWHERE are reserved for not existing destinations, HOST is our
[293] Fix | Delete
local addresses, LINK are destinations, located on directly attached
[294] Fix | Delete
link and UNIVERSE is everywhere in the Universe.
[295] Fix | Delete
[296] Fix | Delete
Intermediate values are also possible f.e. interior routes
[297] Fix | Delete
could be assigned a value between UNIVERSE and LINK.
[298] Fix | Delete
*/
[299] Fix | Delete
[300] Fix | Delete
enum rt_scope_t {
[301] Fix | Delete
RT_SCOPE_UNIVERSE=0,
[302] Fix | Delete
/* User defined values */
[303] Fix | Delete
RT_SCOPE_SITE=200,
[304] Fix | Delete
RT_SCOPE_LINK=253,
[305] Fix | Delete
RT_SCOPE_HOST=254,
[306] Fix | Delete
RT_SCOPE_NOWHERE=255
[307] Fix | Delete
};
[308] Fix | Delete
[309] Fix | Delete
/* rtm_flags */
[310] Fix | Delete
[311] Fix | Delete
#define RTM_F_NOTIFY 0x100 /* Notify user of route change */
[312] Fix | Delete
#define RTM_F_CLONED 0x200 /* This route is cloned */
[313] Fix | Delete
#define RTM_F_EQUALIZE 0x400 /* Multipath equalizer: NI */
[314] Fix | Delete
#define RTM_F_PREFIX 0x800 /* Prefix addresses */
[315] Fix | Delete
#define RTM_F_LOOKUP_TABLE 0x1000 /* set rtm_table to FIB lookup result */
[316] Fix | Delete
#define RTM_F_FIB_MATCH 0x2000 /* return full fib lookup match */
[317] Fix | Delete
#define RTM_F_OFFLOAD 0x4000 /* route is offloaded */
[318] Fix | Delete
#define RTM_F_TRAP 0x8000 /* route is trapping packets */
[319] Fix | Delete
[320] Fix | Delete
/* Reserved table identifiers */
[321] Fix | Delete
[322] Fix | Delete
enum rt_class_t {
[323] Fix | Delete
RT_TABLE_UNSPEC=0,
[324] Fix | Delete
/* User defined values */
[325] Fix | Delete
RT_TABLE_COMPAT=252,
[326] Fix | Delete
RT_TABLE_DEFAULT=253,
[327] Fix | Delete
RT_TABLE_MAIN=254,
[328] Fix | Delete
RT_TABLE_LOCAL=255,
[329] Fix | Delete
RT_TABLE_MAX=0xFFFFFFFF
[330] Fix | Delete
};
[331] Fix | Delete
[332] Fix | Delete
[333] Fix | Delete
/* Routing message attributes */
[334] Fix | Delete
[335] Fix | Delete
enum rtattr_type_t {
[336] Fix | Delete
RTA_UNSPEC,
[337] Fix | Delete
RTA_DST,
[338] Fix | Delete
RTA_SRC,
[339] Fix | Delete
RTA_IIF,
[340] Fix | Delete
RTA_OIF,
[341] Fix | Delete
RTA_GATEWAY,
[342] Fix | Delete
RTA_PRIORITY,
[343] Fix | Delete
RTA_PREFSRC,
[344] Fix | Delete
RTA_METRICS,
[345] Fix | Delete
RTA_MULTIPATH,
[346] Fix | Delete
RTA_PROTOINFO, /* no longer used */
[347] Fix | Delete
RTA_FLOW,
[348] Fix | Delete
RTA_CACHEINFO,
[349] Fix | Delete
RTA_SESSION, /* no longer used */
[350] Fix | Delete
RTA_MP_ALGO, /* no longer used */
[351] Fix | Delete
RTA_TABLE,
[352] Fix | Delete
RTA_MARK,
[353] Fix | Delete
RTA_MFC_STATS,
[354] Fix | Delete
RTA_VIA,
[355] Fix | Delete
RTA_NEWDST,
[356] Fix | Delete
RTA_PREF,
[357] Fix | Delete
RTA_ENCAP_TYPE,
[358] Fix | Delete
RTA_ENCAP,
[359] Fix | Delete
RTA_EXPIRES,
[360] Fix | Delete
RTA_PAD,
[361] Fix | Delete
RTA_UID,
[362] Fix | Delete
RTA_TTL_PROPAGATE,
[363] Fix | Delete
RTA_IP_PROTO,
[364] Fix | Delete
RTA_SPORT,
[365] Fix | Delete
RTA_DPORT,
[366] Fix | Delete
RTA_NH_ID,
[367] Fix | Delete
__RTA_MAX
[368] Fix | Delete
};
[369] Fix | Delete
[370] Fix | Delete
#define RTA_MAX (__RTA_MAX - 1)
[371] Fix | Delete
[372] Fix | Delete
#define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
[373] Fix | Delete
#define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg))
[374] Fix | Delete
[375] Fix | Delete
/* RTM_MULTIPATH --- array of struct rtnexthop.
[376] Fix | Delete
*
[377] Fix | Delete
* "struct rtnexthop" describes all necessary nexthop information,
[378] Fix | Delete
* i.e. parameters of path to a destination via this nexthop.
[379] Fix | Delete
*
[380] Fix | Delete
* At the moment it is impossible to set different prefsrc, mtu, window
[381] Fix | Delete
* and rtt for different paths from multipath.
[382] Fix | Delete
*/
[383] Fix | Delete
[384] Fix | Delete
struct rtnexthop {
[385] Fix | Delete
unsigned short rtnh_len;
[386] Fix | Delete
unsigned char rtnh_flags;
[387] Fix | Delete
unsigned char rtnh_hops;
[388] Fix | Delete
int rtnh_ifindex;
[389] Fix | Delete
};
[390] Fix | Delete
[391] Fix | Delete
/* rtnh_flags */
[392] Fix | Delete
[393] Fix | Delete
#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */
[394] Fix | Delete
#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */
[395] Fix | Delete
#define RTNH_F_ONLINK 4 /* Gateway is forced on link */
[396] Fix | Delete
#define RTNH_F_OFFLOAD 8 /* offloaded route */
[397] Fix | Delete
#define RTNH_F_LINKDOWN 16 /* carrier-down on nexthop */
[398] Fix | Delete
#define RTNH_F_UNRESOLVED 32 /* The entry is unresolved (ipmr) */
[399] Fix | Delete
[400] Fix | Delete
#define RTNH_COMPARE_MASK (RTNH_F_DEAD | RTNH_F_LINKDOWN | RTNH_F_OFFLOAD)
[401] Fix | Delete
[402] Fix | Delete
/* Macros to handle hexthops */
[403] Fix | Delete
[404] Fix | Delete
#define RTNH_ALIGNTO 4
[405] Fix | Delete
#define RTNH_ALIGN(len) ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) )
[406] Fix | Delete
#define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && \
[407] Fix | Delete
((int)(rtnh)->rtnh_len) <= (len))
[408] Fix | Delete
#define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len)))
[409] Fix | Delete
#define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len))
[410] Fix | Delete
#define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len))
[411] Fix | Delete
#define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0)))
[412] Fix | Delete
[413] Fix | Delete
/* RTA_VIA */
[414] Fix | Delete
struct rtvia {
[415] Fix | Delete
__kernel_sa_family_t rtvia_family;
[416] Fix | Delete
__u8 rtvia_addr[0];
[417] Fix | Delete
};
[418] Fix | Delete
[419] Fix | Delete
/* RTM_CACHEINFO */
[420] Fix | Delete
[421] Fix | Delete
struct rta_cacheinfo {
[422] Fix | Delete
__u32 rta_clntref;
[423] Fix | Delete
__u32 rta_lastuse;
[424] Fix | Delete
__s32 rta_expires;
[425] Fix | Delete
__u32 rta_error;
[426] Fix | Delete
__u32 rta_used;
[427] Fix | Delete
[428] Fix | Delete
#define RTNETLINK_HAVE_PEERINFO 1
[429] Fix | Delete
__u32 rta_id;
[430] Fix | Delete
__u32 rta_ts;
[431] Fix | Delete
__u32 rta_tsage;
[432] Fix | Delete
};
[433] Fix | Delete
[434] Fix | Delete
/* RTM_METRICS --- array of struct rtattr with types of RTAX_* */
[435] Fix | Delete
[436] Fix | Delete
enum {
[437] Fix | Delete
RTAX_UNSPEC,
[438] Fix | Delete
#define RTAX_UNSPEC RTAX_UNSPEC
[439] Fix | Delete
RTAX_LOCK,
[440] Fix | Delete
#define RTAX_LOCK RTAX_LOCK
[441] Fix | Delete
RTAX_MTU,
[442] Fix | Delete
#define RTAX_MTU RTAX_MTU
[443] Fix | Delete
RTAX_WINDOW,
[444] Fix | Delete
#define RTAX_WINDOW RTAX_WINDOW
[445] Fix | Delete
RTAX_RTT,
[446] Fix | Delete
#define RTAX_RTT RTAX_RTT
[447] Fix | Delete
RTAX_RTTVAR,
[448] Fix | Delete
#define RTAX_RTTVAR RTAX_RTTVAR
[449] Fix | Delete
RTAX_SSTHRESH,
[450] Fix | Delete
#define RTAX_SSTHRESH RTAX_SSTHRESH
[451] Fix | Delete
RTAX_CWND,
[452] Fix | Delete
#define RTAX_CWND RTAX_CWND
[453] Fix | Delete
RTAX_ADVMSS,
[454] Fix | Delete
#define RTAX_ADVMSS RTAX_ADVMSS
[455] Fix | Delete
RTAX_REORDERING,
[456] Fix | Delete
#define RTAX_REORDERING RTAX_REORDERING
[457] Fix | Delete
RTAX_HOPLIMIT,
[458] Fix | Delete
#define RTAX_HOPLIMIT RTAX_HOPLIMIT
[459] Fix | Delete
RTAX_INITCWND,
[460] Fix | Delete
#define RTAX_INITCWND RTAX_INITCWND
[461] Fix | Delete
RTAX_FEATURES,
[462] Fix | Delete
#define RTAX_FEATURES RTAX_FEATURES
[463] Fix | Delete
RTAX_RTO_MIN,
[464] Fix | Delete
#define RTAX_RTO_MIN RTAX_RTO_MIN
[465] Fix | Delete
RTAX_INITRWND,
[466] Fix | Delete
#define RTAX_INITRWND RTAX_INITRWND
[467] Fix | Delete
RTAX_QUICKACK,
[468] Fix | Delete
#define RTAX_QUICKACK RTAX_QUICKACK
[469] Fix | Delete
RTAX_CC_ALGO,
[470] Fix | Delete
#define RTAX_CC_ALGO RTAX_CC_ALGO
[471] Fix | Delete
RTAX_FASTOPEN_NO_COOKIE,
[472] Fix | Delete
#define RTAX_FASTOPEN_NO_COOKIE RTAX_FASTOPEN_NO_COOKIE
[473] Fix | Delete
__RTAX_MAX
[474] Fix | Delete
};
[475] Fix | Delete
[476] Fix | Delete
#define RTAX_MAX (__RTAX_MAX - 1)
[477] Fix | Delete
[478] Fix | Delete
#define RTAX_FEATURE_ECN (1 << 0)
[479] Fix | Delete
#define RTAX_FEATURE_SACK (1 << 1)
[480] Fix | Delete
#define RTAX_FEATURE_TIMESTAMP (1 << 2)
[481] Fix | Delete
#define RTAX_FEATURE_ALLFRAG (1 << 3)
[482] Fix | Delete
[483] Fix | Delete
#define RTAX_FEATURE_MASK (RTAX_FEATURE_ECN | RTAX_FEATURE_SACK | \
[484] Fix | Delete
RTAX_FEATURE_TIMESTAMP | RTAX_FEATURE_ALLFRAG)
[485] Fix | Delete
[486] Fix | Delete
struct rta_session {
[487] Fix | Delete
__u8 proto;
[488] Fix | Delete
__u8 pad1;
[489] Fix | Delete
__u16 pad2;
[490] Fix | Delete
[491] Fix | Delete
union {
[492] Fix | Delete
struct {
[493] Fix | Delete
__u16 sport;
[494] Fix | Delete
__u16 dport;
[495] Fix | Delete
} ports;
[496] Fix | Delete
[497] Fix | Delete
struct {
[498] Fix | Delete
__u8 type;
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function