Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/bind9/isc
File: netaddr.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
[11] Fix | Delete
#ifndef ISC_NETADDR_H
[12] Fix | Delete
#define ISC_NETADDR_H 1
[13] Fix | Delete
[14] Fix | Delete
/*! \file isc/netaddr.h */
[15] Fix | Delete
[16] Fix | Delete
#include <inttypes.h>
[17] Fix | Delete
#include <stdbool.h>
[18] Fix | Delete
[19] Fix | Delete
#include <isc/lang.h>
[20] Fix | Delete
#include <isc/net.h>
[21] Fix | Delete
#include <isc/types.h>
[22] Fix | Delete
[23] Fix | Delete
#ifdef ISC_PLATFORM_HAVESYSUNH
[24] Fix | Delete
#include <sys/types.h>
[25] Fix | Delete
#include <sys/un.h>
[26] Fix | Delete
#endif
[27] Fix | Delete
[28] Fix | Delete
ISC_LANG_BEGINDECLS
[29] Fix | Delete
[30] Fix | Delete
struct isc_netaddr {
[31] Fix | Delete
unsigned int family;
[32] Fix | Delete
union {
[33] Fix | Delete
struct in_addr in;
[34] Fix | Delete
struct in6_addr in6;
[35] Fix | Delete
#ifdef ISC_PLATFORM_HAVESYSUNH
[36] Fix | Delete
char un[sizeof(((struct sockaddr_un *)0)->sun_path)];
[37] Fix | Delete
#endif
[38] Fix | Delete
} type;
[39] Fix | Delete
uint32_t zone;
[40] Fix | Delete
};
[41] Fix | Delete
[42] Fix | Delete
bool
[43] Fix | Delete
isc_netaddr_equal(const isc_netaddr_t *a, const isc_netaddr_t *b);
[44] Fix | Delete
[45] Fix | Delete
/*%<
[46] Fix | Delete
* Compare network addresses 'a' and 'b'. Return #true if
[47] Fix | Delete
* they are equal, #false if not.
[48] Fix | Delete
*/
[49] Fix | Delete
[50] Fix | Delete
bool
[51] Fix | Delete
isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
[52] Fix | Delete
unsigned int prefixlen);
[53] Fix | Delete
/*%<
[54] Fix | Delete
* Compare the 'prefixlen' most significant bits of the network
[55] Fix | Delete
* addresses 'a' and 'b'. If 'b''s scope is zero then 'a''s scope is
[56] Fix | Delete
* ignored. Return #true if they are equal, #false if not.
[57] Fix | Delete
*/
[58] Fix | Delete
[59] Fix | Delete
isc_result_t
[60] Fix | Delete
isc_netaddr_masktoprefixlen(const isc_netaddr_t *s, unsigned int *lenp);
[61] Fix | Delete
/*%<
[62] Fix | Delete
* Convert a netmask in 's' into a prefix length in '*lenp'.
[63] Fix | Delete
* The mask should consist of zero or more '1' bits in the
[64] Fix | Delete
* most significant part of the address, followed by '0' bits.
[65] Fix | Delete
* If this is not the case, #ISC_R_MASKNONCONTIG is returned.
[66] Fix | Delete
*
[67] Fix | Delete
* Returns:
[68] Fix | Delete
*\li #ISC_R_SUCCESS
[69] Fix | Delete
*\li #ISC_R_MASKNONCONTIG
[70] Fix | Delete
*/
[71] Fix | Delete
[72] Fix | Delete
isc_result_t
[73] Fix | Delete
isc_netaddr_totext(const isc_netaddr_t *netaddr, isc_buffer_t *target);
[74] Fix | Delete
/*%<
[75] Fix | Delete
* Append a text representation of 'sockaddr' to the buffer 'target'.
[76] Fix | Delete
* The text is NOT null terminated. Handles IPv4 and IPv6 addresses.
[77] Fix | Delete
*
[78] Fix | Delete
* Returns:
[79] Fix | Delete
*\li #ISC_R_SUCCESS
[80] Fix | Delete
*\li #ISC_R_NOSPACE The text or the null termination did not fit.
[81] Fix | Delete
*\li #ISC_R_FAILURE Unspecified failure
[82] Fix | Delete
*/
[83] Fix | Delete
[84] Fix | Delete
void
[85] Fix | Delete
isc_netaddr_format(const isc_netaddr_t *na, char *array, unsigned int size);
[86] Fix | Delete
/*%<
[87] Fix | Delete
* Format a human-readable representation of the network address '*na'
[88] Fix | Delete
* into the character array 'array', which is of size 'size'.
[89] Fix | Delete
* The resulting string is guaranteed to be null-terminated.
[90] Fix | Delete
*/
[91] Fix | Delete
[92] Fix | Delete
#define ISC_NETADDR_FORMATSIZE \
[93] Fix | Delete
sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX%SSSSSSSSSS")
[94] Fix | Delete
/*%<
[95] Fix | Delete
* Minimum size of array to pass to isc_netaddr_format().
[96] Fix | Delete
*/
[97] Fix | Delete
[98] Fix | Delete
void
[99] Fix | Delete
isc_netaddr_fromsockaddr(isc_netaddr_t *netaddr, const isc_sockaddr_t *source);
[100] Fix | Delete
[101] Fix | Delete
void
[102] Fix | Delete
isc_netaddr_fromin(isc_netaddr_t *netaddr, const struct in_addr *ina);
[103] Fix | Delete
[104] Fix | Delete
void
[105] Fix | Delete
isc_netaddr_fromin6(isc_netaddr_t *netaddr, const struct in6_addr *ina6);
[106] Fix | Delete
[107] Fix | Delete
isc_result_t
[108] Fix | Delete
isc_netaddr_frompath(isc_netaddr_t *netaddr, const char *path);
[109] Fix | Delete
[110] Fix | Delete
void
[111] Fix | Delete
isc_netaddr_setzone(isc_netaddr_t *netaddr, uint32_t zone);
[112] Fix | Delete
[113] Fix | Delete
uint32_t
[114] Fix | Delete
isc_netaddr_getzone(const isc_netaddr_t *netaddr);
[115] Fix | Delete
[116] Fix | Delete
void
[117] Fix | Delete
isc_netaddr_any(isc_netaddr_t *netaddr);
[118] Fix | Delete
/*%<
[119] Fix | Delete
* Return the IPv4 wildcard address.
[120] Fix | Delete
*/
[121] Fix | Delete
[122] Fix | Delete
void
[123] Fix | Delete
isc_netaddr_any6(isc_netaddr_t *netaddr);
[124] Fix | Delete
/*%<
[125] Fix | Delete
* Return the IPv6 wildcard address.
[126] Fix | Delete
*/
[127] Fix | Delete
[128] Fix | Delete
bool
[129] Fix | Delete
isc_netaddr_ismulticast(isc_netaddr_t *na);
[130] Fix | Delete
/*%<
[131] Fix | Delete
* Returns true if the address is a multicast address.
[132] Fix | Delete
*/
[133] Fix | Delete
[134] Fix | Delete
bool
[135] Fix | Delete
isc_netaddr_isexperimental(isc_netaddr_t *na);
[136] Fix | Delete
/*%<
[137] Fix | Delete
* Returns true if the address is a experimental (CLASS E) address.
[138] Fix | Delete
*/
[139] Fix | Delete
[140] Fix | Delete
bool
[141] Fix | Delete
isc_netaddr_islinklocal(isc_netaddr_t *na);
[142] Fix | Delete
/*%<
[143] Fix | Delete
* Returns #true if the address is a link local address.
[144] Fix | Delete
*/
[145] Fix | Delete
[146] Fix | Delete
bool
[147] Fix | Delete
isc_netaddr_issitelocal(isc_netaddr_t *na);
[148] Fix | Delete
/*%<
[149] Fix | Delete
* Returns #true if the address is a site local address.
[150] Fix | Delete
*/
[151] Fix | Delete
[152] Fix | Delete
bool
[153] Fix | Delete
isc_netaddr_isnetzero(isc_netaddr_t *na);
[154] Fix | Delete
/*%<
[155] Fix | Delete
* Returns #true if the address is in net zero.
[156] Fix | Delete
*/
[157] Fix | Delete
[158] Fix | Delete
void
[159] Fix | Delete
isc_netaddr_fromv4mapped(isc_netaddr_t *t, const isc_netaddr_t *s);
[160] Fix | Delete
/*%<
[161] Fix | Delete
* Convert an IPv6 v4mapped address into an IPv4 address.
[162] Fix | Delete
*/
[163] Fix | Delete
[164] Fix | Delete
isc_result_t
[165] Fix | Delete
isc_netaddr_prefixok(const isc_netaddr_t *na, unsigned int prefixlen);
[166] Fix | Delete
/*
[167] Fix | Delete
* Test whether the netaddr 'na' and 'prefixlen' are consistent.
[168] Fix | Delete
* e.g. prefixlen within range.
[169] Fix | Delete
* na does not have bits set which are not covered by the prefixlen.
[170] Fix | Delete
*
[171] Fix | Delete
* Returns:
[172] Fix | Delete
* ISC_R_SUCCESS
[173] Fix | Delete
* ISC_R_RANGE prefixlen out of range
[174] Fix | Delete
* ISC_R_NOTIMPLEMENTED unsupported family
[175] Fix | Delete
* ISC_R_FAILURE extra bits.
[176] Fix | Delete
*/
[177] Fix | Delete
[178] Fix | Delete
bool
[179] Fix | Delete
isc_netaddr_isloopback(const isc_netaddr_t *na);
[180] Fix | Delete
/*
[181] Fix | Delete
* Test whether the netaddr 'na' is a loopback IPv4 or IPv6 address (in
[182] Fix | Delete
* 127.0.0.0/8 or ::1).
[183] Fix | Delete
*/
[184] Fix | Delete
ISC_LANG_ENDDECLS
[185] Fix | Delete
[186] Fix | Delete
#endif /* ISC_NETADDR_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