Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/netinet
File: ip6.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_IP6_H
[17] Fix | Delete
#define _NETINET_IP6_H 1
[18] Fix | Delete
[19] Fix | Delete
#include <inttypes.h>
[20] Fix | Delete
#include <netinet/in.h>
[21] Fix | Delete
[22] Fix | Delete
struct ip6_hdr
[23] Fix | Delete
{
[24] Fix | Delete
union
[25] Fix | Delete
{
[26] Fix | Delete
struct ip6_hdrctl
[27] Fix | Delete
{
[28] Fix | Delete
uint32_t ip6_un1_flow; /* 4 bits version, 8 bits TC,
[29] Fix | Delete
20 bits flow-ID */
[30] Fix | Delete
uint16_t ip6_un1_plen; /* payload length */
[31] Fix | Delete
uint8_t ip6_un1_nxt; /* next header */
[32] Fix | Delete
uint8_t ip6_un1_hlim; /* hop limit */
[33] Fix | Delete
} ip6_un1;
[34] Fix | Delete
uint8_t ip6_un2_vfc; /* 4 bits version, top 4 bits tclass */
[35] Fix | Delete
} ip6_ctlun;
[36] Fix | Delete
struct in6_addr ip6_src; /* source address */
[37] Fix | Delete
struct in6_addr ip6_dst; /* destination address */
[38] Fix | Delete
};
[39] Fix | Delete
[40] Fix | Delete
#define ip6_vfc ip6_ctlun.ip6_un2_vfc
[41] Fix | Delete
#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
[42] Fix | Delete
#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
[43] Fix | Delete
#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
[44] Fix | Delete
#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
[45] Fix | Delete
#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
[46] Fix | Delete
[47] Fix | Delete
/* Generic extension header. */
[48] Fix | Delete
struct ip6_ext
[49] Fix | Delete
{
[50] Fix | Delete
uint8_t ip6e_nxt; /* next header. */
[51] Fix | Delete
uint8_t ip6e_len; /* length in units of 8 octets. */
[52] Fix | Delete
};
[53] Fix | Delete
[54] Fix | Delete
/* Hop-by-Hop options header. */
[55] Fix | Delete
struct ip6_hbh
[56] Fix | Delete
{
[57] Fix | Delete
uint8_t ip6h_nxt; /* next header. */
[58] Fix | Delete
uint8_t ip6h_len; /* length in units of 8 octets. */
[59] Fix | Delete
/* followed by options */
[60] Fix | Delete
};
[61] Fix | Delete
[62] Fix | Delete
/* Destination options header */
[63] Fix | Delete
struct ip6_dest
[64] Fix | Delete
{
[65] Fix | Delete
uint8_t ip6d_nxt; /* next header */
[66] Fix | Delete
uint8_t ip6d_len; /* length in units of 8 octets */
[67] Fix | Delete
/* followed by options */
[68] Fix | Delete
};
[69] Fix | Delete
[70] Fix | Delete
/* Routing header */
[71] Fix | Delete
struct ip6_rthdr
[72] Fix | Delete
{
[73] Fix | Delete
uint8_t ip6r_nxt; /* next header */
[74] Fix | Delete
uint8_t ip6r_len; /* length in units of 8 octets */
[75] Fix | Delete
uint8_t ip6r_type; /* routing type */
[76] Fix | Delete
uint8_t ip6r_segleft; /* segments left */
[77] Fix | Delete
/* followed by routing type specific data */
[78] Fix | Delete
};
[79] Fix | Delete
[80] Fix | Delete
/* Type 0 Routing header */
[81] Fix | Delete
struct ip6_rthdr0
[82] Fix | Delete
{
[83] Fix | Delete
uint8_t ip6r0_nxt; /* next header */
[84] Fix | Delete
uint8_t ip6r0_len; /* length in units of 8 octets */
[85] Fix | Delete
uint8_t ip6r0_type; /* always zero */
[86] Fix | Delete
uint8_t ip6r0_segleft; /* segments left */
[87] Fix | Delete
uint8_t ip6r0_reserved; /* reserved field */
[88] Fix | Delete
uint8_t ip6r0_slmap[3]; /* strict/loose bit map */
[89] Fix | Delete
/* followed by up to 127 struct in6_addr */
[90] Fix | Delete
struct in6_addr ip6r0_addr[0];
[91] Fix | Delete
};
[92] Fix | Delete
[93] Fix | Delete
/* Fragment header */
[94] Fix | Delete
struct ip6_frag
[95] Fix | Delete
{
[96] Fix | Delete
uint8_t ip6f_nxt; /* next header */
[97] Fix | Delete
uint8_t ip6f_reserved; /* reserved field */
[98] Fix | Delete
uint16_t ip6f_offlg; /* offset, reserved, and flag */
[99] Fix | Delete
uint32_t ip6f_ident; /* identification */
[100] Fix | Delete
};
[101] Fix | Delete
[102] Fix | Delete
#if __BYTE_ORDER == __BIG_ENDIAN
[103] Fix | Delete
# define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */
[104] Fix | Delete
# define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */
[105] Fix | Delete
# define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */
[106] Fix | Delete
#else /* __BYTE_ORDER == __LITTLE_ENDIAN */
[107] Fix | Delete
# define IP6F_OFF_MASK 0xf8ff /* mask out offset from _offlg */
[108] Fix | Delete
# define IP6F_RESERVED_MASK 0x0600 /* reserved bits in ip6f_offlg */
[109] Fix | Delete
# define IP6F_MORE_FRAG 0x0100 /* more-fragments flag */
[110] Fix | Delete
#endif
[111] Fix | Delete
[112] Fix | Delete
/* IPv6 options */
[113] Fix | Delete
struct ip6_opt
[114] Fix | Delete
{
[115] Fix | Delete
uint8_t ip6o_type;
[116] Fix | Delete
uint8_t ip6o_len;
[117] Fix | Delete
};
[118] Fix | Delete
[119] Fix | Delete
/* The high-order 3 bits of the option type define the behavior
[120] Fix | Delete
* when processing an unknown option and whether or not the option
[121] Fix | Delete
* content changes in flight.
[122] Fix | Delete
*/
[123] Fix | Delete
#define IP6OPT_TYPE(o) ((o) & 0xc0)
[124] Fix | Delete
#define IP6OPT_TYPE_SKIP 0x00
[125] Fix | Delete
#define IP6OPT_TYPE_DISCARD 0x40
[126] Fix | Delete
#define IP6OPT_TYPE_FORCEICMP 0x80
[127] Fix | Delete
#define IP6OPT_TYPE_ICMP 0xc0
[128] Fix | Delete
#define IP6OPT_TYPE_MUTABLE 0x20
[129] Fix | Delete
[130] Fix | Delete
/* Special option types for padding. */
[131] Fix | Delete
#define IP6OPT_PAD1 0
[132] Fix | Delete
#define IP6OPT_PADN 1
[133] Fix | Delete
[134] Fix | Delete
#define IP6OPT_JUMBO 0xc2
[135] Fix | Delete
#define IP6OPT_NSAP_ADDR 0xc3
[136] Fix | Delete
#define IP6OPT_TUNNEL_LIMIT 0x04
[137] Fix | Delete
#define IP6OPT_ROUTER_ALERT 0x05
[138] Fix | Delete
[139] Fix | Delete
/* Jumbo Payload Option */
[140] Fix | Delete
struct ip6_opt_jumbo
[141] Fix | Delete
{
[142] Fix | Delete
uint8_t ip6oj_type;
[143] Fix | Delete
uint8_t ip6oj_len;
[144] Fix | Delete
uint8_t ip6oj_jumbo_len[4];
[145] Fix | Delete
};
[146] Fix | Delete
#define IP6OPT_JUMBO_LEN 6
[147] Fix | Delete
[148] Fix | Delete
/* NSAP Address Option */
[149] Fix | Delete
struct ip6_opt_nsap
[150] Fix | Delete
{
[151] Fix | Delete
uint8_t ip6on_type;
[152] Fix | Delete
uint8_t ip6on_len;
[153] Fix | Delete
uint8_t ip6on_src_nsap_len;
[154] Fix | Delete
uint8_t ip6on_dst_nsap_len;
[155] Fix | Delete
/* followed by source NSAP */
[156] Fix | Delete
/* followed by destination NSAP */
[157] Fix | Delete
};
[158] Fix | Delete
[159] Fix | Delete
/* Tunnel Limit Option */
[160] Fix | Delete
struct ip6_opt_tunnel
[161] Fix | Delete
{
[162] Fix | Delete
uint8_t ip6ot_type;
[163] Fix | Delete
uint8_t ip6ot_len;
[164] Fix | Delete
uint8_t ip6ot_encap_limit;
[165] Fix | Delete
};
[166] Fix | Delete
[167] Fix | Delete
/* Router Alert Option */
[168] Fix | Delete
struct ip6_opt_router
[169] Fix | Delete
{
[170] Fix | Delete
uint8_t ip6or_type;
[171] Fix | Delete
uint8_t ip6or_len;
[172] Fix | Delete
uint8_t ip6or_value[2];
[173] Fix | Delete
};
[174] Fix | Delete
[175] Fix | Delete
/* Router alert values (in network byte order) */
[176] Fix | Delete
#if __BYTE_ORDER == __BIG_ENDIAN
[177] Fix | Delete
# define IP6_ALERT_MLD 0x0000
[178] Fix | Delete
# define IP6_ALERT_RSVP 0x0001
[179] Fix | Delete
# define IP6_ALERT_AN 0x0002
[180] Fix | Delete
#else /* __BYTE_ORDER == __LITTLE_ENDIAN */
[181] Fix | Delete
# define IP6_ALERT_MLD 0x0000
[182] Fix | Delete
# define IP6_ALERT_RSVP 0x0100
[183] Fix | Delete
# define IP6_ALERT_AN 0x0200
[184] Fix | Delete
#endif
[185] Fix | Delete
[186] Fix | Delete
#endif /* netinet/ip6.h */
[187] Fix | Delete
[188] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function