c - need help compiling something! (: -
i'm helping developers of im test security , issues, , wanted example of tcp reset vulnerability reported on server. i'm having issues compiling it, can help? error log: http://pastie.org/4212921
it's idea start first reported error.
in cases, first reported error is:
reset-tcp.c:51: error: âu_charâ undeclared (first use in function)
u_char
not standard c type; it's typedef unsigned char
.
your source file has following #include
directives:
#include <libnet.h> #include <stdio.h>
<stdio.h>
can't define u_char
, must defined in <libnet.h>
-- in whatever version of <libnet.h>
source file depends on.
that's non-standard header (it's not installed on system), best guess you're using different version of libnet 1 reset-tcp.c
designed work with.
i know doesn't solve problem, should give starting point.
edit :
i installed libnet1
, libnet1-dev
, , libnet1-doc
packages on ubuntu 12.04 system (version 1.1.4-2.1 of libnet1
). source file compiles (after joining lines 74 , 75) warnings. type u_char
defined in /usr/include/i386-linux-gnu/sys/types.h
, indirectly included libnet.h
.
i warnings:
291.c:95:1: warning: format â%xâ expects argument of type âunsigned int *â, argument 3 has type âu_char *â [-wformat] 291.c:95:1: warning: format â%xâ expects argument of type âunsigned int *â, argument 4 has type âu_char *â [-wformat] 291.c:95:1: warning: format â%xâ expects argument of type âunsigned int *â, argument 5 has type âu_char *â [-wformat] 291.c:95:1: warning: format â%xâ expects argument of type âunsigned int *â, argument 6 has type âu_char *â [-wformat] 291.c:95:1: warning: format â%xâ expects argument of type âunsigned int *â, argument 7 has type âu_char *â [-wformat] 291.c:95:1: warning: format â%xâ expects argument of type âunsigned int *â, argument 8 has type âu_char *â [-wformat] 291.c:116:1: warning: format â%iâ expects argument of type âintâ, argument 2 has type âlong unsigned intâ [-wformat]
which should pay attention to; code tries store int
values in u_char
(unsigned char
) objects.
suggestions :
tell operating system , version of
libnet
you're using; may able offer better advice if have information.let know source code came from, , see if can find out version of
libnet
it's supposed work with.
Comments
Post a Comment