Solved

Get an IP address from sin_addr

Posted on 1999-01-06
1
562 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
My eclipse editor won't start ? 4 162
Unable to start eclipse ? 17 154
Assigning default value to structure in C for mutithread application 17 71
windows 10 pro lost profile. 10 46
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…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

821 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