stub net_interface_config ipv6 support

This commit is contained in:
Doug MacEachern 2009-07-24 17:13:19 -07:00
parent 1a9eaa800f
commit 0e763c13e2
9 changed files with 56 additions and 0 deletions

View File

@ -596,6 +596,9 @@ typedef struct {
sigar_net_address_t destination; sigar_net_address_t destination;
sigar_net_address_t broadcast; sigar_net_address_t broadcast;
sigar_net_address_t netmask; sigar_net_address_t netmask;
sigar_net_address_t address6;
int prefix_length;
int scope;
sigar_uint64_t sigar_uint64_t
flags, flags,
mtu, mtu,

View File

@ -291,6 +291,14 @@ int sigar_net_connection_list_grow(sigar_net_connection_list_t *connlist);
SIGAR_ZERO(&ifconfig->hwaddr.addr.mac); \ SIGAR_ZERO(&ifconfig->hwaddr.addr.mac); \
ifconfig->hwaddr.family = SIGAR_AF_LINK ifconfig->hwaddr.family = SIGAR_AF_LINK
int sigar_net_interface_ipv6_config_get(sigar_t *sigar, const char *name,
sigar_net_interface_config_t *ifconfig);
#define sigar_net_interface_ipv6_config_init(ifconfig) \
ifconfig->address6.family = SIGAR_AF_INET6; \
ifconfig->prefix_length = 0; \
ifconfig->scope = 0
int sigar_tcp_curr_estab(sigar_t *sigar, sigar_tcp_t *tcp); int sigar_tcp_curr_estab(sigar_t *sigar, sigar_tcp_t *tcp);
int sigar_who_list_create(sigar_who_list_t *wholist); int sigar_who_list_create(sigar_who_list_t *wholist);

View File

@ -1507,6 +1507,12 @@ int sigar_net_interface_stat_get(sigar_t *sigar,
} }
} }
int sigar_net_interface_ipv6_config_get(sigar_t *sigar, const char *name,
sigar_net_interface_config_t *ifconfig)
{
return SIGAR_ENOTIMPL;
}
#define IS_TCP_SERVER(state, flags) \ #define IS_TCP_SERVER(state, flags) \
((flags & SIGAR_NETCONN_SERVER) && (state == TCPS_LISTEN)) ((flags & SIGAR_NETCONN_SERVER) && (state == TCPS_LISTEN))

View File

@ -2593,6 +2593,12 @@ int sigar_net_interface_list_get(sigar_t *sigar,
return sigar_ifmsg_iter(sigar, &iter); return sigar_ifmsg_iter(sigar, &iter);
} }
int sigar_net_interface_ipv6_config_get(sigar_t *sigar, const char *name,
sigar_net_interface_config_t *ifconfig)
{
return SIGAR_ENOTIMPL;
}
int sigar_net_interface_config_get(sigar_t *sigar, const char *name, int sigar_net_interface_config_get(sigar_t *sigar, const char *name,
sigar_net_interface_config_t *ifconfig) sigar_net_interface_config_t *ifconfig)
{ {
@ -2682,6 +2688,9 @@ int sigar_net_interface_config_get(sigar_t *sigar, const char *name,
SIGAR_SSTRCPY(ifconfig->description, SIGAR_SSTRCPY(ifconfig->description,
ifconfig->name); ifconfig->name);
sigar_net_interface_ipv6_config_init(ifconfig);
sigar_net_interface_ipv6_config_get(sigar, name, ifconfig);
return SIGAR_OK; return SIGAR_OK;
} }

View File

@ -872,6 +872,12 @@ int sigar_net_interface_stat_get(sigar_t *sigar, const char *name,
return SIGAR_OK; return SIGAR_OK;
} }
int sigar_net_interface_ipv6_config_get(sigar_t *sigar, const char *name,
sigar_net_interface_config_t *ifconfig)
{
return SIGAR_ENOTIMPL;
}
static int net_conn_get_udp_listen(sigar_net_connection_walker_t *walker) static int net_conn_get_udp_listen(sigar_net_connection_walker_t *walker)
{ {
sigar_t *sigar = walker->sigar; sigar_t *sigar = walker->sigar;

View File

@ -2092,6 +2092,12 @@ static int sigar_net_connection_get(sigar_t *sigar,
return status; return status;
} }
int sigar_net_interface_ipv6_config_get(sigar_t *sigar, const char *name,
sigar_net_interface_config_t *ifconfig)
{
return SIGAR_ENOTIMPL;
}
#define SNMP_TCP_PREFIX "Tcp: " #define SNMP_TCP_PREFIX "Tcp: "
SIGAR_DECLARE(int) SIGAR_DECLARE(int)

View File

@ -2083,6 +2083,12 @@ int sigar_net_interface_stat_get(sigar_t *sigar, const char *name,
} }
} }
int sigar_net_interface_ipv6_config_get(sigar_t *sigar, const char *name,
sigar_net_interface_config_t *ifconfig)
{
return SIGAR_ENOTIMPL;
}
#define TCPQ_SIZE(s) ((s) >= 0 ? (s) : 0) #define TCPQ_SIZE(s) ((s) >= 0 ? (s) : 0)
static int tcp_connection_get(sigar_net_connection_walker_t *walker, static int tcp_connection_get(sigar_net_connection_walker_t *walker,

View File

@ -2637,6 +2637,12 @@ sigar_net_interface_list_get(sigar_t *sigar,
return SIGAR_OK; return SIGAR_OK;
} }
int sigar_net_interface_ipv6_config_get(sigar_t *sigar, const char *name,
sigar_net_interface_config_t *ifconfig)
{
return SIGAR_ENOTIMPL;
}
SIGAR_DECLARE(int) SIGAR_DECLARE(int)
sigar_net_interface_config_get(sigar_t *sigar, sigar_net_interface_config_get(sigar_t *sigar,
const char *name, const char *name,
@ -2717,6 +2723,9 @@ sigar_net_interface_config_get(sigar_t *sigar,
SIGAR_NIC_ETHERNET); SIGAR_NIC_ETHERNET);
} }
sigar_net_interface_ipv6_config_init(ifconfig);
sigar_net_interface_ipv6_config_get(sigar, name, ifconfig);
return SIGAR_OK; return SIGAR_OK;
} }

View File

@ -1642,6 +1642,9 @@ int sigar_net_interface_config_get(sigar_t *sigar, const char *name,
SIGAR_SSTRCPY(ifconfig->description, SIGAR_SSTRCPY(ifconfig->description,
ifconfig->name); ifconfig->name);
sigar_net_interface_ipv6_config_init(ifconfig);
sigar_net_interface_ipv6_config_get(sigar, name, ifconfig);
return SIGAR_OK; return SIGAR_OK;
} }