Client Ip Address


 
Thread Tools Search this Thread
Special Forums IP Networking Client Ip Address
# 1  
Old 07-31-2003
Client Ip Address

I have a UNIX daemon program which takes client connections via TCP/IP sockets.

What I need to know is if there is any way of getting the IP address of the client socket once a connection has been made... or do I have to code my client to send it manually ?

Thanks.
# 2  
Old 09-15-2003
man 2 accept

the second argument to this function is a pointer to struct sockaddr. after this function returns, you should be able to find the ip address of client.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Web Development

How to enable x-client-ip address in apache webserver LogFormat?

how to enable x-client-ip address in apache webserver LogFormat i tried below option, but no luck... 1. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 2. LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy 3.... (0 Replies)
Discussion started by: raghur77
0 Replies

2. UNIX for Advanced & Expert Users

C program to detect duplicate ip address if any after assigning ip address to ethernet interface

Hi , Could someone let me know how to detect duplicate ip address after assigning ip address to ethernet interface using c program (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies

3. Solaris

CJS installation problem(client display:requesting internet address for 0:21:28:17:80:f4)

hi can anyone fine a solution thwe the problem that am facing i was trying to install sun4v client vth sol10_U8, but when i played "boot net" its asking for "requesting internet address for 0:21:28:17:80:f4 plz give me a sol for this (1 Reply)
Discussion started by: all_is_well
1 Replies

4. UNIX for Advanced & Expert Users

Determining IP address of NFS server on client

Hi. We use an Isilon cluster system to provide our NAS. The Isilon uses a round-robin DNS setup to spread mount requests across the many nodes of the cluster. When a node needs work, the filesystems that are mounted to it need to be moved to other nodes prior to shutting the node down. I... (2 Replies)
Discussion started by: rascalrick
2 Replies

5. Solaris

How to get the IP address / Host name of client machine

Hi How to get the IP address / Host name of a particular user connected to Unix Server. For example: If used 'DevUser1' is connected to Unix server. I need to find out from which PC this connection has been made. How can this be achieved? Thanks (6 Replies)
Discussion started by: MVL
6 Replies

6. IP Networking

ip address of a client

A client(PC) connects to an unix server via terminal emulator. How can I obtain that client's IP address? The unix server is an old SVR4.2 (NCR) and the "who" command does not show ip addresses. I need a command or a shell script or a C/C++ program that will help me to obtain the client's... (6 Replies)
Discussion started by: ka2d2
6 Replies

7. Programming

Getting IP Address of a client

I read an other post with a similar title but thios is different. here is a basic portion layout of our network Win PC 1 w/Refection X -- | Win PC 2 w/Refection X -- |-- 1 of 6 HP Unix servers -- Win 2k pc Win PC 3 w/Refection X -- ... (0 Replies)
Discussion started by: fayette
0 Replies

8. Programming

Retrieving IP address of Client from Server

Hi All, When I connect to a unix server from a client machine, how can I get the IP address of the client? One way of retrieving IP address of client which initiates an active connection to the server is through /var/adm/utmpx file upon login; client's IP address and other info would have... (4 Replies)
Discussion started by: matrixmadhan
4 Replies

9. UNIX for Dummies Questions & Answers

client IP address

when working on a telnet is it possible the client machine accessing the server machine supply its IP Address to the server machine . The only other shell i can use is the TCL shell. (2 Replies)
Discussion started by: rolly
2 Replies

10. UNIX for Dummies Questions & Answers

IP address of telnet client

Hi, I am using the telnet client on windowsNT to access the Unix system. I want to find out the IP address of the telnet client from the server side. The reason is I want to set the DISPLAY environment variable when the user is logged on. Is there anyway that the the Unix server can... (1 Reply)
Discussion started by: vtran4270
1 Replies
Login or Register to Ask a Question