Re: Fw: Re: Fw: where can I find the IP address ?

Richard B. Johnson (root@chaos.analogic.com)
Thu, 26 Apr 2001 12:05:01 -0400 (EDT)


On Thu, 26 Apr 2001, [ISO-8859-1] sébastien person wrote:

> Le Thu, 26 Apr 2001 17:22:03 GMT+1
> Eric PENNAMEN <pennamen@caramail.com> à écrit :
>
> > Je ne suis pas un expert Linux et je ne pourrais peut etre pas
> > t'aider mais je le probleme n'es-t pas tres clair :
> > Est il de recuperer l'adresse IP du poste (transfert de donne
entre le script
> > et le driver au chargement) ?
> > ou bien que le driver doit ouvrir dans le kernel une socket a l'adresse IP donne dans le script
> > et que tu ne sais pas comment faire ?
>
[SNIPPED..]

Each device, when accessed, gets a pointer to a 'struct ifreq' this
structure contains the IP address as well as other network parameters.
See ../linux/net/core/dev.c and /usr/include/linux/if.h.

This is readily address from user-space. I don't know if the required
stuff is public so it might require some work from a module.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/