Re: inet_addr Equivalent

From: Michael Vergoz (mvergoz@sysdoor.com)
Date: Sun Mar 23 2003 - 07:18:18 EST


Hi,

Look at :
/* Convert from presentation format of an Internet number in buffer
   starting at CP to the binary network format and store result for
   interface type AF in buffer starting at BUF. */
extern int inet_pton (int __af, __const char *__restrict __cp,
                      void *__restrict __buf) __THROW;

If it doesn't work look in the libc source code :)

regards,
Michael

On Sun, 23 Mar 2003 07:32:05 +0000
"shesha bhushan" <bhushan_vadulas@hotmail.com> wrote:

>
> Hi all,
>
> IF i want to use the inet_addr in kernel modules, then how to use. What is
> the equivalent function to this or which is the header file that I have to
> include. If I include "arpa/inet.h" and compile as kernel module, I gives
> whole bunch of errors.
>
> So please help me how to convert doted IP address to unsigned long inside
> kernel modules. All help is very mucg apperciated.
>
> Tahnking You
> Shesha
>
>
>
>
>
> _________________________________________________________________
> Get more buddies in your list. Win prizes http://messenger.msn.co.in/promo
>
> -
> 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/
-
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/



This archive was generated by hypermail 2b29 : Sun Mar 23 2003 - 22:00:44 EST