netstat

Hi all,

  1. I want retrieve socket status (src/dst address, state, rx/tx count …)
    in my application. Any idea ?
  2. Is it possible find source code of netstat utility (nestat print same
    info what I’m interested of).