Find the answer to your Linux question:
Results 1 to 1 of 1
Hi, I have question in the ifconfig command, 1. When I do an ifconfig command I see the some interfaces, but when i give ifconfig -a command I see complete ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    85

    Unhappy How linux displays the network interfaces


    Hi, I have question in the ifconfig command,
    1. When I do an ifconfig command I see the some interfaces, but when i give ifconfig -a command I see complete list of interfaces. How linux knows what interfaces is inactive and which is active device. Is have did some googling and got to know that /sys/class/net/lo/operstate is the file. Is my understanding true or linux does some other stuff to find that..

    2. Also how ifconfig gets the full details.

    Because I have write a method in our project to get the complete list of interfaces and their respective details like ip, gatway, route, arp table etc.. I dont want to shell command in the c program to get the dtails becoz i have to do a grep and hell of stuff is required.. I want to use thing like ioctl to get the details
    Can anyone help me in that..

    Thanks in advance..
    Last edited by maheshgupta024; 12-09-2010 at 06:23 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •