diff options
author | Michael Tüxen <tuexen@fh-muenster.de> | 2012-12-23 09:00:55 +0000 |
---|---|---|
committer | Michael Tüxen <tuexen@fh-muenster.de> | 2012-12-23 09:00:55 +0000 |
commit | b70c24ca7999514823fd72e19ca9587f76b61f9a (patch) | |
tree | 1ad05e9baf109cb07fd78e676c32b0a57a159c10 /text2pcap.c | |
parent | ef0282ee9cb5e7ce06e378439f8e218c3c113ac5 (diff) |
When using pcapng, provide input file name as comment.
svn path=/trunk/; revision=46714
Diffstat (limited to 'text2pcap.c')
-rw-r--r-- | text2pcap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/text2pcap.c b/text2pcap.c index c1ccb5ef83..37825a4ffe 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -771,9 +771,11 @@ write_file_header (void) #else char *appname = "text2pcap"; #endif + char comment[100]; + g_snprintf(comment, sizeof(comment), "Generated from input file %s.", input_filename); success = libpcap_write_session_header_block(output_file, - NULL, + comment, NULL, NULL, appname, @@ -989,8 +991,7 @@ start_new_packet (void) static void process_directive (char *str) { - fprintf(stderr, "\n--- Directive [%s] currently unsupported ---\n", str+10); - + fprintf(stderr, "\n--- Directive [%s] currently unsupported ---\n", str + 10); } /*---------------------------------------------------------------------- |