In message <20030109200646.GG3329@lanl.gov> you write:
> All-
>
> I'm making a loadable module that will send IP packets; and need to do IP
> checksums. Unfortunately a simple #include of checksum.h fails because that
> file does not itself include the headers required to compile correctly.
> Several of the arch-specific files are this way.
>
> * Some files use VERIFY_READ, VERIFY_WRITE, access_ok from uaccess.h but do
> not include uaccess.h
>
> * Some files have an IPv6 checksum with struct in6_addr, but do not include
> linux/in6.h. x86_64 just defines the structure instead of including the
> file. Either way works, but it's inconsistent. I've moved them all to the
> #include, but they could all go to the struct in6_addr way too.
Two general rules I like:
1) Never include asm/xxx when there is a linux/xxx.
2) asm/ headers shouldn't include linux/ headers. It's
too easy to cause insoluble loops.
I this case, I suspect #include <net/checksum.h> is what you really
want.
Rusty.
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - 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 : Wed Jan 15 2003 - 22:00:32 EST