From d88d199f23088ac1c3d7696374b0a1c1c1c18358 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Mon, 10 May 2021 14:55:20 -0400 Subject: libpcap-98.40.1 --- lib/libpcap/libpcap/pcapng-private.h | 78 ++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 lib/libpcap/libpcap/pcapng-private.h (limited to 'lib/libpcap/libpcap/pcapng-private.h') diff --git a/lib/libpcap/libpcap/pcapng-private.h b/lib/libpcap/libpcap/pcapng-private.h new file mode 100644 index 0000000..221c52c --- /dev/null +++ b/lib/libpcap/libpcap/pcapng-private.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2012-2015 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef libpcapng_pcapng_private_h +#define libpcapng_pcapng_private_h + +#include + +#include "pcap/pcap-ng.h" + +struct pcapng_block { + u_char *pcapng_bufptr; + size_t pcapng_buflen; + int pcapng_buf_is_external; + + uint32_t pcapng_block_type; + size_t pcapng_block_len; + int pcapng_block_swapped; + + size_t pcapng_fields_len; + + u_char *pcapng_data_ptr; + size_t pcapng_data_len; + u_int32_t pcapng_cap_len; + int pcapng_data_is_external; + + size_t pcapng_records_len; + size_t pcapng_options_len; + + union { + struct pcapng_section_header_fields _section_header; + struct pcapng_interface_description_fields _interface_description; + struct pcapng_packet_fields _packet; + struct pcapng_simple_packet_fields _simple_packet; + struct pcapng_interface_statistics_fields _interface_statistics; + struct pcapng_enhanced_packet_fields _enhanced_packet; + struct pcapng_process_information_fields _process_information; + struct pcapng_os_event_fields _os_event_information; + struct pcapng_decryption_secrets_fields _decryption_secrets; + } block_fields_; +}; + +#define pcap_ng_shb_fields block_fields_._section_header +#define pcap_ng_idb_fields block_fields_._interface_description +#define pcap_ng_opb_fields block_fields_._packet +#define pcap_ng_spb_fields block_fields_._simple_packet +#define pcap_ng_isb_fields block_fields_._interface_statistics +#define pcap_ng_epb_fields block_fields_._enhanced_packet +#define pcap_ng_pib_fields block_fields_._process_information +#define pcap_ng_osev_fields block_fields_._os_event_information +#define pcap_ng_dsb_fields block_fields_._decryption_secrets + +/* Representation of on file data structure items */ +#define PCAPNG_BYTE_ORDER_MAGIC 0x1A2B3C4D +#define PCAPNG_MAJOR_VERSION 1 +#define PCAPNG_MINOR_VERSION 0 + +#endif -- cgit v1.2.3-56-ge451