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.
|