add net_info decls

This commit is contained in:
Doug MacEachern 2005-07-11 20:20:56 +00:00
parent 67c3589698
commit 66a262afa8
1 changed files with 18 additions and 4 deletions

View File

@ -383,6 +383,24 @@ sigar_file_system_usage_get(sigar_t *sigar,
const char *dirname, const char *dirname,
sigar_file_system_usage_t *fsusage); sigar_file_system_usage_t *fsusage);
#ifndef INET6_ADDRSTRLEN
# define INET6_ADDRSTRLEN 46
#endif
#define SIGAR_MAXDOMAINNAMELEN 256
typedef struct {
char default_gateway[INET6_ADDRSTRLEN];
char domain[SIGAR_MAXDOMAINNAMELEN];
char dhcp_server[INET6_ADDRSTRLEN];
char primary_dns[INET6_ADDRSTRLEN];
char secondary_dns[INET6_ADDRSTRLEN];
} sigar_net_info_t;
SIGAR_DECLARE(int)
sigar_net_info_get(sigar_t *sigar,
sigar_net_info_t *netinfo);
typedef struct { typedef struct {
sigar_uint64_t sigar_uint64_t
destination, destination,
@ -492,10 +510,6 @@ sigar_net_interface_list_destroy(sigar_t *sigar,
#define SIGAR_NETCONN_RAW 0x40 #define SIGAR_NETCONN_RAW 0x40
#define SIGAR_NETCONN_UNIX 0x80 #define SIGAR_NETCONN_UNIX 0x80
#ifndef INET6_ADDRSTRLEN
# define INET6_ADDRSTRLEN 46
#endif
enum { enum {
SIGAR_TCP_ESTABLISHED = 1, SIGAR_TCP_ESTABLISHED = 1,
SIGAR_TCP_SYN_SENT, SIGAR_TCP_SYN_SENT,