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

Depends on your unix but in most cases, running ifconfig <interfacename> will list the IP

"libpcap" can provide you quickest implementation. "netlink" will be very much kernel centric. See tcpdump source code for generic/finer level implmentation.