Required is a systems program in C language (using system libraries and API calls, no use of external program outputs) that will run on Solaris 10 (Solaris 9 support would be a plus), that produces application listening port output (similar to LSOF - [url removed, login to view]) for IPv4 and IPv6.
The output sample for IPv4 and IPv6 respectively:
Transport (upd/tcp), local_ip_address, local_port, number_of_connections, user_account, command
udp, [url removed, login to view], 123 (ntp), 0, ntp, ntpd
tcp, [url removed, login to view], 22 (ssh), 5, root, sshd
Additional details will be provided.