[LCP]Executing a libipq userspace program

anu suthakaran anu_suthakaran at hotmail.com
Mon Dec 1 20:47:01 UTC 2003


Hi,

  We were having trouble executing the sample code given in the manpage of 
libipq by James morris.............we wanted to modify packets directed to 
the queue :

  We have given the command
   iptables -A OUTPUT -p icmp -j QUEUE
  We named the source code as ipq.c
On compiling  with the command : gcc ipq.c

1. Several errors occured...........at first the stdlib.h was not included 
which defines exit().
  2.A warning saying that "multilines strings were deprecated " was given 
for fprintf statements.....................we overcame this by commenting 
the fprintf statements...........
3.  Then the errors of : undefined reference to the functios of libipq.h was 
given (eg,: ipq_create_handle())
      We then included the thread...........for compiling :
      gcc -o ipq.o ipq.c /usr/lib/libipq.a
     The compilation was succesful.

On executing :  ./ipq

              The program jus hung up until we gave the Ctrl-c
               We removed the command line arguments for main()  yet the 
execution hangs..........it did not even display the test printf statement 
we gave inside main to debug the errors.................

  What may be the problem???
        Please help.
                                                                             
                    Anu Suthakaran

_________________________________________________________________
Contact brides & grooms FREE! Only on www.shaadi.com. 
http://www.shaadi.com/ptnr.php?ptnr=hmltag Register now!




More information about the linuxCprogramming mailing list