Re: kernel hacking

From: Terry Lambert (
Date: 07/08/03

  • Next message: Terry Lambert: "Re: 5 "Advanced" networking questions"
    Date: Tue, 08 Jul 2003 04:14:07 -0700
    To: Sandeep Kumar Davu <>

    Sandeep Kumar Davu wrote:
    > I was making changes to 4.5 source code. I tried to recompile the kernel.
    > it compiles well but is not able to link it.
    > I used the function inet_aton in uipc_socket.c
    > This is the error i got.
    > uipc_socket.o(.text+0xid8): undefined refernce to '__inet_aton'
    > I added all the header files that were required.
    > Can anyone tell what is missing.

    You are trying to call a libc function from within the kernel.

    In general, you can not use /usr/include headers in kernel
    code, only /usr/include/sys headers. This is because the
    kernel is not linked againsts libc.

    Mostly, you should not be dealing with strings in the kernel;
    if you are adding a kernel entry point to be called from user
    space, you should convert the address into a sockaddr_in
    before you pass it into the kernel, instead.

    -- Terry
    _______________________________________________ mailing list
    To unsubscribe, send any mail to ""

  • Next message: Terry Lambert: "Re: 5 "Advanced" networking questions"