tcpconns plugin: add support for AIX
Hi.
In AIX there is a undocumented function/syscall in libc: netinfo
returns a structure with the state of the tcp connections.
I didn't found the description or info abut this syscall, I guess is
something like this:
int netinfo (int proto, void *data, int *size, int n);
and the struct something like this: (with some work we can guess the
unknow remaining bytes)
struct netinfo_header {
unsigned int proto;
unsigned int size;
struct netinfo_entry e[];
};
struct netinfo_entry {
uint32_t unknow1;
uint32_t unknow2;
uint16_t dstport;
uint16_t unknow3;
struct in6_addr dstaddr;
uint16_t srcport;
uint16_t unknow4;
struct in6_addr srcaddr;
uint32_t unknow01[4];
uint32_t unknow02[2];
uint16_t so_options;
uint16_t unknow02a;
uint16_t so_q0len;
uint16_t so_qlen;
uint16_t so_qlimit;
uint16_t so_dqlen;
uint32_t unknow03[4];
struct {
uint32_t sb_hiwat;
uint32_t unknow01;
uint32_t unknow02;
uint32_t unknow03;
uint32_t sb_mbmax;
uint32_t unknow04;
uint32_t sb_lowat;
uint16_t sb_flags;
uint16_t unknow05;
} rcvbuf;
uint32_t unknow07;
uint32_t unknow08[2];
uint32_t unknow09;
struct {
uint32_t sb_hiwat;
uint32_t unknow01;
uint32_t unknow02;
uint32_t unknow03;
uint32_t sb_mbmax;
uint32_t unknow04;
uint32_t sb_lowat;
uint16_t sb_flags;
uint16_t unknow05;
} sndbuf;
uint32_t unknow11;
uint32_t so_uid;
uint16_t so_special;
uint16_t so_special2;
uint16_t tcp_state;
uint16_t unknow12;
uint32_t tcp_flags;
uint32_t tcp_mss;
uint32_t unknow15;
};
Signed-off-by: Florian Forster <octo@collectd.org>