LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-15-2003, 08:50 AM   #1
grub
Member
 
Registered: Mar 2003
Location: Kurnool, India.
Distribution: Redhat 9
Posts: 67

Rep: Reputation: 15
Multiple addresses for a single NIC


I am having one network card, which is aliased for 4 different ip addresses.
How can I get the details of all the ip addressess using my C program.

Presently for eth0 if I do a ioctl, it returns one ipaddress. How to get the details about other ip address.

Thanks
Grub
 
Old 08-04-2003, 03:24 AM   #2
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
try using ioctl with SIOCGICONF....flag and get the information of the interface in the structure ..struct ifreq ..


open a socket and pass the fd to ioctl...with the aformentioned flag ..should work

Last edited by shishir; 08-04-2003 at 03:45 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple ip addresses on 1 nic? houler Linux - Networking 4 04-26-2005 04:53 PM
setting muliple IP addresses on Single NIC cranium2004 Linux - Networking 1 02-08-2005 06:55 AM
Bind Multi IP addresses to a single NIC sitg Linux - Networking 2 04-30-2004 09:59 PM
how do i group multiple global ip addresses on a single network iterface? shinacalypse Linux - Networking 3 09-08-2003 07:07 AM
Multiple IP addresses on one NIC hrr Linux - Networking 2 03-07-2003 01:04 PM


All times are GMT -5. The time now is 05:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration