LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 12-20-2005, 02:18 PM   #1
OpsVentus
LQ Newbie
 
Registered: Jan 2004
Location: Nijmegen, the Netherlands
Posts: 17

Rep: Reputation: 0
Setting network settings


Hello everyone,

I'm writing an graphic front-end to wireless networking for Linux. So I want this absolutly correct.
I want to set all network settings with my program. I'm doing this with system(). This is what I got so far, can someone check this if there's something I'm forgetting/doing wrong.

setting the wireless network:
system(iwconfig eth1 ESSID "default");
system(iwconfig eth1 ap 00:11:22:33:44:55);
system(iwconfig eth1 mode auto);
system(iwconfig eth1 enc 0000-1111-22);

rest(if not using DHCP)
system(route del eth1 default);
system(route add eth1 default gw 192.168.1.1);

system(ifconfig eth1 192.168.1.8 netmask 255.255.255.0);

rest(if using DHCP)
this I don't know, do I need to ask dhclient to get an address?

With kind regards,
Bart Vullings.
 
Old 12-20-2005, 02:27 PM   #2
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
This is how my system is currently running with dhclient:
dhclient -1 -q -lf /var/lib/dhcp/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid -cf /etc/dhclient-eth0.conf eth0

The only thing in my /etc/dhclient-eth0.conf file is:
send host-name "razman"; # temporary ifup addition

Hope this is helpfull. Send me a PM with a link to your program if possible. I'd be interested in helping where I can.
 
Old 12-20-2005, 02:52 PM   #3
OpsVentus
LQ Newbie
 
Registered: Jan 2004
Location: Nijmegen, the Netherlands
Posts: 17

Original Poster
Rep: Reputation: 0
Another thing: iwlist gives a dBm value, and I want to convert this to % which is easier for users.
And I've been searching the net, but I can't find a way to do this.
 
  


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
setting up network (proxy settings) sharadbirmiwal Linux - Networking 1 01-27-2005 08:04 AM
Setting aumix settings across boot sbrewer Linux - Hardware 1 12-27-2004 03:50 PM
Need help setting up my wireless network settings m_a_b Linux - Newbie 4 07-29-2004 05:33 PM
Quick question ... setting up monitor settings justaguynsrq Slackware 2 06-26-2004 03:13 PM
Setting Proxy settings in Redhat9 Adam555 Linux - Networking 4 05-02-2004 04:20 AM

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

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