All of lore.kernel.org
 help / color / mirror / Atom feed
* problem with trying the example
@ 2003-12-01  1:47 Jee J.Z.
  2003-12-01  8:00 ` Eric Leblond
  0 siblings, 1 reply; 3+ messages in thread
From: Jee J.Z. @ 2003-12-01  1:47 UTC (permalink / raw)
  To: netfilter

Hi all,

I am new to netfilter and even linux. I just wish to try the example code in the man page of libipq (I saved it as test.c and have compiled it to test.o). But when I make it: #cc test.o -o test, the following errors showed up:

[root@kite1 netfilter]# cc test.o -o test
test.o(.text+0xf): In function `die':
: undefined reference to `ipq_perror'
test.o(.text+0x1d): In function `die':
: undefined reference to `ipq_destroy_handle'
test.o(.text+0x49): In function `main':
: undefined reference to `ipq_create_handle'
test.o(.text+0x81): In function `main':
: undefined reference to `ipq_set_mode'
test.o(.text+0xb8): In function `main':
: undefined reference to `ipq_read'
test.o(.text+0xe4): In function `main':
: undefined reference to `ipq_message_type'
test.o(.text+0x116): In function `main':
: undefined reference to `ipq_get_msgerr'
test.o(.text+0x141): In function `main':
: undefined reference to `ipq_get_packet'
test.o(.text+0x18c): In function `main':
: undefined reference to `ipq_set_verdict'
test.o(.text+0x1ce): In function `main':
: undefined reference to `ipq_set_verdict'
collect2: ld returned 1 exit status

I have installed iptables-1.2.9 following the instructions. Does it mean I have to link 'test.o' with another file (???.o or ???.so)? Thank you in advance!

Jee

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem with trying the example
  2003-12-01  1:47 problem with trying the example Jee J.Z.
@ 2003-12-01  8:00 ` Eric Leblond
  2003-12-01 15:47   ` Jee J.Z.
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Leblond @ 2003-12-01  8:00 UTC (permalink / raw)
  To: Jee J.Z.; +Cc: netfilter

[-- Attachment #1: Type: text/plain, Size: 495 bytes --]

Le lun 01/12/2003 à 02:47, Jee J.Z. a écrit :
> Hi all,
> 
> I am new to netfilter and even linux. I just wish to try the example code in the man page of libipq (I saved it as test.c and have compiled it to test.o). But when I make it: #cc test.o -o test, the following errors showed up:
> 
> [root@kite1 netfilter]# cc test.o -o test

you need to link with the libipq library :
 
	cc test.o -o test -lipq


-- 
Eric Leblond
Nufw, Now User Filtering Works (http://www.nufw.org)

[-- Attachment #2: Ceci est une partie de message numériquement signée. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem with trying the example
  2003-12-01  8:00 ` Eric Leblond
@ 2003-12-01 15:47   ` Jee J.Z.
  0 siblings, 0 replies; 3+ messages in thread
From: Jee J.Z. @ 2003-12-01 15:47 UTC (permalink / raw)
  To: Eric Leblond; +Cc: netfilter

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: ATT00008.txt --]
[-- Type: text/plain, Size: 780 bytes --]

Hi Eric,

Thank you very much. I went through the link process, but when I execute the program:

./test

The following occurs:

passer: Failed to send netlink message: Connection refused

Could you point out for me how I can solve it again? Cheers!

Regards,
Ji



Le lun 01/12/2003 à 02:47, Jee J.Z. a écrit :
> Hi all,
> 
> I am new to netfilter and even linux. I just wish to try the example code in the man page of libipq (I saved it as test.c and have compiled it to test.o). But when I make it: #cc test.o -o test, the following errors showed up:
> 
> [root@kite1 netfilter]# cc test.o -o test

you need to link with the libipq library :
 
	cc test.o -o test -lipq


-- 
Eric Leblond
Nufw, Now User Filtering Works (http://www.nufw.org)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-12-01 15:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-01  1:47 problem with trying the example Jee J.Z.
2003-12-01  8:00 ` Eric Leblond
2003-12-01 15:47   ` Jee J.Z.

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.