[LCP]dynamic IP address for Linux
Andrew Weaver
Andrew.Weaver at tecnomen.fi
Sat May 4 10:23:05 UTC 2002
ifconfig doesn't cut it for you? It should allow you to set the IP address
of the i/face. You can use something like popen() or system() to execute it.
You will need to be running as root at the time so that may be against
installation rules (in which case I have no idea how you can do it). It also
raises some security issues so if you do use it, think about dropping the
root privilidges after configuring the card.
The actual ifconfig command should be something like: ifconfig i/face (eg
eth0) IP Address (eg 10.0.0.1).
Did you code it up and it doesn't work or what happened?
> -----Original Message-----
> From: Rafael Sanchez [SMTP:rsanchez at metilinx.com]
> Sent: Thursday, May 02, 2002 4:35 PM
> To: linuxcprogramming at lists.linux.org.au
> Subject: RE: [LCP]dynamic IP address for Linux
>
> Andrew
>
> thanks for your response. I already reviewed ifconfig but it did not help
> me enough.
> Any further suggestion ?
>
> thanks
> Rafael
>
> -----Original Message-----
> From: Andrew Weaver [mailto:Andrew.Weaver at tecnomen.fi]
> Sent: Thursday, May 02, 2002 8:35 AM
> To: 'linuxcprogramming at lists.linux.org.au'
> Subject: RE: [LCP]dynamic IP address for Linux
>
>
> See man ifconfig - you will have to be root whilst doing it so think about
> the security implications.
>
> > -----Original Message-----
> > From: Rafael Sanchez [SMTP:rsanchez at metilinx.com]
> > Sent: Wednesday, April 24, 2002 2:17 AM
> > To: linuxcprogramming at lists.linux.org.au
> > Subject: [LCP]dynamic IP address for Linux
> >
> > Hello every one,
> >
> > I am trying to dynamically configure one IP address for a linux box. I
> > want to add the IP address and keep using it while my program is
> running.
> > Then if the machine is rebooted I want that IP address to disappear. So
> if
> > my program is started again I can add that IP address.
> >
> > Any suggestion ?
> >
> > thanks
> >
> > regards
> > Rafael
> >
> > _______________________________________________
> > This is the Linux C Programming List
> > : http://lists.linux.org.au/listinfo/linuxcprogramming List
>
> _______________________________________________
> This is the Linux C Programming List
> : http://lists.linux.org.au/listinfo/linuxcprogramming List
>
> _______________________________________________
> This is the Linux C Programming List
> : http://lists.linux.org.au/listinfo/linuxcprogramming List
More information about the linuxCprogramming
mailing list