LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-04-2009, 01:22 PM   #1
pgb205
Member
 
Registered: Nov 2007
Posts: 129

Rep: Reputation: 15
Adding Interface Description, or renameing interfaces


I would like to add interface descriptions to the output of the ifconfig -a command. So i would be happy if ifconfig would produce something like

eth0 Link encap:Ethernet HWaddr 00:14:4c:3c:9c:4c
inet addr:192.168.1.20 Bcast:192.168.255.255 ask:255.255.255.0
desc:connected to switch a on port 3

notice the last line of the output.

Is that doable?
 
Old 08-06-2009, 03:28 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Ifconfig gets its interface statistics from /proc/net/dev ('cat /proc/net/dev'). The /proc/net/dev key doesn't allow for editing or persistence because the /proc interface is just data that the kernel exports for userland apps to read. That doesn't mean it's not doable but that would mean either a kernel /proc interface change (very likely to happen when pigs fly or Paris runs for office), a change in the ifconfig source to read values from arbitrary sources (write the patch then wait in line to get slagged off on the net-tools developers mailing list for breaking compatibility) or writing a simple "wrapper" that reads values from arbitrary sources under certain conditions (again: compatibility). If you fill in your distribution details in your LQ UserCP then maybe somebody might be willing to write you such a wrapper. Else maybe start training. Pigs are very intelligent beings and I'm sure they understand your motives :-]
 
  


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
Virtual Network Interface provided by 2 physical interfaces? ewolf Linux - Networking 1 07-29-2008 12:53 PM
routing b/w two tap interfaces connected to bridge w/o using loopback interface jesus_diehard Linux - Networking 0 08-18-2007 03:15 AM
Several network interfaces: preventing access to one interface Pinguix Linux - Networking 1 11-30-2006 08:57 AM
renameing directories?? acidblue Slackware 2 02-02-2006 06:42 PM
adding a sub interface dave`2005 Slackware 2 11-20-2005 03:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:23 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