Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Warning message and pkt2flow return nothing #15

Open
Dadigno opened this issue Oct 29, 2020 · 1 comment
Open

Warning message and pkt2flow return nothing #15

Dadigno opened this issue Oct 29, 2020 · 1 comment

Comments

@Dadigno
Copy link

Dadigno commented Oct 29, 2020

After compilation I've simply tried:

./pkt2flow in.pcap

and it doesn't create any output file.

Maybe it is correlate with this warning during compilation:

scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... gcc -o flow_db.o -c -I. flow_db.c gcc -o pkt2flow.o -c -I. pkt2flow.c pkt2flow.c: In function 'resemble_file_path': pkt2flow.c:150:8: warning: implicit declaration of function 'asprintf'; did you mean 'vsprintf'? [-Wimplicit-function-declaration] 150 | ret = asprintf(&outputpath, "%s/%s", outputdir, type_folder); | ^~~~~~~~ | vsprintf gcc -o utilities.o -c -I. utilities.c utilities.c: In function 'new_file_name': utilities.c:62:9: warning: implicit declaration of function 'asprintf'; did you mean 'vsprintf'? [-Wimplicit-function-declaration] 62 | ret = asprintf(&fname, "%s_%"PRIu16"_%s_%"PRIu16"_%lu.pcap", | ^~~~~~~~ | vsprintf gcc -o pkt2flow flow_db.o pkt2flow.o utilities.o -L/usr/local/lib -L/usr/lib -lpcap scons: done building targets.

@Ewael
Copy link

Ewael commented Nov 22, 2020

Adding

#define _GNU_SOURCE

in both utilities.c and pkt2flow.c fixes the warnings, I also have problems with multiple definitions of the pair function that I'm trying to fix atm

EDIT: fixed the multiple pair definitions too, you only have to delete the one in flow_db.c because it already includes the one defined in the .h

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants