aboutsummaryrefslogtreecommitdiffstats
path: root/writecap/pcapio.h
diff options
context:
space:
mode:
authorJames Ko <jck@exegin.com>2017-11-22 11:05:48 -0800
committerAnders Broman <a.broman58@gmail.com>2017-12-01 08:18:16 +0000
commit8606062cb38373f7e594bbaa812fb19719d7e6ef (patch)
tree3a1ed60dab5f56fde65bdcea268ef321b248753e /writecap/pcapio.h
parent1683dd11e76f01760665ab15cd9204fa19923238 (diff)
dumpcap: enable capture of pcapng from pipe
Reads pcapng blocks from a pipe. Section header blocks are parsed for endianess. All other blocks only have the general block header parsed for type and length, and then endianess converted if necessary. Outputs all blocks using the original endianess format so none of the other block types or options require parsing. Change-Id: I2f4f0175013d8fc2cda42a63e7deacad537951e3 Bug: 11370 Reviewed-on: https://code.wireshark.org/review/24536 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'writecap/pcapio.h')
-rw-r--r--writecap/pcapio.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/writecap/pcapio.h b/writecap/pcapio.h
index 9263024f02..fbeb60d546 100644
--- a/writecap/pcapio.h
+++ b/writecap/pcapio.h
@@ -43,6 +43,14 @@ libpcap_write_packet(FILE* pfile,
/* Writing pcap-ng files */
+/* Write a pre-formatted pcapng block */
+extern gboolean
+pcapng_write_block(FILE* pfile,
+ const guint8 *data,
+ guint32 block_total_length,
+ guint64 *bytes_written,
+ int *err);
+
/** Write a section header block (SHB)
*
*/