* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef __PACKET_INFO_H__
#include "tvbuff.h"
#include "address.h"
+struct endpoint;
+
/** @file
* Dissected packet data and metadata.
*/
#define P2P_DIR_UL 0
#define P2P_DIR_DL 1
+/*
+ * Presence flags.
+ */
+#define PINFO_HAS_TS 0x00000001 /**< time stamp */
+
typedef struct _packet_info {
const char *current_proto; /**< name of protocol currently being dissected */
struct epan_column_info *cinfo; /**< Column formatting information */
+ guint32 presence_flags; /**< Presence flags for some items */
+ guint32 num; /**< Frame number */
+ nstime_t abs_ts; /**< Packet absolute time stamp */
+ nstime_t rel_ts; /**< Relative timestamp (yes, it can be negative) */
frame_data *fd;
union wtap_pseudo_header *pseudo_header;
- struct wtap_pkthdr *phdr; /**< Record metadata */
+ wtap_rec *rec; /**< Record metadata */
GSList *data_src; /**< Frame data sources */
address dl_src; /**< link-layer source address */
address dl_dst; /**< link-layer destination address */
address net_dst; /**< network-layer destination address */
address src; /**< source address (net if present, DL otherwise )*/
address dst; /**< destination address (net if present, DL otherwise )*/
- circuit_type ctype; /**< type of circuit, for protocols with a VC identifier */
- guint32 circuit_id; /**< circuit ID, for protocols with a VC identifier */
+ guint32 vlan_id; /**< First encountered VLAN Id if present otherwise 0 */
const char *noreassembly_reason; /**< reason why reassembly wasn't done, if any */
gboolean fragmented; /**< TRUE if the protocol is only a fragment */
struct {
guint32 destport; /**< destination port */
guint32 match_uint; /**< matched uint for calling subdissector from table */
const char *match_string; /**< matched string for calling subdissector from table */
+ gboolean use_endpoint; /**< TRUE if endpoint member should be used for conversations */
+ struct endpoint* conv_endpoint; /**< Data that can be used for conversations */
guint16 can_desegment; /**< >0 if this segment could be desegmented.
A dissector that can offer this API (e.g.
TCP) sets can_desegment=2, then
inbound (P2P_DIR_RECV)
unknown (P2P_DIR_UNKNOWN) */
- /**< Extra data for handling of decryption of GSSAPI wrapped tvbuffs.
- Caller sets decrypt_gssapi_tvb if this service is requested.
- If gssapi_encrypted_tvb is NULL, then the rest of the tvb data following
- the gssapi blob itself is decrypted othervise the gssapi_encrypted_tvb
- tvb will be decrypted (DCERPC has the data before the gssapi blob)
- If, on return, gssapi_data_encrypted is FALSE, the wrapped tvbuff
- was signed (i.e., an encrypted signature was present, to check
- whether the data was modified by a man in the middle) but not sealed
- (i.e., the data itself wasn't encrypted).
- */
-#define DECRYPT_GSSAPI_NORMAL 1
-#define DECRYPT_GSSAPI_DCE 2
- guint16 decrypt_gssapi_tvb;
- tvbuff_t *gssapi_wrap_tvb;
- tvbuff_t *gssapi_encrypted_tvb;
- tvbuff_t *gssapi_decrypted_tvb;
- gboolean gssapi_data_encrypted;
-
- void *private_data; /**< pointer to data passed from one dissector to another */
GHashTable *private_table; /**< a hash table passed from one dissector to another */
wmem_list_t *layers; /**< layers of each protocol */
guint8 curr_layer_num; /**< The current "depth" or layer number in the current frame */
guint16 link_number;
- guint8 annex_a_used; /**< used in packet-mtp2.c
- * defined in wtap.h
- * MTP2_ANNEX_A_NOT_USED 0
- * MTP2_ANNEX_A_USED 1
- * MTP2_ANNEX_A_USED_UNKNOWN 2
- */
- guint16 profinet_type; /**< the type of PROFINET packet (0: not a PROFINET packet) */
-
- struct _sccp_msg_info_t* sccp_info;
+
guint16 clnp_srcref; /**< clnp/cotp source reference (can't use srcport, this would confuse tpkt) */
guint16 clnp_dstref; /**< clnp/cotp destination reference (can't use dstport, this would confuse tpkt) */
wmem_allocator_t *pool; /**< Memory pool scoped to the pinfo struct */
struct epan_session *epan;
- nstime_t rel_ts; /**< Relative timestamp (yes, it can be negative) */
- const gchar *pkt_comment; /**< NULL if not available */
const gchar *heur_list_name; /**< name of heur list if this packet is being heuristically dissected */
} packet_info;