
siostatso - dump SIOSTATSO IOCTL data v0.1

2017-12-01 SHL

siostatso dumps the sostats structure returned by the SIOSTATSO IOCTL.

The IOCTL returns a opaque data stucture defined in sys\socket.h as:

struct sostats {
    short count;
    short socketdata[13*MAXSOCKETS];
};

siostatso formats the output as best it can given the author's knowledge of
the socketdata array content.

typical output for a socket is:

 1:    socket        1667
 3:    type          SOCK_STREAM (1)
 4:    foreign port  56922
 5:    local port    139
 6:    state         SOCK_CLOSED (4)
 7-8:  foreigh ip    192.168.10.6
 9-10: local ip      192.168.10.2
 11:   unknown11     8 (8)

where the the first column is the socketdata array index.

Unknown fields that contain zeros are omitted from the output.

The program silently ignores any command line options.
