LinuxQuestions.org
Review your favorite Linux distribution.
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 03-21-2007, 08:19 AM   #1
v8hadas
LQ Newbie
 
Registered: Dec 2006
Posts: 16

Rep: Reputation: 0
Network (card) information


Hi There,

I look for a way to retrieve the following things from a system where multiple network can be present at the same time:
1) IP address (IPv4 is enough for now)
2) Subnet mask
3) Macaddress
per network adapter.

I tried quite a few thing (practically all day today with SIOCGIFCONF, SIOCGIFFLAGS and so forth and somehow I did not make it. Is there a working example somewhere which would be usable probably?

Thanks,
Sandor
 
Old 03-21-2007, 08:51 AM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Try typing as root: ifconfig
 
Old 03-22-2007, 03:18 AM   #3
v8hadas
LQ Newbie
 
Registered: Dec 2006
Posts: 16

Original Poster
Rep: Reputation: 0
Thank you.

Actually I found how to code it in c++ here in thread #542222.

Sandor
 
  


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
linux shuts down built in network card then windows tells me network card is unplugge lesmoxhaybaker SUSE / openSUSE 8 08-29-2006 05:10 PM
How do get ALL information about my network hemmelig Linux - Newbie 2 12-08-2004 11:45 PM
Network Information Service twisted Linux - Networking 1 08-26-2003 06:36 PM
Basic network information dalraidia Linux - Newbie 7 12-16-2002 09:51 PM
Getting Network Interface Information yrraja Programming 5 11-10-2002 11:46 PM

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

All times are GMT -5. The time now is 11:12 AM.

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