Obtaining IP address from both my network interface


 
Thread Tools Search this Thread
Special Forums IP Networking Obtaining IP address from both my network interface
# 1  
Old 05-27-2008
Obtaining IP address from both my network interface

HI folks,

I am developing a software which one of the module is to interchange the ip address of another active network interface's when making a socket connection.

I would like to know whether there is any function call that would enable me to retrieve the ip address that is obtained by a particular network interface.

Please.

tq.

Citiz3n
# 2  
Old 05-28-2008
Depends on your unix but in most cases, running ifconfig <interfacename> will list the IP
# 3  
Old 05-28-2008
netlink and libpcap

"libpcap" can provide you quickest implementation. "netlink" will be very much kernel centric. See tcpdump source code for generic/finer level implmentation.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. Solaris

How to set gateway address to a particular interface?

How to set gateway address to a particular interface? waht are the files need to update to make it permanent? (2 Replies)
Discussion started by: Naveen.6025
2 Replies

3. UNIX for Dummies Questions & Answers

Adding a network interface to a bonded interface

I have a RHEL 5 system with a bonded interface configure using only one network port (eth0). So I have config file for ifcfg-bond0 and ifcfg-eth. I'd like to configure eth5 to be the second SLAVE in the bond. My question is, after I modify ifcfg-eth5, can I add eth5 to the bond0 interface without... (1 Reply)
Discussion started by: westmoreland
1 Replies

4. Solaris

No network cable But Network interface is UP and Running

I've one Netra 240 After changing main board and system configuration card reader, Network is not accessible any more, Network interfaces are always UP and Running even when there is no cable connected to Network interfaces. I tried to restart and plumb/unplumb with no luck. ifconfig -a... (7 Replies)
Discussion started by: samer.odeh
7 Replies

5. UNIX and Linux Applications

Access to network interface (Mac-network)

Hi, I'm a italian student. For my thesis I develop a gateway with protocol 6lowpan. For that I must access to network interface to develope my personal stack based on standard 802.15.4. Can you help me? I need an explanation for that. (0 Replies)
Discussion started by: berny88
0 Replies

6. Solaris

configure zones to have different network interface and network

i need to configure a zone to use different interface (bge2) than global and have connected to completely different network switch & to use its own defaultrouter and hosts file .. is it possible ..if so ..how ? Thanks (9 Replies)
Discussion started by: skamal4u
9 Replies

7. Solaris

How to assign MAC address to N/W interface in solaris

I m having interface ce0 ce1 and its sub interfaces for that. I want to give MAC addresses for the same. How will I assign it. Please give solution for the same (4 Replies)
Discussion started by: sunray
4 Replies

8. IP Networking

Obtaining your external IP address using a Unix Utility

Hello, this is my first post on the Unix forums. This is something that's been bothering me for a while, is there any particular UNIX/Linux application that will allow you to see you external IP address? :confused: ( The address beyond your router ) Thank you in advance, I could not find a... (4 Replies)
Discussion started by: inquen
4 Replies

9. UNIX for Dummies Questions & Answers

network address and broadcast address?

say I have a IP address which is 10.0.0.12, and subnet mask is 255.255.255.240, what is the network address and what is the broadcast address which host lives on? And could you explain how to get the answer? thanx in advance! (7 Replies)
Discussion started by: pnxi
7 Replies

10. IP Networking

Obtaining IP address

How can UNIX systems obtain IP addresses? Can it obtain from Win 2000 Server, DHCP service, dynamically? (1 Reply)
Discussion started by: Raael
1 Replies
Login or Register to Ask a Question