0

I am trying to extract the port from a given in_addr value in windows.

So far I am able to get the IP address using inet_ntoa but not the port.

Thanks.

Charles Okwuagwu
  • 10,538
  • 16
  • 87
  • 157

1 Answers1

3

You do not: it is only an IP address

Perhaps you mean to use sockaddr which contains this information, when applicable.