From: Jonas Berlin <xkr47@outerspace.dyndns.org>
To: Duncan Godfrey <d.j.godfrey@reading.ac.uk>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Just starting with libipq
Date: Fri, 06 May 2005 12:50:17 +0000 [thread overview]
Message-ID: <427B6809.4060300@outerspace.dyndns.org> (raw)
In-Reply-To: <427A29A0.8020502@reading.ac.uk>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoting Duncan Godfrey on 2005-05-05 14:11 UTC:
> I was wondering if someone would be able to help me, Im just starting
> out with some libipq development and Im trying to compile some example
> source code from a tutorial site (I have compiled the source on the man
> page an it worked fine).
>
> Everytime I compile it with gcc -o quick quick.c -libpq, I get the
> following errors:
- -lipq not -libipq :)
> quick.c:56: error: dereferencing pointer to incomplete type
> quick.c:58: error: dereferencing pointer to incomplete type
> struct iphdr *ip = (struct iphdr*) m->payload;
>
> struct tcphdr *tcp = (struct tcphdr*) (m->payload + (4 * ip->ihl));
The error message means gcc does not know of a struct/union that you are
using. So it has to be either the "m" variable or then "ip" and "tcp"
variables. In this case, it's the latter, you are missing these includes:
#include <linux/ip.h>
#include <linux/tcp.h>
Add them and it should work. Good luck :)
- --
- - xkr47
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFCe2gHxyF48ZTvn+4RAjDdAJ0b2SMjV0xh/l84RBDdU4t+ClkjewCdFPhL
9lrHlGEIm1MBp68PkOQYizI=
=n7Wy
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2005-05-06 12:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-05 14:11 Just starting with libipq Duncan Godfrey
2005-05-06 12:50 ` Jonas Berlin [this message]
2005-05-06 12:54 ` Jonas Berlin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=427B6809.4060300@outerspace.dyndns.org \
--to=xkr47@outerspace.dyndns.org \
--cc=d.j.godfrey@reading.ac.uk \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.