diff options
author | Michael Mann <mmann78@netscape.net> | 2016-07-23 21:25:05 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-08-01 15:19:59 +0000 |
commit | edcc2f019e3729293d9410e1bb30dae6bc9b790a (patch) | |
tree | d8c31f1294cb9f5fe0ece0882e2aa66d1b63f6b3 /epan/exported_pdu.h | |
parent | c992edc222233f7e49f975763925d1ffb3848beb (diff) |
Add OSI Layer 4 to exported PDU to handle TCP and UDP payloads.
This allows for much easier anonymized captures for protocols running
atop TCP/UDP.
Added support for "TCP dissector data" tag within export PDU (34) so that
the tcpinfo struct that TCP dissector normally passes to its subdissectors
can be saved.
Change-Id: Icd63c049162332e5bcb2720159e5cf8aac893788
Reviewed-on: https://code.wireshark.org/review/16285
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/exported_pdu.h')
-rw-r--r-- | epan/exported_pdu.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/epan/exported_pdu.h b/epan/exported_pdu.h index 26f22932d6..0512ba1684 100644 --- a/epan/exported_pdu.h +++ b/epan/exported_pdu.h @@ -41,6 +41,7 @@ extern "C" { * if all taps are run. */ #define EXPORT_PDU_TAP_NAME_LAYER_3 "OSI layer 3" +#define EXPORT_PDU_TAP_NAME_LAYER_4 "OSI layer 4" #define EXPORT_PDU_TAP_NAME_LAYER_7 "OSI layer 7" /* To add dynamically an export name, call the following function @@ -127,6 +128,17 @@ WS_DLL_PUBLIC GSList *get_export_pdu_tap_list(void); * COL_PROTOCOL might not be filled in. */ +/**< value part is structure passed into TCP subdissectors. Format is: + guint16 version Export PDU version of structure (for backwards/forwards compatibility) + guint32 seq Sequence number of first byte in the data + guint32 nxtseq Sequence number of first byte after data + guint32 lastackseq Sequence number of last ack + guint8 is_reassembled This is reassembled data. + guint16 flags TCP flags + guint16 urgent_pointer Urgent pointer value for the current packet. +*/ +#define EXP_PDU_TAG_TCP_INFO_DATA 34 + typedef struct _exp_pdu_data_t { guint tlv_buffer_len; guint8 *tlv_buffer; @@ -148,6 +160,8 @@ typedef struct _exp_pdu_data_t { #define EXP_PDU_TAG_DVBCI_EVT_LEN 1 +#define EXP_PDU_TAG_DISSECTOR_TABLE_NUM_VAL_LEN 4 + /** Compute the size (in bytes) of a pdu item * @param pinfo Packet info that may contain data for the pdu item @@ -197,12 +211,15 @@ WS_DLL_PUBLIC exp_pdu_data_t *export_pdu_create_tags(packet_info *pinfo, const c 6. Original frame number @param pinfo Packet info that may contain data for the PDU items - @param tag_type Tag type for protocol's PDU. Must be EXP_PDU_TAG_PROTO_NAME or EXP_PDU_TAG_HEUR_PROTO_NAME. + @param tag_type Tag type for protocol's PDU. Must be EXP_PDU_TAG_PROTO_NAME, EXP_PDU_TAG_HEUR_PROTO_NAME or EXP_PDU_TAG_DISSECTOR_TABLE_NAME @param proto_name Name of protocol that is exporting PDU @return filled exp_pdu_data_t struct */ WS_DLL_PUBLIC exp_pdu_data_t *export_pdu_create_common_tags(packet_info *pinfo, const char *proto_name, guint16 tag_type); +WS_DLL_PUBLIC int exp_pdu_data_dissector_table_num_value_size(packet_info *pinfo, void* data); +WS_DLL_PUBLIC int exp_pdu_data_dissector_table_num_value_populate_data(packet_info *pinfo, void* data, guint8 *tlv_buffer, guint32 buffer_size); + WS_DLL_PUBLIC exp_pdu_data_item_t exp_pdu_data_src_ip; WS_DLL_PUBLIC exp_pdu_data_item_t exp_pdu_data_dst_ip; WS_DLL_PUBLIC exp_pdu_data_item_t exp_pdu_data_port_type; |