Solved

Get an IP address from sin_addr

Posted on 1999-01-06
1
560 Views
Last Modified: 2012-06-27
How do I get an IP out of the sin_addr struct.
iIP is the int that receives the IP address

int iIP;

// this is the way that the program I am looking at points to the struct
// so I want to get iIP = the IP address from
pClientData->inetSock.sin_addr;
0
Comment
Question by:ketut
1 Comment
 
LVL 11

Accepted Solution

by:
alexo earned 50 total points
ID: 1255572
unsigned long iIP = pClientData->inetSock.sin_addr.s_addr;
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question