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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You do not: it is only an IP address
Perhaps you mean to use sockaddr which contains this information, when applicable.