author | Manuel Luis SanmartĂn Rozada <manuel.luis@gmail.com> | |
Mon, 6 Jun 2011 12:14:27 +0000 (14:14 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Mon, 22 Aug 2011 17:01:38 +0000 (19:01 +0200) | ||
commit | 95b08a826445423b00297d0db8cfb9676b5f676d | |
tree | fb0d83e29b20f5f679af7537ce0c5008e3597ca9 | tree | snapshot |
parent | 9b967a770f38099336c3652986d93c8b4d610a36 | commit | diff |
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>
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>
configure.in | diff | blob | history | |
src/tcpconns.c | diff | blob | history |