10#ifndef __PACKET_TCP_H__
11#define __PACKET_TCP_H__
13#include "ws_symbol_export.h"
36#define IS_TH_FIN(x) (x & TH_FIN)
37#define IS_TH_URG(x) (x & TH_URG)
40#define GT_SEQ(x, y) ((int32_t)((y) - (x)) < 0)
41#define LT_SEQ(x, y) ((int32_t)((x) - (y)) < 0)
42#define GE_SEQ(x, y) ((int32_t)((y) - (x)) <= 0)
43#define LE_SEQ(x, y) ((int32_t)((x) - (y)) <= 0)
44#define EQ_SEQ(x, y) (x) == (y)
47#define MAX_CONTIGUOUS_SEQUENCES 100
62 uint8_t mh_capable_flags;
65 uint64_t mh_dss_rawdsn;
66 uint64_t mh_dss_rawack;
67 uint16_t mh_dss_length;
92 #define MAX_TCP_SACK_RANGES 4
93 uint8_t num_sack_ranges;
105 uint32_t sack_left_edge[MAX_TCP_SACK_RANGES];
106 uint32_t sack_right_edge[MAX_TCP_SACK_RANGES];
111 uint32_t th_dup_count;
112 uint32_t th_dup_orig_frame;
126 uint16_t urgent_pointer;
151tcp_dissect_pdus(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree,
152 bool proto_desegment,
unsigned fixed_len,
153 unsigned (*get_pdu_len)(
packet_info *, tvbuff_t *,
int,
void*),
154 dissector_t dissect_pdu,
void* dissector_data);
157tcp_reassembly_table_functions;
160pdu_store_sequencenumber_of_next_pdu(
packet_info *pinfo, uint32_t seq, uint32_t nxtpdu,
wmem_tree_t *multisegment_pdus);
172 uint32_t frame_acked;
183 uint32_t dupack_frame;
184 uint32_t bytes_in_flight;
185 uint32_t push_bytes_sent;
187 uint32_t new_data_seq;
190 uint32_t dup_orig_frame;
200 uint32_t first_frame;
203 uint32_t first_frame_with_seq;
206#define MSP_FLAGS_REASSEMBLE_ENTIRE_SEGMENT 0x00000001
208#define MSP_FLAGS_GOT_ALL_SEGMENTS 0x00000002
210#define MSP_FLAGS_MISSING_FIRST_SEGMENT 0x00000004
234} mptcp_dss_mapping_t;
242} mptcp_dsn2packet_mapping_t;
251 uint8_t static_flags;
266 uint32_t nextseqframe;
269 uint64_t maxseqtobeacked;
293 mptcp_meta_flow_t *meta;
295 uint8_t static_flags;
301 MPTCP_HMAC_NOT_SET = 0,
305} mptcp_hmac_algorithm_t;
308#define MPTCP_CAPABLE_CRYPTO_MASK 0x3F
310#define MPTCP_CHECKSUM_MASK 0x80
316 tcp_unacked_t *segments;
317 uint16_t segment_count;
327 uint8_t num_contiguous_ranges;
333 uint8_t num_sack_ranges;
336 uint32_t lastnondupack;
339 uint32_t maxseqtobeacked;
342 uint32_t nextseqframe;
345 uint32_t push_bytes_sent;
351 uint32_t sack_left_edge[MAX_TCP_SACK_RANGES];
352 uint32_t sack_right_edge[MAX_TCP_SACK_RANGES];
353 uint32_t contiguous_ranges[MAX_CONTIGUOUS_SEQUENCES][2];
359 uint32_t process_uid;
360 uint32_t process_pid;
368#define TCP_MAX_UNACKED_SEGMENTS 10000
374 uint8_t static_flags;
375 uint16_t maxsizeacked;
379#define TCP_FLOW_REASSEMBLE_UNTIL_FIN 0x0001
384 uint8_t mp_operations;
386 bool closing_initiator;
387 bool closing_initiator_rst;
391 uint32_t lastsegmentflags;
416 struct mptcp_subflow *mptcp_subflow;
425 uint8_t mp_operations;
436 mptcp_meta_flow_t meta_flow[2];
508 struct mptcp_analysis* mptcp_analysis;
513 uint16_t server_port;
521 int8_t flow_direction : 2;
528 uint8_t conversation_completeness;
530 bool had_acc_ecn_setup_syn;
531 bool had_acc_ecn_setup_syn_ack;
532 bool had_acc_ecn_option;
535 char *conversation_completeness_str;
545 uint8_t tcp_snd_manual_analysis;
555 mptcp_dss_mapping_t *mapping;
557} mptcp_per_packet_data_t;
560WS_DLL_PUBLIC
void dissect_tcp_payload(tvbuff_t *tvb,
packet_info *pinfo,
int offset,
561 uint32_t seq, uint32_t nxtseq, uint32_t sport,
562 uint32_t dport, proto_tree *tree,
563 proto_tree *tcp_tree,
589extern void add_tcp_process_info(uint32_t frame_num,
address *local_addr,
address *remote_addr, uint16_t local_port, uint16_t remote_port, uint32_t uid, uint32_t pid,
char *username,
char *command);
595WS_DLL_PUBLIC uint32_t get_tcp_stream_count(
void);
601WS_DLL_PUBLIC uint32_t get_mptcp_stream_count(
void);
605extern char *tcp_follow_index_filter(
unsigned stream,
unsigned sub_stream);
606extern char *tcp_follow_address_filter(
address *src_addr,
address *dst_addr,
int src_port,
int dst_port);
struct _address address
Holds a network or link-layer address of any supported type.
struct conversation conversation_t
struct epan_dissect epan_dissect_t
Opaque type representing a single packet dissection context.
Definition epan.h:62
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
struct _wmem_array_t wmem_array_t
Opaque type representing a dynamically resizable array in the wmem system.
Definition wmem_array.h:42
struct _wmem_tree_t wmem_itree_t
Alias for a wmem interval tree.
Definition wmem_interval_tree.h:46
struct _wmem_list_t wmem_list_t
Opaque type representing a scoped, doubly-linked list in the wmem system.
Definition wmem_list.h:42
struct _wmem_map_t wmem_map_t
Opaque type representing a wmem-managed hash map.
Definition wmem_map.h:46
struct _wmem_tree_t wmem_tree_t
Opaque type representing a red-black tree in the wmem system.
Definition wmem_tree.h:49
Definition packet-tcp.h:239
Definition packet-tcp.h:218
Definition packet-tcp.h:366
Definition packet-tcp.h:162
Definition packet-tcp.h:420
Definition packet-tcp.h:552
Definition packet-tcp.h:281
Table of functions for a reassembly table.
Definition reassemble.h:151
Definition packet-tcp.h:171
Definition packet-tcp.h:439
Definition packet-tcp.h:315
Definition packet-tcp.h:197
Definition packet-tcp.h:542
Definition packet-tcp.h:358
Definition packet-tcp.h:121