Advanced Search
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
February 05, 2012, 06:02:33 AM
Home
Help
Calendar
Login
Register
News
: Glomation introduced new wireless ready low cost GESBC-9260S
Glomation
»
General Category
»
General Discussion
»
Changing IP address
« previous
next »
Pages: [
1
]
Topic Tools
Topic Tools
Send this topic
Print
July 18, 2009, 01:50:29 PM
#0
davest
davest
Show davest's last posts.
Show general stats for davest.
Super Hero
Posts: 22
Changing IP address
Hi,
Can any one point me toward some focused reading and/or sample code for changing the IP address on the eth0 device from code 'on the fly'.
I know how to do it using the configuration files that are read on boot/linux startup. I could have my program adjust those files and then force the user to re-boot. I am hoping there is a way to have the user edit the IP address through my program and then make it take effect.
Thanks, Dave S.
July 20, 2009, 08:55:27 AM
#1
admin
admin
Show admin's last posts.
Show general stats for admin.
Administrator
Super Hero
Posts: 339
Re: Changing IP address
You can use system call to change it,
system("ifconfig eth0 xxx.xxx.xxx.xxx");
The program must have the privilege to run ifconfig command.
Pages: [
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> Announcements
=> General Discussion
=> Programming Tips, Recommendded Readings, etc.
-----------------------------
Peer Support Forums
-----------------------------
=> GESBC-9302
=> GESBC-9260
=> GESBC-9G20
=> GESBC-2440
=> GESBC-9315
Loading...