Kernel Module programming
I'm about to learn something of kernel module programming. I found a cool article on phrack61 about the network-stack of Linux, so I started out coding... however, i fail to compile my second module - here are the relevant lines:
static const __u32 deny_ip1 = 0x2171e4d8; (Globally defined)
if(sb->nh.iph->daddr == deny_ip1) <- compiling fails here.
return NF_DROP;
The Error-message I get from gcc is:
/home/benjamin/programming/net.c:17: error: dereferencing pointer to incomplete type
daddr is of type __u32.
Ah, I forgot one thing: I'm compiling this on a amd64 operating in 64-bit mode - so sizeof(void*) is 8 bytes.
Any help is welcome.
Last edited by Config; 03-24-2004 at 09:50 AM.
|