LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 07: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, 02: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 02:45 AM.
 
  


Reply



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 03:53 PM
setting muliple IP addresses on Single NIC cranium2004 Linux - Networking 1 02-08-2005 05:55 AM
Bind Multi IP addresses to a single NIC sitg Linux - Networking 2 04-30-2004 08:59 PM
how do i group multiple global ip addresses on a single network iterface? shinacalypse Linux - Networking 3 09-08-2003 06:07 AM
Multiple IP addresses on one NIC hrr Linux - Networking 2 03-07-2003 12:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:31 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration