#include <cat/cat.h>
int catnet_getnetinfo(cat_session *session, int fd_id, catnet_info *netinfo);
If the call is successful, the netinfo structure will contain the following information.
typedef struct catnet_info {
CATSOCK fd;
int my_port;
int peer_port;
char my_addr[16];
char peer_addr[16];
} catnet_info;
The fd will contain the value of the real socket. The my_addr and the
peer_addr fields will contain the IP addresses of the connection endpoints. The my_port and the peer_port will contain the port numbers.
If either my_port or peer_port is negative, the corresponding address is undefined.