LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-08-2006, 10:48 PM   #1
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Where is the source code for ifconfig?


Is this part of the kernel sources, or is it a GNU add-on? I downloaded the kernel sources from Slackware packages but I couldn't find this module.

Is there a guide to how the source is laid out or is this something you learn as you go?

Thanks,
Rand
 
Old 08-08-2006, 11:29 PM   #2
aquaboogie90
Member
 
Registered: Jun 2006
Location: California
Distribution: Ubuntu 7.10
Posts: 33

Rep: Reputation: 15
ifconfig is part of n/tcpip.

Quote:
Is there a guide to how the source is laid out or is this something you learn as you go?
If you're referring to the package sources:
The sources of each program are in the slackware/sources directory of any mirror and on the fourth release CD, laid out almost exactly as the binary packages are.
Since every single program doesn't have its own package, related programs are grouped. To find out where a given application is located, I use "slackpkg search appname". If you know what package it is in, but don't know which file, you could use pkgtool->view for the given package.

If you're referring to kernel sources:
I have no idea, but you might try http://www.kernelnewbies.org

Last edited by aquaboogie90; 08-09-2006 at 12:01 AM.
 
Old 08-09-2006, 06:25 AM   #3
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by aquaboogie90
ifconfig is part of n/tcpip.


If you're referring to the package sources:
The sources of each program are in the slackware/sources directory of any mirror and on the fourth release CD, laid out almost exactly as the binary packages are.
Since every single program doesn't have its own package, related programs are grouped. To find out where a given application is located, I use "slackpkg search appname". If you know what package it is in, but don't know which file, you could use pkgtool->view for the given package.

If you're referring to kernel sources:
I have no idea, but you might try http://www.kernelnewbies.org
Hi aqua,

Thanks for all this information. What I am trying to figure out is where to find the source for ifconfig. I can't see it in the directory structure of the kernel sources I downloaded and I don't see a file that contains a list of what goes where.

Good info on searching for app source (I wasn't looking for any, but it's good info to know, thanks). I know how to view the contents of packages. Slackpkg doesn't find ifconfig.c anywhere.

I will look at kernelnewbies and see if I can find what I am looking for if nobody else knows the answer. I was able to find the source of ifconfig for OpenBSD (which I also run) on their CVS web interface very quickly, because they group the source like it gets distributed- for example, ifconfig source is in the sbin directory. It's a pretty nice setup. But the thing here is I don't know whether ifconfig is considered "kernel" or not in Linux so I don't know where to look.

Thanks,
Rand
 
Old 08-09-2006, 07:20 AM   #4
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
again.....it's in tcpip
 
Old 08-09-2006, 07:56 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,248

Rep: Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156Reputation: 4156
Quote:
Originally Posted by Randux
But the thing here is I don't know whether ifconfig is considered "kernel" or not in Linux so I don't know where to look.
Do you need it to boot ??? - if no, then it ain't kernel.
Admittedly pretty broad, but use it as a starting point.

The big problem here is the nature of the beast - every man and his dog wants to do things differently, so they go put together their own distro, and of course they are all different. Plenty don't even give you the source.
 
Old 08-09-2006, 07:57 AM   #6
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by kodon
again.....it's in tcpip
Again, since I don't know the way things are packaged, I don't know how to find it.

Is it too difficult to explain how to get the source?
 
Old 08-09-2006, 07:59 AM   #7
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by syg00
Do you need it to boot ??? - if no, then it ain't kernel.
Admittedly pretty broad, but use it as a starting point.

The big problem here is the nature of the beast - every man and his dog wants to do things differently, so they go put together their own distro, and of course they are all different. Plenty don't even give you the source.
Yeah part of the problem is that operating systems are all packaged in different ways.
 
Old 08-09-2006, 08:04 AM   #8
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Oh my word, what a frustrating thread ...

Randux - you've missed the answer to your question twice.

1. the command `ifconfig` is not part of the kernel.
2. the command `ifconfig` is located in the n/tcpip package.
3. `man ifconfig` tells me that ifconfig is actually a part net-tools
4. browsing the slack sources (on disks 3 + 4 or your favourite mirror) shows me that net-tools is indeed inside the n/tcpip directory.

Source directory (from a UK mirror):
ftp://ftp.mirror.ac.uk/sites/ftp.sla...ource/n/tcpip/

net-tools source tarball (same UK mirror):
ftp://ftp.mirror.ac.uk/sites/ftp.sla...s-1.60.tar.bz2

There are a bunch of patches to net-tools, but you'll have to read them yourself to find out if ifconfig is affected by them.

- Piete.
 
Old 08-09-2006, 09:20 AM   #9
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 55
Thumbs down

Quote:
Originally Posted by piete
Oh my word, what a frustrating thread ...

Randux - you've missed the answer to your question twice.
Maybe, but if everybody knew exactly where to find it they could have been a little more specific.

I found a copy of ifconfig inside n/tcpip but it was empty. All the rest of the stuff is in bzipped tarballs and I didn't know how to find it without expanding everything in every tarball. I did some finds and didn't get any hits. There are 72 items in the directory and I wasn't sure where to look since it wasn't in the "obvious" place, the tcpip bzip.

Quote:
Originally Posted by piete
3. `man ifconfig` tells me that ifconfig is actually a part net-tools
Based on this, I was able to find it, thanks.

In case anyone else wants to know, the source for ifconfig.c in the Slackware 10.2 distribution is found on disk 4 in

source/n/tcpip/net-tools-1.60.tar.bz2

If someone had simply given me the information I just posted here instead of telling me it's not part of the kernel, it's not this, it's not that, what a frustrating thread, we could have wrapped this up in one post.

Sometimes just answering a question directly and simply is easier (and less time-consuming) than pointing out what a moron somebody is. But I guess it doesn't have nearly the same entertainment value

Last edited by Randux; 08-09-2006 at 09:21 AM.
 
Old 08-10-2006, 09:44 PM   #10
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
In case anyone else wants to know, the source for ifconfig.c in the Slackware 10.2 distribution is found on disk 4 in

source/n/tcpip/net-tools-1.60.tar.bz2

If someone had simply given me the information I just posted here instead of telling me it's not part of the kernel, it's not this, it's not that, what a frustrating thread, we could have wrapped this up in one post.
This was in the first reply to your initial query:

Quote:
If you're referring to the package sources:
The sources of each program are in the slackware/sources directory of any mirror and on the fourth release CD, laid out almost exactly as the binary packages are.
Since every single program doesn't have its own package, related programs are grouped. To find out where a given application is located, I use "slackpkg search appname". If you know what package it is in, but don't know which file, you could use pkgtool->view for the given package.
I was a bit confused by your initial question, as was aquaboogie90. Despite that confusion, he provided a very good answer that, had you bothered to read rather than dismiss, would have served as a launchpad for productive discourse.

Therein lies the cause of said frustration.

In the future, you might consider that you may not be as clear as you think you are when you are describing your situation.
 
  


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
Source-code to ifconfig .. where? sundialsvcs Linux - Software 5 01-04-2009 09:54 AM
LXer: Voip Encryption, source code open source LXer Syndicated Linux News 0 07-09-2006 03:21 PM
connecting /sbin/ifconfig to bash command ifconfig flammable2 Fedora 4 11-12-2005 07:58 AM
How to convert Assembly code to "C" source code ssg14j Programming 2 08-01-2005 12:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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