How can i get network information

hi everybody
Can you help me resolve flowwing two quetions?
First,i want to get every network information by using c/c++ function on Hpux OS.The network information include send packets,receive packets ,running status and so on .
Second,i want to get broadcast address by using c/c++ function on Hpux OS.

                 Expect your advices ,thank you !