Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Worik <worik@noggon.co.nz>
To: netfilter@lists.netfilter.org
Subject: Compiling problem with libipq
Date: 02 Dec 2002 08:22:08 +1300	[thread overview]
Message-ID: <1038770528.17573.9.camel@stolberg> (raw)

Friends.

This is very frustrating and I am sure there is a simple solution...

The code...
#include <linux/netfilter.h>
#include <libipq/libipq.h>
struct  ipq_handle * ph_ipq = 0;
int
main(int argc, char * argv[]){
  ph_ipq = ipq_create_handle(0, PF_INET);
  return 0;
}

Compiling....


gcc -g -O0   -DIPT_LIB_DIR=/usr/lib   -fpic -shared -c  ip_q_test.c -o
ip_q.o 
gcc -g -O0   -DIPT_LIB_DIR=/usr/lib   -fpic -shared -lipq  ip_q.o -o
ip_q

Running....
This GDB was configured as "i386-linux"...
(gdb) b main
Breakpoint 1 at 0x773: file ip_q_test.c, line 6.
(gdb) r
Starting program: /home/worik/Projects/project12/ip_q 
Breakpoint 1 at 0x80000773: file ip_q_test.c, line 6.

Program received signal SIGSEGV, Segmentation fault.
0x00000001 in ?? ()
(gdb)

What have I done wrong?  

Worik


             reply	other threads:[~2002-12-01 19:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-01 19:22 Worik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-03  0:58 Compiling problem with libipq Worik
2002-12-03  3:30 ` James Morris

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=1038770528.17573.9.camel@stolberg \
    --to=worik@noggon.co.nz \
    --cc=netfilter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox