Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/bind9/lwres
File: ipv6.h
/*
[0] Fix | Delete
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
#ifndef LWRES_IPV6_H
[11] Fix | Delete
#define LWRES_IPV6_H 1
[12] Fix | Delete
[13] Fix | Delete
/*****
[14] Fix | Delete
***** Module Info
[15] Fix | Delete
*****/
[16] Fix | Delete
[17] Fix | Delete
/*! \file lwres/ipv6.h
[18] Fix | Delete
* IPv6 definitions for systems which do not support IPv6.
[19] Fix | Delete
*/
[20] Fix | Delete
[21] Fix | Delete
/***
[22] Fix | Delete
*** Imports.
[23] Fix | Delete
***/
[24] Fix | Delete
[25] Fix | Delete
#include <inttypes.h>
[26] Fix | Delete
[27] Fix | Delete
#include <lwres/platform.h>
[28] Fix | Delete
[29] Fix | Delete
/***
[30] Fix | Delete
*** Types.
[31] Fix | Delete
***/
[32] Fix | Delete
[33] Fix | Delete
/*% in6_addr structure */
[34] Fix | Delete
struct in6_addr {
[35] Fix | Delete
union {
[36] Fix | Delete
uint8_t _S6_u8[16];
[37] Fix | Delete
uint16_t _S6_u16[8];
[38] Fix | Delete
uint32_t _S6_u32[4];
[39] Fix | Delete
} _S6_un;
[40] Fix | Delete
};
[41] Fix | Delete
/*@{*/
[42] Fix | Delete
/*% IP v6 types */
[43] Fix | Delete
#define s6_addr _S6_un._S6_u8
[44] Fix | Delete
#define s6_addr8 _S6_un._S6_u8
[45] Fix | Delete
#define s6_addr16 _S6_un._S6_u16
[46] Fix | Delete
#define s6_addr32 _S6_un._S6_u32
[47] Fix | Delete
/*@}*/
[48] Fix | Delete
[49] Fix | Delete
#define IN6ADDR_ANY_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}}
[50] Fix | Delete
#define IN6ADDR_LOOPBACK_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}}
[51] Fix | Delete
[52] Fix | Delete
LIBLWRES_EXTERNAL_DATA extern const struct in6_addr in6addr_any;
[53] Fix | Delete
LIBLWRES_EXTERNAL_DATA extern const struct in6_addr in6addr_loopback;
[54] Fix | Delete
[55] Fix | Delete
/*% used in getaddrinfo.c and getnameinfo.c */
[56] Fix | Delete
struct sockaddr_in6 {
[57] Fix | Delete
#ifdef LWRES_PLATFORM_HAVESALEN
[58] Fix | Delete
uint8_t sin6_len;
[59] Fix | Delete
uint8_t sin6_family;
[60] Fix | Delete
#else
[61] Fix | Delete
uint16_t sin6_family;
[62] Fix | Delete
#endif
[63] Fix | Delete
uint16_t sin6_port;
[64] Fix | Delete
uint32_t sin6_flowinfo;
[65] Fix | Delete
struct in6_addr sin6_addr;
[66] Fix | Delete
uint32_t sin6_scope_id;
[67] Fix | Delete
};
[68] Fix | Delete
[69] Fix | Delete
#ifdef LWRES_PLATFORM_HAVESALEN
[70] Fix | Delete
#define SIN6_LEN 1
[71] Fix | Delete
#endif
[72] Fix | Delete
[73] Fix | Delete
/*% in6_pktinfo structure */
[74] Fix | Delete
struct in6_pktinfo {
[75] Fix | Delete
struct in6_addr ipi6_addr; /*%< src/dst IPv6 address */
[76] Fix | Delete
unsigned int ipi6_ifindex; /*%< send/recv interface index */
[77] Fix | Delete
};
[78] Fix | Delete
[79] Fix | Delete
/*!
[80] Fix | Delete
* Unspecified IPv6 address
[81] Fix | Delete
*/
[82] Fix | Delete
#define IN6_IS_ADDR_UNSPECIFIED(a) \
[83] Fix | Delete
(((a)->s6_addr32[0] == 0) && \
[84] Fix | Delete
((a)->s6_addr32[1] == 0) && \
[85] Fix | Delete
((a)->s6_addr32[2] == 0) && \
[86] Fix | Delete
((a)->s6_addr32[3] == 0))
[87] Fix | Delete
[88] Fix | Delete
/*
[89] Fix | Delete
* Loopback
[90] Fix | Delete
*/
[91] Fix | Delete
#define IN6_IS_ADDR_LOOPBACK(a) \
[92] Fix | Delete
(((a)->s6_addr32[0] == 0) && \
[93] Fix | Delete
((a)->s6_addr32[1] == 0) && \
[94] Fix | Delete
((a)->s6_addr32[2] == 0) && \
[95] Fix | Delete
((a)->s6_addr32[3] == htonl(1)))
[96] Fix | Delete
[97] Fix | Delete
/*
[98] Fix | Delete
* IPv4 compatible
[99] Fix | Delete
*/
[100] Fix | Delete
#define IN6_IS_ADDR_V4COMPAT(a) \
[101] Fix | Delete
(((a)->s6_addr32[0] == 0) && \
[102] Fix | Delete
((a)->s6_addr32[1] == 0) && \
[103] Fix | Delete
((a)->s6_addr32[2] == 0) && \
[104] Fix | Delete
((a)->s6_addr32[3] != 0) && \
[105] Fix | Delete
((a)->s6_addr32[3] != htonl(1)))
[106] Fix | Delete
[107] Fix | Delete
/*
[108] Fix | Delete
* Mapped
[109] Fix | Delete
*/
[110] Fix | Delete
#define IN6_IS_ADDR_V4MAPPED(a) \
[111] Fix | Delete
(((a)->s6_addr32[0] == 0) && \
[112] Fix | Delete
((a)->s6_addr32[1] == 0) && \
[113] Fix | Delete
((a)->s6_addr32[2] == htonl(0x0000ffff)))
[114] Fix | Delete
[115] Fix | Delete
#endif /* LWRES_IPV6_H */
[116] Fix | Delete
[117] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function