2 * Definitions for Datagram Congestion Control Protocol, "DCCP" dissection:
3 * it should conform to RFC 4340
7 * Francesco Fondelli <francesco dot fondelli, gmail dot com>
9 * Copyright 2020-2021 by Thomas Dreibholz <dreibh [AT] simula.no>
11 * template taken from packet-udp.c
13 * Wireshark - Network traffic analyzer
14 * By Gerald Combs <gerald@wireshark.org>
15 * Copyright 1998 Gerald Combs
17 * SPDX-License-Identifier: GPL-2.0-or-later
20 #ifndef __PACKET_DCCP_H__
21 #define __PACKET_DCCP_H__
25 #endif /* __cplusplus */
27 /* DCCP structs and definitions */
28 typedef struct _e_dccphdr
{
32 uint8_t cscov
; /* 4 bits */
33 uint8_t ccval
; /* 4 bits */
35 uint8_t reserved1
; /* 3 bits */
36 uint8_t type
; /* 4 bits */
38 uint8_t reserved2
; /* if x == 1 */
39 uint64_t seq
; /* 48 or 24 bits sequence number */
41 uint16_t ack_reserved
; /*
42 * for all defined packet types except DCCP-Request
45 uint64_t ack
; /* 48 or 24 bits acknowledgement sequence number */
47 uint32_t service_code
;
53 uint32_t stream
; /* this stream index field is included to help differentiate when address/port pairs are reused */
59 typedef struct _dccp_flow_t
{
60 uint8_t static_flags
; /* flags */
61 uint64_t base_seq
; /* base seq number (used by relative sequence numbers) */
64 struct dccp_analysis
{
65 /* These two structs are managed based on comparing the source
66 * and destination addresses and, if they're equal, comparing
67 * the source and destination ports.
69 * If the source is greater than the destination, then stuff
70 * sent from src is in ual1.
72 * If the source is less than the destination, then stuff
73 * sent from src is in ual2.
75 * XXX - if the addresses and ports are equal, we don't guarantee
81 /* These pointers are set by get_dccp_conversation_data()
82 * fwd point in the same direction as the current packet
83 * and rev in the reverse direction
88 /* Keep track of dccp stream numbers instead of using the conversation
89 * index (as how it was done before). This prevents gaps in the
90 * stream index numbering
94 /* Remember the timestamp of the first frame seen in this dccp
95 * conversation to be able to calculate a relative time compared
96 * to the start of this conversation
100 /* Remember the timestamp of the frame that was last seen in this
101 * dccp conversation to be able to calculate a delta time compared
102 * to previous frame in this conversation
107 /** Get the current number of DCCP streams
109 * @return The number of DCCP streams
111 WS_DLL_PUBLIC
uint32_t get_dccp_stream_count(void);
115 #endif /* __cplusplus */
117 #endif /* __PACKET_DCCP_H__ */
120 * Editor modelines - https://www.wireshark.org/tools/modelines.html
125 * indent-tabs-mode: nil
128 * vi: set shiftwidth=4 tabstop=8 expandtab:
129 * :indentSize=4:tabSize=8:noTabs=true: