Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libifconfig/libifconfig.h
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
* Opaque definition so calling application can just pass a | * Opaque definition so calling application can just pass a | ||||
* pointer to it for library use. | * pointer to it for library use. | ||||
*/ | */ | ||||
struct ifconfig_handle; | struct ifconfig_handle; | ||||
typedef struct ifconfig_handle ifconfig_handle_t; | typedef struct ifconfig_handle ifconfig_handle_t; | ||||
struct carpreq; | struct carpreq; | ||||
struct ifaddrs; | struct ifaddrs; | ||||
struct ifbropreq; | |||||
struct ifbreq; | |||||
struct in6_ndireq; | struct in6_ndireq; | ||||
struct lagg_reqall; | struct lagg_reqall; | ||||
struct lagg_reqflags; | struct lagg_reqflags; | ||||
struct lagg_reqopts; | struct lagg_reqopts; | ||||
struct lagg_reqport; | struct lagg_reqport; | ||||
/** Stores extra info associated with a bridge(4) interface */ | |||||
struct ifconfig_bridge_status { | |||||
struct ifbropreq *params; /**< current operational parameters */ | |||||
struct ifbreq *members; /**< list of bridge members */ | |||||
size_t members_count; /**< how many member interfaces */ | |||||
uint32_t cache_size; /**< size of address cache */ | |||||
uint32_t cache_lifetime; /**< address cache entry lifetime */ | |||||
}; | |||||
struct ifconfig_capabilities { | struct ifconfig_capabilities { | ||||
/** Current capabilities (ifconfig prints this as 'options')*/ | /** Current capabilities (ifconfig prints this as 'options')*/ | ||||
int curcap; | int curcap; | ||||
/** Requested capabilities (ifconfig prints this as 'capabilities')*/ | /** Requested capabilities (ifconfig prints this as 'capabilities')*/ | ||||
int reqcap; | int reqcap; | ||||
}; | }; | ||||
/** Stores extra info associated with an inet address */ | /** Stores extra info associated with an inet address */ | ||||
▲ Show 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | |||||
* @param ifa Pointer to the the address structure of interest | * @param ifa Pointer to the the address structure of interest | ||||
* @param addr Return argument. It will be filled with additional information | * @param addr Return argument. It will be filled with additional information | ||||
* about the address. | * about the address. | ||||
* @return 0 on success, nonzero on failure. | * @return 0 on success, nonzero on failure. | ||||
*/ | */ | ||||
int ifconfig_inet6_get_addrinfo(ifconfig_handle_t *h, | int ifconfig_inet6_get_addrinfo(ifconfig_handle_t *h, | ||||
const char *name, struct ifaddrs *ifa, struct ifconfig_inet6_addr *addr); | const char *name, struct ifaddrs *ifa, struct ifconfig_inet6_addr *addr); | ||||
/** Retrieve additional information about a bridge(4) interface */ | |||||
int ifconfig_bridge_get_bridge_status(ifconfig_handle_t *h, | |||||
const char *name, struct ifconfig_bridge_status **bridge); | |||||
/** Frees the structure returned by ifconfig_bridge_get_bridge_status. Does | |||||
* nothing if the argument is NULL | |||||
* @param bridge Pointer to the structure to free | |||||
*/ | |||||
void ifconfig_bridge_free_bridge_status(struct ifconfig_bridge_status *bridge); | |||||
/** Retrieve additional information about a lagg(4) interface */ | /** Retrieve additional information about a lagg(4) interface */ | ||||
int ifconfig_lagg_get_lagg_status(ifconfig_handle_t *h, | int ifconfig_lagg_get_lagg_status(ifconfig_handle_t *h, | ||||
const char *name, struct ifconfig_lagg_status **lagg_status); | const char *name, struct ifconfig_lagg_status **lagg_status); | ||||
/** Retrieve additional information about a member of a lagg(4) interface */ | /** Retrieve additional information about a member of a lagg(4) interface */ | ||||
int ifconfig_lagg_get_laggport_status(ifconfig_handle_t *h, | int ifconfig_lagg_get_laggport_status(ifconfig_handle_t *h, | ||||
const char *name, struct lagg_reqport *rp); | const char *name, struct lagg_reqport *rp); | ||||
/** Frees the structure returned by ifconfig_lagg_get_status. Does nothing if | /** Frees the structure returned by ifconfig_lagg_get_lagg_status. Does | ||||
* the argument is NULL | * nothing if the argument is NULL | ||||
* @param laggstat Pointer to the structure to free | * @param laggstat Pointer to the structure to free | ||||
*/ | */ | ||||
void ifconfig_lagg_free_lagg_status(struct ifconfig_lagg_status *laggstat); | void ifconfig_lagg_free_lagg_status(struct ifconfig_lagg_status *laggstat); | ||||
/** Destroy a virtual interface | /** Destroy a virtual interface | ||||
* @param name Interface to destroy | * @param name Interface to destroy | ||||
*/ | */ | ||||
int ifconfig_destroy_interface(ifconfig_handle_t *h, const char *name); | int ifconfig_destroy_interface(ifconfig_handle_t *h, const char *name); | ||||
Show All 19 Lines |