LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Where is the source code for netconfig (https://www.linuxquestions.org/questions/linux-software-2/where-is-the-source-code-for-netconfig-740956/)

zanget 07-18-2009 03:31 AM

Where is the source code for netconfig
 
Hi,Every one:
Which source download contains netconfig?

[root@Mike /]# rpm -qf /usr/sbin/netconfig
netconfig-0.8.21-1
after google about netconfig-0.8.21-1 or netconfig-0.8, i just get something about rpm(s)

i want to configure the net work on eth0,eth1,but i am confused on how to do this. may be some one will tell me about to call the system() with the command netconfig/ifconfig or somethig,but i can not get the result about whether the command is ok or the return status so i can go in to the next step.

Any help on this would be appreciated~
thanks!

jdkaye 07-18-2009 03:52 AM

Google is your friend. Why didn't you google for: netconfig-0.8 source?
That's what I did and found it immediately and I don't even use fedora.
http://www.icewalkers.com/rpm/netcon...nfig-2775.html
cheers,
jdk

zanget 07-18-2009 04:06 AM

thank you for the replay any way

but the page i had just found a while ago but i cannot download any file in

Download Netconfig 0.8.24 rpm

and even check the ftp
ftp://mirrors.kernel.org/fedora/core/
then do not fount any source code anyway...
i donnt konw whether the network is good here or not.

by the way the old Solutions about this part is below:
Code:

        sprintf(cmd,"/usr/sbin/netconfig  -d  eth%d ",eth_no);
        sprintf(cmd+strlen(cmd),"--ip=%s ",ip);
        sprintf(cmd+strlen(cmd),"--netmask=%s ",mask);
        sprintf(cmd+strlen(cmd),"--gateway=%s ",gateway);
        sprintf(cmd+strlen(cmd),"--nameserver=%s ",dns);
        log("cmd=%s\n",cmd);
        system(cmd);
       
        system(" /etc/init.d/network  restart");

i dont know whether is working good in my c program or not!
thanks again!

jdkaye 07-18-2009 09:24 AM

Quote:

Originally Posted by zanget (Post 3611574)
thank you for the replay any way

but the page i had just found a while ago but i cannot download any file in

Download Netconfig 0.8.24 rpm

and even check the ftp
ftp://mirrors.kernel.org/fedora/core/
then do not fount any source code anyway...
i donnt konw whether the network is good here or not.

by the way the old Solutions about this part is below:
Code:

        sprintf(cmd,"/usr/sbin/netconfig  -d  eth%d ",eth_no);
        sprintf(cmd+strlen(cmd),"--ip=%s ",ip);
        sprintf(cmd+strlen(cmd),"--netmask=%s ",mask);
        sprintf(cmd+strlen(cmd),"--gateway=%s ",gateway);
        sprintf(cmd+strlen(cmd),"--nameserver=%s ",dns);
        log("cmd=%s\n",cmd);
        system(cmd);
       
        system(" /etc/init.d/network  restart");

i dont know whether is working good in my c program or not!
thanks again!

Sorry, I don't understand. Do you have a question?
jdk

lazlow 07-18-2009 12:04 PM

Assuming you are running Fedora all of sources to your rpms are availble via yum. You just need to turn on the source repo.

If you just want the one src rpm it may be easier just to download it directly. Here is the path to the source rpms for F11:



All times are GMT -5. The time now is 08:38 AM.