convert NetAddr to string

This commit is contained in:
Doug MacEachern 2004-09-17 20:21:39 +00:00
parent 70e3f80232
commit 1e469bdded
2 changed files with 10 additions and 0 deletions

View File

@ -6,6 +6,7 @@
#include "sigar_fileinfo.h"
typedef sigar_t * Sigar;
typedef sigar_uint64_t Sigar__NetAddr;
/* generated list */
typedef sigar_uptime_t * Sigar__Uptime;

View File

@ -2,6 +2,7 @@ Sigar T_PTROBJ
sigar_pid_t T_UV
const char * T_PV
UV T_UV
Sigar::NetAddr T_NETADDR
#generated list
Sigar::Uptime T_PTROBJ
@ -25,3 +26,11 @@ Sigar::FileSystemUsage T_PTROBJ
Sigar::ProcStat T_PTROBJ
Sigar::NetRoute T_PTROBJ
Sigar::NetInterfaceStat T_PTROBJ
OUTPUT
T_NETADDR
{
char addr_str[SIGAR_INET_ADDR_LEN];
sigar_inet_ntoa(NULL, $var, addr_str);
sv_setpv($arg, addr_str);
}