Solved

Get an IP address from sin_addr

Posted on 1999-01-06
1
556 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
Comment Utility
unsigned long iIP = pClientData->inetSock.sin_addr.s_addr;
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
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 writing to files in the C programming language.

772 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now