Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/bind9/isc
File: interfaceiter.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_INTERFACEITER_H
[12] Fix | Delete
#define ISC_INTERFACEITER_H 1
[13] Fix | Delete
[14] Fix | Delete
/*****
[15] Fix | Delete
***** Module Info
[16] Fix | Delete
*****/
[17] Fix | Delete
[18] Fix | Delete
/*! \file isc/interfaceiter.h
[19] Fix | Delete
* \brief Iterates over the list of network interfaces.
[20] Fix | Delete
*
[21] Fix | Delete
* Interfaces whose address family is not supported are ignored and never
[22] Fix | Delete
* returned by the iterator. Interfaces whose netmask, interface flags,
[23] Fix | Delete
* or similar cannot be obtained are also ignored, and the failure is logged.
[24] Fix | Delete
*
[25] Fix | Delete
* Standards:
[26] Fix | Delete
* The API for scanning varies greatly among operating systems.
[27] Fix | Delete
* This module attempts to hide the differences.
[28] Fix | Delete
*/
[29] Fix | Delete
[30] Fix | Delete
/***
[31] Fix | Delete
*** Imports
[32] Fix | Delete
***/
[33] Fix | Delete
[34] Fix | Delete
#include <inttypes.h>
[35] Fix | Delete
[36] Fix | Delete
#include <isc/lang.h>
[37] Fix | Delete
#include <isc/netaddr.h>
[38] Fix | Delete
#include <isc/types.h>
[39] Fix | Delete
[40] Fix | Delete
/*!
[41] Fix | Delete
* \brief Public structure describing a network interface.
[42] Fix | Delete
*/
[43] Fix | Delete
[44] Fix | Delete
struct isc_interface {
[45] Fix | Delete
char name[32]; /*%< Interface name, null-terminated. */
[46] Fix | Delete
unsigned int af; /*%< Address family. */
[47] Fix | Delete
isc_netaddr_t address; /*%< Local address. */
[48] Fix | Delete
isc_netaddr_t netmask; /*%< Network mask. */
[49] Fix | Delete
isc_netaddr_t dstaddress; /*%< Destination address (point-to-point only). */
[50] Fix | Delete
uint32_t flags; /*%< Flags; see INTERFACE flags. */
[51] Fix | Delete
};
[52] Fix | Delete
[53] Fix | Delete
/*@{*/
[54] Fix | Delete
/*! Interface flags. */
[55] Fix | Delete
[56] Fix | Delete
#define INTERFACE_F_UP 0x00000001U
[57] Fix | Delete
#define INTERFACE_F_POINTTOPOINT 0x00000002U
[58] Fix | Delete
#define INTERFACE_F_LOOPBACK 0x00000004U
[59] Fix | Delete
/*@}*/
[60] Fix | Delete
[61] Fix | Delete
/***
[62] Fix | Delete
*** Functions
[63] Fix | Delete
***/
[64] Fix | Delete
[65] Fix | Delete
ISC_LANG_BEGINDECLS
[66] Fix | Delete
[67] Fix | Delete
isc_result_t
[68] Fix | Delete
isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp);
[69] Fix | Delete
/*!<
[70] Fix | Delete
* \brief Create an iterator for traversing the operating system's list
[71] Fix | Delete
* of network interfaces.
[72] Fix | Delete
*
[73] Fix | Delete
* Returns:
[74] Fix | Delete
*\li #ISC_R_SUCCESS
[75] Fix | Delete
* \li #ISC_R_NOMEMORY
[76] Fix | Delete
*\li Various network-related errors
[77] Fix | Delete
*/
[78] Fix | Delete
[79] Fix | Delete
isc_result_t
[80] Fix | Delete
isc_interfaceiter_first(isc_interfaceiter_t *iter);
[81] Fix | Delete
/*!<
[82] Fix | Delete
* \brief Position the iterator on the first interface.
[83] Fix | Delete
*
[84] Fix | Delete
* Returns:
[85] Fix | Delete
*\li #ISC_R_SUCCESS Success.
[86] Fix | Delete
*\li #ISC_R_NOMORE There are no interfaces.
[87] Fix | Delete
*/
[88] Fix | Delete
[89] Fix | Delete
isc_result_t
[90] Fix | Delete
isc_interfaceiter_current(isc_interfaceiter_t *iter,
[91] Fix | Delete
isc_interface_t *ifdata);
[92] Fix | Delete
/*!<
[93] Fix | Delete
* \brief Get information about the interface the iterator is currently
[94] Fix | Delete
* positioned at and store it at *ifdata.
[95] Fix | Delete
*
[96] Fix | Delete
* Requires:
[97] Fix | Delete
*\li The iterator has been successfully positioned using
[98] Fix | Delete
* isc_interface_iter_first() / isc_interface_iter_next().
[99] Fix | Delete
*
[100] Fix | Delete
* Returns:
[101] Fix | Delete
*\li #ISC_R_SUCCESS Success.
[102] Fix | Delete
*/
[103] Fix | Delete
[104] Fix | Delete
isc_result_t
[105] Fix | Delete
isc_interfaceiter_next(isc_interfaceiter_t *iter);
[106] Fix | Delete
/*!<
[107] Fix | Delete
* \brief Position the iterator on the next interface.
[108] Fix | Delete
*
[109] Fix | Delete
* Requires:
[110] Fix | Delete
* \li The iterator has been successfully positioned using
[111] Fix | Delete
* isc_interface_iter_first() / isc_interface_iter_next().
[112] Fix | Delete
*
[113] Fix | Delete
* Returns:
[114] Fix | Delete
*\li #ISC_R_SUCCESS Success.
[115] Fix | Delete
*\li #ISC_R_NOMORE There are no more interfaces.
[116] Fix | Delete
*/
[117] Fix | Delete
[118] Fix | Delete
void
[119] Fix | Delete
isc_interfaceiter_destroy(isc_interfaceiter_t **iterp);
[120] Fix | Delete
/*!<
[121] Fix | Delete
* \brief Destroy the iterator.
[122] Fix | Delete
*/
[123] Fix | Delete
[124] Fix | Delete
ISC_LANG_ENDDECLS
[125] Fix | Delete
[126] Fix | Delete
#endif /* ISC_INTERFACEITER_H */
[127] Fix | Delete
[128] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function