diff options
author | James Ko <jck@exegin.com> | 2017-11-22 11:05:48 -0800 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-12-01 08:18:16 +0000 |
commit | 8606062cb38373f7e594bbaa812fb19719d7e6ef (patch) | |
tree | 3a1ed60dab5f56fde65bdcea268ef321b248753e /writecap/pcapio.h | |
parent | 1683dd11e76f01760665ab15cd9204fa19923238 (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.h | 8 |
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) * */ |