Thanks for pointing me in the right direction! With the DLPI Programmer's Guide from
http://docs.hp.com/en/5992-0554/5992-0554.pdf I was able to piece together the following way to get the data:
- Open /dev/dlpi. All the following STREAMS messages use this file descriptor.
- Using putmsg/getmsg get the information about all network interfaces with DL_HP_PPA_REQ (I actually used DL_HP_EXT_PPA_REQ so that I can use the dl_hp_ext_ppa_info_t::dl_link_state member to check if an interface is up).
- Attach each interface (PPA) with DL_ATTACH_REQ using the dl_ppa of the DL_HP_PPA_ACK.
- Get its statistics with DL_GET_STATISTICS_REQ. The documentation is not clear about the returned data but it is obviously Ext_mib_t from
.
BTW, DL_HP_GET_64BIT_STATS_REQ only returned DL_NOTSUPPORTED on my machine.
- Detach the PPA again with DL_DETACH_REQ and repeat with the next one (using dl_next_offset to find the next dl_hp_ppa_info_t).
Thanks again to all who replied!