Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/netinet
File: icmp6.h
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
[0] Fix | Delete
This file is part of the GNU C Library.
[1] Fix | Delete
[2] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[3] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[4] Fix | Delete
License as published by the Free Software Foundation; either
[5] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[6] Fix | Delete
[7] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[8] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[9] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[10] Fix | Delete
Lesser General Public License for more details.
[11] Fix | Delete
[12] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[13] Fix | Delete
License along with the GNU C Library; if not, see
[14] Fix | Delete
<http://www.gnu.org/licenses/>. */
[15] Fix | Delete
[16] Fix | Delete
#ifndef _NETINET_ICMP6_H
[17] Fix | Delete
#define _NETINET_ICMP6_H 1
[18] Fix | Delete
[19] Fix | Delete
#include <inttypes.h>
[20] Fix | Delete
#include <string.h>
[21] Fix | Delete
#include <sys/types.h>
[22] Fix | Delete
#include <netinet/in.h>
[23] Fix | Delete
[24] Fix | Delete
#define ICMP6_FILTER 1
[25] Fix | Delete
[26] Fix | Delete
#define ICMP6_FILTER_BLOCK 1
[27] Fix | Delete
#define ICMP6_FILTER_PASS 2
[28] Fix | Delete
#define ICMP6_FILTER_BLOCKOTHERS 3
[29] Fix | Delete
#define ICMP6_FILTER_PASSONLY 4
[30] Fix | Delete
[31] Fix | Delete
struct icmp6_filter
[32] Fix | Delete
{
[33] Fix | Delete
uint32_t icmp6_filt[8];
[34] Fix | Delete
};
[35] Fix | Delete
[36] Fix | Delete
struct icmp6_hdr
[37] Fix | Delete
{
[38] Fix | Delete
uint8_t icmp6_type; /* type field */
[39] Fix | Delete
uint8_t icmp6_code; /* code field */
[40] Fix | Delete
uint16_t icmp6_cksum; /* checksum field */
[41] Fix | Delete
union
[42] Fix | Delete
{
[43] Fix | Delete
uint32_t icmp6_un_data32[1]; /* type-specific field */
[44] Fix | Delete
uint16_t icmp6_un_data16[2]; /* type-specific field */
[45] Fix | Delete
uint8_t icmp6_un_data8[4]; /* type-specific field */
[46] Fix | Delete
} icmp6_dataun;
[47] Fix | Delete
};
[48] Fix | Delete
[49] Fix | Delete
#define icmp6_data32 icmp6_dataun.icmp6_un_data32
[50] Fix | Delete
#define icmp6_data16 icmp6_dataun.icmp6_un_data16
[51] Fix | Delete
#define icmp6_data8 icmp6_dataun.icmp6_un_data8
[52] Fix | Delete
#define icmp6_pptr icmp6_data32[0] /* parameter prob */
[53] Fix | Delete
#define icmp6_mtu icmp6_data32[0] /* packet too big */
[54] Fix | Delete
#define icmp6_id icmp6_data16[0] /* echo request/reply */
[55] Fix | Delete
#define icmp6_seq icmp6_data16[1] /* echo request/reply */
[56] Fix | Delete
#define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */
[57] Fix | Delete
[58] Fix | Delete
#define ICMP6_DST_UNREACH 1
[59] Fix | Delete
#define ICMP6_PACKET_TOO_BIG 2
[60] Fix | Delete
#define ICMP6_TIME_EXCEEDED 3
[61] Fix | Delete
#define ICMP6_PARAM_PROB 4
[62] Fix | Delete
[63] Fix | Delete
#define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */
[64] Fix | Delete
[65] Fix | Delete
#define ICMP6_ECHO_REQUEST 128
[66] Fix | Delete
#define ICMP6_ECHO_REPLY 129
[67] Fix | Delete
#define MLD_LISTENER_QUERY 130
[68] Fix | Delete
#define MLD_LISTENER_REPORT 131
[69] Fix | Delete
#define MLD_LISTENER_REDUCTION 132
[70] Fix | Delete
[71] Fix | Delete
#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */
[72] Fix | Delete
#define ICMP6_DST_UNREACH_ADMIN 1 /* communication with destination */
[73] Fix | Delete
/* administratively prohibited */
[74] Fix | Delete
#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */
[75] Fix | Delete
#define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */
[76] Fix | Delete
#define ICMP6_DST_UNREACH_NOPORT 4 /* bad port */
[77] Fix | Delete
[78] Fix | Delete
#define ICMP6_TIME_EXCEED_TRANSIT 0 /* Hop Limit == 0 in transit */
[79] Fix | Delete
#define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* Reassembly time out */
[80] Fix | Delete
[81] Fix | Delete
#define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */
[82] Fix | Delete
#define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized Next Header */
[83] Fix | Delete
#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized IPv6 option */
[84] Fix | Delete
[85] Fix | Delete
#define ICMP6_FILTER_WILLPASS(type, filterp) \
[86] Fix | Delete
((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0)
[87] Fix | Delete
[88] Fix | Delete
#define ICMP6_FILTER_WILLBLOCK(type, filterp) \
[89] Fix | Delete
((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0)
[90] Fix | Delete
[91] Fix | Delete
#define ICMP6_FILTER_SETPASS(type, filterp) \
[92] Fix | Delete
((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31))))
[93] Fix | Delete
[94] Fix | Delete
#define ICMP6_FILTER_SETBLOCK(type, filterp) \
[95] Fix | Delete
((((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31))))
[96] Fix | Delete
[97] Fix | Delete
#define ICMP6_FILTER_SETPASSALL(filterp) \
[98] Fix | Delete
memset (filterp, 0, sizeof (struct icmp6_filter));
[99] Fix | Delete
[100] Fix | Delete
#define ICMP6_FILTER_SETBLOCKALL(filterp) \
[101] Fix | Delete
memset (filterp, 0xFF, sizeof (struct icmp6_filter));
[102] Fix | Delete
[103] Fix | Delete
#define ND_ROUTER_SOLICIT 133
[104] Fix | Delete
#define ND_ROUTER_ADVERT 134
[105] Fix | Delete
#define ND_NEIGHBOR_SOLICIT 135
[106] Fix | Delete
#define ND_NEIGHBOR_ADVERT 136
[107] Fix | Delete
#define ND_REDIRECT 137
[108] Fix | Delete
[109] Fix | Delete
struct nd_router_solicit /* router solicitation */
[110] Fix | Delete
{
[111] Fix | Delete
struct icmp6_hdr nd_rs_hdr;
[112] Fix | Delete
/* could be followed by options */
[113] Fix | Delete
};
[114] Fix | Delete
[115] Fix | Delete
#define nd_rs_type nd_rs_hdr.icmp6_type
[116] Fix | Delete
#define nd_rs_code nd_rs_hdr.icmp6_code
[117] Fix | Delete
#define nd_rs_cksum nd_rs_hdr.icmp6_cksum
[118] Fix | Delete
#define nd_rs_reserved nd_rs_hdr.icmp6_data32[0]
[119] Fix | Delete
[120] Fix | Delete
struct nd_router_advert /* router advertisement */
[121] Fix | Delete
{
[122] Fix | Delete
struct icmp6_hdr nd_ra_hdr;
[123] Fix | Delete
uint32_t nd_ra_reachable; /* reachable time */
[124] Fix | Delete
uint32_t nd_ra_retransmit; /* retransmit timer */
[125] Fix | Delete
/* could be followed by options */
[126] Fix | Delete
};
[127] Fix | Delete
[128] Fix | Delete
#define nd_ra_type nd_ra_hdr.icmp6_type
[129] Fix | Delete
#define nd_ra_code nd_ra_hdr.icmp6_code
[130] Fix | Delete
#define nd_ra_cksum nd_ra_hdr.icmp6_cksum
[131] Fix | Delete
#define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0]
[132] Fix | Delete
#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1]
[133] Fix | Delete
#define ND_RA_FLAG_MANAGED 0x80
[134] Fix | Delete
#define ND_RA_FLAG_OTHER 0x40
[135] Fix | Delete
#define ND_RA_FLAG_HOME_AGENT 0x20
[136] Fix | Delete
#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1]
[137] Fix | Delete
[138] Fix | Delete
struct nd_neighbor_solicit /* neighbor solicitation */
[139] Fix | Delete
{
[140] Fix | Delete
struct icmp6_hdr nd_ns_hdr;
[141] Fix | Delete
struct in6_addr nd_ns_target; /* target address */
[142] Fix | Delete
/* could be followed by options */
[143] Fix | Delete
};
[144] Fix | Delete
[145] Fix | Delete
#define nd_ns_type nd_ns_hdr.icmp6_type
[146] Fix | Delete
#define nd_ns_code nd_ns_hdr.icmp6_code
[147] Fix | Delete
#define nd_ns_cksum nd_ns_hdr.icmp6_cksum
[148] Fix | Delete
#define nd_ns_reserved nd_ns_hdr.icmp6_data32[0]
[149] Fix | Delete
[150] Fix | Delete
struct nd_neighbor_advert /* neighbor advertisement */
[151] Fix | Delete
{
[152] Fix | Delete
struct icmp6_hdr nd_na_hdr;
[153] Fix | Delete
struct in6_addr nd_na_target; /* target address */
[154] Fix | Delete
/* could be followed by options */
[155] Fix | Delete
};
[156] Fix | Delete
[157] Fix | Delete
#define nd_na_type nd_na_hdr.icmp6_type
[158] Fix | Delete
#define nd_na_code nd_na_hdr.icmp6_code
[159] Fix | Delete
#define nd_na_cksum nd_na_hdr.icmp6_cksum
[160] Fix | Delete
#define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0]
[161] Fix | Delete
#if __BYTE_ORDER == __BIG_ENDIAN
[162] Fix | Delete
#define ND_NA_FLAG_ROUTER 0x80000000
[163] Fix | Delete
#define ND_NA_FLAG_SOLICITED 0x40000000
[164] Fix | Delete
#define ND_NA_FLAG_OVERRIDE 0x20000000
[165] Fix | Delete
#else /* __BYTE_ORDER == __LITTLE_ENDIAN */
[166] Fix | Delete
#define ND_NA_FLAG_ROUTER 0x00000080
[167] Fix | Delete
#define ND_NA_FLAG_SOLICITED 0x00000040
[168] Fix | Delete
#define ND_NA_FLAG_OVERRIDE 0x00000020
[169] Fix | Delete
#endif
[170] Fix | Delete
[171] Fix | Delete
struct nd_redirect /* redirect */
[172] Fix | Delete
{
[173] Fix | Delete
struct icmp6_hdr nd_rd_hdr;
[174] Fix | Delete
struct in6_addr nd_rd_target; /* target address */
[175] Fix | Delete
struct in6_addr nd_rd_dst; /* destination address */
[176] Fix | Delete
/* could be followed by options */
[177] Fix | Delete
};
[178] Fix | Delete
[179] Fix | Delete
#define nd_rd_type nd_rd_hdr.icmp6_type
[180] Fix | Delete
#define nd_rd_code nd_rd_hdr.icmp6_code
[181] Fix | Delete
#define nd_rd_cksum nd_rd_hdr.icmp6_cksum
[182] Fix | Delete
#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0]
[183] Fix | Delete
[184] Fix | Delete
struct nd_opt_hdr /* Neighbor discovery option header */
[185] Fix | Delete
{
[186] Fix | Delete
uint8_t nd_opt_type;
[187] Fix | Delete
uint8_t nd_opt_len; /* in units of 8 octets */
[188] Fix | Delete
/* followed by option specific data */
[189] Fix | Delete
};
[190] Fix | Delete
[191] Fix | Delete
#define ND_OPT_SOURCE_LINKADDR 1
[192] Fix | Delete
#define ND_OPT_TARGET_LINKADDR 2
[193] Fix | Delete
#define ND_OPT_PREFIX_INFORMATION 3
[194] Fix | Delete
#define ND_OPT_REDIRECTED_HEADER 4
[195] Fix | Delete
#define ND_OPT_MTU 5
[196] Fix | Delete
#define ND_OPT_RTR_ADV_INTERVAL 7
[197] Fix | Delete
#define ND_OPT_HOME_AGENT_INFO 8
[198] Fix | Delete
[199] Fix | Delete
struct nd_opt_prefix_info /* prefix information */
[200] Fix | Delete
{
[201] Fix | Delete
uint8_t nd_opt_pi_type;
[202] Fix | Delete
uint8_t nd_opt_pi_len;
[203] Fix | Delete
uint8_t nd_opt_pi_prefix_len;
[204] Fix | Delete
uint8_t nd_opt_pi_flags_reserved;
[205] Fix | Delete
uint32_t nd_opt_pi_valid_time;
[206] Fix | Delete
uint32_t nd_opt_pi_preferred_time;
[207] Fix | Delete
uint32_t nd_opt_pi_reserved2;
[208] Fix | Delete
struct in6_addr nd_opt_pi_prefix;
[209] Fix | Delete
};
[210] Fix | Delete
[211] Fix | Delete
#define ND_OPT_PI_FLAG_ONLINK 0x80
[212] Fix | Delete
#define ND_OPT_PI_FLAG_AUTO 0x40
[213] Fix | Delete
#define ND_OPT_PI_FLAG_RADDR 0x20
[214] Fix | Delete
[215] Fix | Delete
struct nd_opt_rd_hdr /* redirected header */
[216] Fix | Delete
{
[217] Fix | Delete
uint8_t nd_opt_rh_type;
[218] Fix | Delete
uint8_t nd_opt_rh_len;
[219] Fix | Delete
uint16_t nd_opt_rh_reserved1;
[220] Fix | Delete
uint32_t nd_opt_rh_reserved2;
[221] Fix | Delete
/* followed by IP header and data */
[222] Fix | Delete
};
[223] Fix | Delete
[224] Fix | Delete
struct nd_opt_mtu /* MTU option */
[225] Fix | Delete
{
[226] Fix | Delete
uint8_t nd_opt_mtu_type;
[227] Fix | Delete
uint8_t nd_opt_mtu_len;
[228] Fix | Delete
uint16_t nd_opt_mtu_reserved;
[229] Fix | Delete
uint32_t nd_opt_mtu_mtu;
[230] Fix | Delete
};
[231] Fix | Delete
[232] Fix | Delete
struct mld_hdr
[233] Fix | Delete
{
[234] Fix | Delete
struct icmp6_hdr mld_icmp6_hdr;
[235] Fix | Delete
struct in6_addr mld_addr; /* multicast address */
[236] Fix | Delete
};
[237] Fix | Delete
[238] Fix | Delete
#define mld_type mld_icmp6_hdr.icmp6_type
[239] Fix | Delete
#define mld_code mld_icmp6_hdr.icmp6_code
[240] Fix | Delete
#define mld_cksum mld_icmp6_hdr.icmp6_cksum
[241] Fix | Delete
#define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0]
[242] Fix | Delete
#define mld_reserved mld_icmp6_hdr.icmp6_data16[1]
[243] Fix | Delete
[244] Fix | Delete
#define ICMP6_ROUTER_RENUMBERING 138
[245] Fix | Delete
[246] Fix | Delete
struct icmp6_router_renum /* router renumbering header */
[247] Fix | Delete
{
[248] Fix | Delete
struct icmp6_hdr rr_hdr;
[249] Fix | Delete
uint8_t rr_segnum;
[250] Fix | Delete
uint8_t rr_flags;
[251] Fix | Delete
uint16_t rr_maxdelay;
[252] Fix | Delete
uint32_t rr_reserved;
[253] Fix | Delete
};
[254] Fix | Delete
[255] Fix | Delete
#define rr_type rr_hdr.icmp6_type
[256] Fix | Delete
#define rr_code rr_hdr.icmp6_code
[257] Fix | Delete
#define rr_cksum rr_hdr.icmp6_cksum
[258] Fix | Delete
#define rr_seqnum rr_hdr.icmp6_data32[0]
[259] Fix | Delete
[260] Fix | Delete
/* Router renumbering flags */
[261] Fix | Delete
#define ICMP6_RR_FLAGS_TEST 0x80
[262] Fix | Delete
#define ICMP6_RR_FLAGS_REQRESULT 0x40
[263] Fix | Delete
#define ICMP6_RR_FLAGS_FORCEAPPLY 0x20
[264] Fix | Delete
#define ICMP6_RR_FLAGS_SPECSITE 0x10
[265] Fix | Delete
#define ICMP6_RR_FLAGS_PREVDONE 0x08
[266] Fix | Delete
[267] Fix | Delete
struct rr_pco_match /* match prefix part */
[268] Fix | Delete
{
[269] Fix | Delete
uint8_t rpm_code;
[270] Fix | Delete
uint8_t rpm_len;
[271] Fix | Delete
uint8_t rpm_ordinal;
[272] Fix | Delete
uint8_t rpm_matchlen;
[273] Fix | Delete
uint8_t rpm_minlen;
[274] Fix | Delete
uint8_t rpm_maxlen;
[275] Fix | Delete
uint16_t rpm_reserved;
[276] Fix | Delete
struct in6_addr rpm_prefix;
[277] Fix | Delete
};
[278] Fix | Delete
[279] Fix | Delete
/* PCO code values */
[280] Fix | Delete
#define RPM_PCO_ADD 1
[281] Fix | Delete
#define RPM_PCO_CHANGE 2
[282] Fix | Delete
#define RPM_PCO_SETGLOBAL 3
[283] Fix | Delete
[284] Fix | Delete
struct rr_pco_use /* use prefix part */
[285] Fix | Delete
{
[286] Fix | Delete
uint8_t rpu_uselen;
[287] Fix | Delete
uint8_t rpu_keeplen;
[288] Fix | Delete
uint8_t rpu_ramask;
[289] Fix | Delete
uint8_t rpu_raflags;
[290] Fix | Delete
uint32_t rpu_vltime;
[291] Fix | Delete
uint32_t rpu_pltime;
[292] Fix | Delete
uint32_t rpu_flags;
[293] Fix | Delete
struct in6_addr rpu_prefix;
[294] Fix | Delete
};
[295] Fix | Delete
[296] Fix | Delete
#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x20
[297] Fix | Delete
#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x10
[298] Fix | Delete
[299] Fix | Delete
#if __BYTE_ORDER == __BIG_ENDIAN
[300] Fix | Delete
# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000
[301] Fix | Delete
# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000
[302] Fix | Delete
#elif __BYTE_ORDER == __LITTLE_ENDIAN
[303] Fix | Delete
# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80
[304] Fix | Delete
# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40
[305] Fix | Delete
#endif
[306] Fix | Delete
[307] Fix | Delete
struct rr_result /* router renumbering result message */
[308] Fix | Delete
{
[309] Fix | Delete
uint16_t rrr_flags;
[310] Fix | Delete
uint8_t rrr_ordinal;
[311] Fix | Delete
uint8_t rrr_matchedlen;
[312] Fix | Delete
uint32_t rrr_ifid;
[313] Fix | Delete
struct in6_addr rrr_prefix;
[314] Fix | Delete
};
[315] Fix | Delete
[316] Fix | Delete
#if __BYTE_ORDER == __BIG_ENDIAN
[317] Fix | Delete
# define ICMP6_RR_RESULT_FLAGS_OOB 0x0002
[318] Fix | Delete
# define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001
[319] Fix | Delete
#elif __BYTE_ORDER == __LITTLE_ENDIAN
[320] Fix | Delete
# define ICMP6_RR_RESULT_FLAGS_OOB 0x0200
[321] Fix | Delete
# define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100
[322] Fix | Delete
#endif
[323] Fix | Delete
[324] Fix | Delete
/* Mobile IPv6 extension: Advertisement Interval. */
[325] Fix | Delete
struct nd_opt_adv_interval
[326] Fix | Delete
{
[327] Fix | Delete
uint8_t nd_opt_adv_interval_type;
[328] Fix | Delete
uint8_t nd_opt_adv_interval_len;
[329] Fix | Delete
uint16_t nd_opt_adv_interval_reserved;
[330] Fix | Delete
uint32_t nd_opt_adv_interval_ival;
[331] Fix | Delete
};
[332] Fix | Delete
[333] Fix | Delete
/* Mobile IPv6 extension: Home Agent Info. */
[334] Fix | Delete
struct nd_opt_home_agent_info
[335] Fix | Delete
{
[336] Fix | Delete
uint8_t nd_opt_home_agent_info_type;
[337] Fix | Delete
uint8_t nd_opt_home_agent_info_len;
[338] Fix | Delete
uint16_t nd_opt_home_agent_info_reserved;
[339] Fix | Delete
uint16_t nd_opt_home_agent_info_preference;
[340] Fix | Delete
uint16_t nd_opt_home_agent_info_lifetime;
[341] Fix | Delete
};
[342] Fix | Delete
[343] Fix | Delete
#endif /* netinet/icmpv6.h */
[344] Fix | Delete
[345] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function