Files
autobuild-tools/code/trunk/sys_nicmonitor/nicinfo_shm.h
jli a1da11c7f5 the new format
git-svn-id: http://172.17.0.253/svn/soft_pkgs/sys_nicmonitor@146 09c3743a-b0dd-45d3-b506-aa74c7a2a6ef
2010-09-03 06:35:33 +00:00

53 lines
1019 B
C

#ifndef NIC_SHM_H
#define NIC_SHM_H
#include <sys/socket.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef NIC_NAME_LEN
#define NIC_NAME_LEN 64
#endif
#define SEM_PROJ_ID 's'
#define MAXNICNUM 32
typedef long KEYID;
typedef struct _net_info
{
KEYID ID;
char charname[NIC_NAME_LEN];
char descr[128];
struct sockaddr addr;
struct sockaddr broadaddr;
struct sockaddr netmask;
struct sockaddr hwaddr;
int time_stamp;
short flags;
int mtu;
int tx_queue_len;
unsigned long long average_flow;
unsigned long long rx_packets;
unsigned long long tx_packets;
unsigned long long rx_bytes;
unsigned long long tx_bytes;
unsigned long rx_errors;
unsigned long tx_errors;
unsigned long rx_dropped;
unsigned long tx_dropped;
unsigned long rx_multicast;
unsigned long collisions;
unsigned long rx_fifo_errors;
unsigned long tx_carrier_errors;
unsigned long tx_fifo_errors;
}NETCARD_INFO;
int get_nic_info(char *nic_name, NETCARD_INFO *net_info);
#ifdef __cplusplus
}
#endif
#endif