| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
tap-sctp-analysis.h File Reference
`#include <stdbool.h>`
`#include <epan/dissectors/packet-sctp.h>`
`#include <epan/address.h>`
`#include <sys/types.h>`
`#include <sys/socket.h>`
`#include <netinet/in.h>`

Go to the source code of this file.

## Classes
struct | _tsn
| Represents a group of TSNs transmitted in a single SCTP packet. More...
struct | _sctp_tmp_info
| Transient per-packet info collected during SCTP dissection before a full association record exists. More...
struct | _sctp_init_collision
| Records verification tags and initial TSNs from an INIT/INIT-ACK collision. More...
struct | tsn_sort
| A sortable summary record for a single TSN, used when ordering TSNs for graph rendering. More...
struct | _sctp_addr_chunk
| Tracks per-address chunk counts for one direction of an SCTP association. More...
struct | _sctp_assoc_info
| Complete statistics and metadata record for a single SCTP association. More...
struct | _sctp_error_info
| Describes a single protocol error detected within an SCTP chunk. More...
struct | _sctp_allassocs_info
| Top-level container holding information about all SCTP associations found in a capture. More...

## Macros
#define | CHUNK_TYPE_LENGTH 1
#define | CHUNK_FLAGS_LENGTH 1
#define | CHUNK_LENGTH_LENGTH 2
#define | CHUNK_HEADER_OFFSET 0
#define | CHUNK_TYPE_OFFSET CHUNK_HEADER_OFFSET
#define | CHUNK_FLAGS_OFFSET (CHUNK_TYPE_OFFSET + CHUNK_TYPE_LENGTH)
#define | CHUNK_LENGTH_OFFSET (CHUNK_FLAGS_OFFSET + CHUNK_FLAGS_LENGTH)
#define | CHUNK_VALUE_OFFSET (CHUNK_LENGTH_OFFSET + CHUNK_LENGTH_LENGTH)
#define | INIT_CHUNK_INITIATE_TAG_LENGTH 4
#define | INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH 4
#define | INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_LENGTH 2
#define | INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_LENGTH 2
#define | INIT_CHUNK_INITIATE_TAG_OFFSET CHUNK_VALUE_OFFSET
#define | INIT_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET
#define | INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_OFFSET
#define | INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_OFFSET
#define | INIT_CHUNK_INITIAL_TSN_OFFSET
#define | DATA_CHUNK_TSN_LENGTH 4
#define | DATA_CHUNK_TSN_OFFSET (CHUNK_VALUE_OFFSET + 0)
#define | DATA_CHUNK_STREAM_ID_OFFSET (DATA_CHUNK_TSN_OFFSET + DATA_CHUNK_TSN_LENGTH)
#define | DATA_CHUNK_STREAM_ID_LENGTH 2
#define | DATA_CHUNK_STREAM_SEQ_NUMBER_LENGTH 2
#define | DATA_CHUNK_PAYLOAD_PROTOCOL_ID_LENGTH 4
#define | I_DATA_CHUNK_RESERVED_LENGTH 2
#define | I_DATA_CHUNK_MID_LENGTH 4
#define | I_DATA_CHUNK_PAYLOAD_PROTOCOL_ID_LENGTH 4
#define | I_DATA_CHUNK_FSN_LENGTH 4
#define | I_DATA_CHUNK_RESERVED_OFFSET
#define | I_DATA_CHUNK_MID_OFFSET
#define | I_DATA_CHUNK_PAYLOAD_PROTOCOL_ID_OFFSET
#define | I_DATA_CHUNK_FSN_OFFSET
#define | I_DATA_CHUNK_PAYLOAD_OFFSET
#define | DATA_CHUNK_HEADER_LENGTH
#define | I_DATA_CHUNK_HEADER_LENGTH
#define | MAX_ADDRESS_LEN 47
#define | SCTP_ABORT_CHUNK_T_BIT 0x01
#define | PARAMETER_TYPE_LENGTH 2
#define | PARAMETER_LENGTH_LENGTH 2
#define | PARAMETER_HEADER_LENGTH (PARAMETER_TYPE_LENGTH + PARAMETER_LENGTH_LENGTH)
#define | PARAMETER_HEADER_OFFSET 0
#define | PARAMETER_TYPE_OFFSET PARAMETER_HEADER_OFFSET
#define | PARAMETER_LENGTH_OFFSET (PARAMETER_TYPE_OFFSET + PARAMETER_TYPE_LENGTH)
#define | PARAMETER_VALUE_OFFSET (PARAMETER_LENGTH_OFFSET + PARAMETER_LENGTH_LENGTH)
#define | IPV6_ADDRESS_LENGTH 16
#define | IPV6_ADDRESS_OFFSET PARAMETER_VALUE_OFFSET
#define | IPV4_ADDRESS_LENGTH 4
#define | IPV4_ADDRESS_OFFSET PARAMETER_VALUE_OFFSET
#define | IPV4ADDRESS_PARAMETER_ID 0x0005
#define | IPV6ADDRESS_PARAMETER_ID 0x0006
#define | SACK_CHUNK_CUMULATIVE_TSN_ACK_LENGTH 4
#define | SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET (CHUNK_VALUE_OFFSET + 0)
#define | SACK_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH 4
#define | SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET
#define | INIT_CHUNK_INITIAL_TSN_LENGTH 4
#define | INIT_CHUNK_FIXED_PARAMETERS_LENGTH
#define | CHUNK_HEADER_LENGTH
#define | INIT_CHUNK_VARIABLE_LENGTH_PARAMETER_OFFSET
#define | NUM_CHUNKS 0x100
#define | OTHER_CHUNKS_INDEX 0xfe
#define | MAX_SCTP_CHUNK_TYPE 256

## Typedefs
typedef struct _tsn | tsn_t
| Represents a group of TSNs transmitted in a single SCTP packet.
typedef struct _sctp_tmp_info | sctp_tmp_info_t
| Transient per-packet info collected during SCTP dissection before a full association record exists.
typedef struct _sctp_init_collision | sctp_init_collision_t
| Records verification tags and initial TSNs from an INIT/INIT-ACK collision.
typedef struct _sctp_addr_chunk | sctp_addr_chunk
| Tracks per-address chunk counts for one direction of an SCTP association.
typedef struct _sctp_assoc_info | sctp_assoc_info_t
| Complete statistics and metadata record for a single SCTP association.
typedef struct _sctp_error_info | sctp_error_info_t
| Describes a single protocol error detected within an SCTP chunk.
typedef struct _sctp_allassocs_info | sctp_allassocs_info_t
| Top-level container holding information about all SCTP associations found in a capture.

## Functions
void | register_tap_listener_sctp_stat (void)
| Registers a tap listener for SCTP statistics.
const sctp_allassocs_info_t * | sctp_stat_get_info (void)
| Gets the SCTP statistics information.
void | sctp_stat_scan (void)
| Scans the SCTP statistics.
void | remove_tap_listener_sctp_stat (void)
| Removes the SCTP statistics tap listener.
const sctp_assoc_info_t * | get_sctp_assoc_info (uint16_t assoc_id)
| Retrieves SCTP association information based on the given association ID.
const sctp_assoc_info_t * | get_selected_assoc (void)
| Retrieves information about the currently selected SCTP association.

## Detailed Description

Copyright 2004-2013, Irene Ruengeler <i.ruengeler [AT] fh-muenster.de>

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

## Macro Definition Documentation

## ◆ CHUNK_HEADER_LENGTH

#define CHUNK_HEADER_LENGTH

Value:
(CHUNK_TYPE_LENGTH + \
CHUNK_FLAGS_LENGTH + \
CHUNK_LENGTH_LENGTH)

## ◆ DATA_CHUNK_HEADER_LENGTH

#define DATA_CHUNK_HEADER_LENGTH

Value:
(CHUNK_HEADER_LENGTH + \
DATA_CHUNK_TSN_LENGTH + \
DATA_CHUNK_STREAM_ID_LENGTH + \
DATA_CHUNK_STREAM_SEQ_NUMBER_LENGTH + \
DATA_CHUNK_PAYLOAD_PROTOCOL_ID_LENGTH)

## ◆ I_DATA_CHUNK_FSN_OFFSET

#define I_DATA_CHUNK_FSN_OFFSET

Value:
(I_DATA_CHUNK_MID_OFFSET + \
I_DATA_CHUNK_MID_LENGTH)

## ◆ I_DATA_CHUNK_HEADER_LENGTH

#define I_DATA_CHUNK_HEADER_LENGTH

Value:
(CHUNK_HEADER_LENGTH + \
DATA_CHUNK_TSN_LENGTH + \
DATA_CHUNK_STREAM_ID_LENGTH + \
I_DATA_CHUNK_RESERVED_LENGTH + \
I_DATA_CHUNK_MID_LENGTH +\
I_DATA_CHUNK_PAYLOAD_PROTOCOL_ID_LENGTH)

## ◆ I_DATA_CHUNK_MID_OFFSET

#define I_DATA_CHUNK_MID_OFFSET

Value:
(I_DATA_CHUNK_RESERVED_OFFSET + \
I_DATA_CHUNK_RESERVED_LENGTH)

## ◆ I_DATA_CHUNK_PAYLOAD_OFFSET

#define I_DATA_CHUNK_PAYLOAD_OFFSET

Value:
(I_DATA_CHUNK_PAYLOAD_PROTOCOL_ID_OFFSET + \
I_DATA_CHUNK_PAYLOAD_PROTOCOL_ID_LENGTH)

## ◆ I_DATA_CHUNK_PAYLOAD_PROTOCOL_ID_OFFSET

#define I_DATA_CHUNK_PAYLOAD_PROTOCOL_ID_OFFSET

Value:
(I_DATA_CHUNK_MID_OFFSET + \
I_DATA_CHUNK_MID_LENGTH)

## ◆ I_DATA_CHUNK_RESERVED_OFFSET

#define I_DATA_CHUNK_RESERVED_OFFSET

Value:
(DATA_CHUNK_STREAM_ID_OFFSET + \
DATA_CHUNK_STREAM_ID_LENGTH)

## ◆ INIT_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET

#define INIT_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET

Value:
(INIT_CHUNK_INITIATE_TAG_OFFSET + \
INIT_CHUNK_INITIATE_TAG_LENGTH )

## ◆ INIT_CHUNK_FIXED_PARAMETERS_LENGTH

#define INIT_CHUNK_FIXED_PARAMETERS_LENGTH

Value:
(INIT_CHUNK_INITIATE_TAG_LENGTH + \
INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH + \
INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_LENGTH + \
INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_LENGTH + \
INIT_CHUNK_INITIAL_TSN_LENGTH)

## ◆ INIT_CHUNK_INITIAL_TSN_OFFSET

#define INIT_CHUNK_INITIAL_TSN_OFFSET

Value:
(INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_OFFSET + \
INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_LENGTH )

## ◆ INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_OFFSET

#define INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_OFFSET

Value:
(INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_OFFSET + \
INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_LENGTH )

## ◆ INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_OFFSET

#define INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_OFFSET

Value:
(INIT_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET + \
INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH )

## ◆ INIT_CHUNK_VARIABLE_LENGTH_PARAMETER_OFFSET

#define INIT_CHUNK_VARIABLE_LENGTH_PARAMETER_OFFSET

Value:
(INIT_CHUNK_INITIAL_TSN_OFFSET + \
INIT_CHUNK_INITIAL_TSN_LENGTH )

## ◆ SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET

#define SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET

Value:
(SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET + \
SACK_CHUNK_CUMULATIVE_TSN_ACK_LENGTH)

## Function Documentation

## ◆ get_sctp_assoc_info()

const sctp_assoc_info_t * get_sctp_assoc_info | ( | uint16_t | assoc_id | ) |

Retrieves SCTP association information based on the given association ID.

Parameters

  assoc_id | The ID of the SCTP association to retrieve information for.

Returns
  Pointer to the SCTP association information, or NULL if not found.

## ◆ get_selected_assoc()

const sctp_assoc_info_t * get_selected_assoc | ( | void |  | ) |

Retrieves information about the currently selected SCTP association.

This function returns a pointer to the sctp_assoc_info_t structure representing the SCTP association that is currently selected in the user interface.

Returns
  Pointer to the selected SCTP association info, or NULL if none is selected.

## ◆ register_tap_listener_sctp_stat()

void register_tap_listener_sctp_stat | ( | void |  | ) |

Registers a tap listener for SCTP statistics.

This function registers a tap listener for SCTP statistics, allowing for the collection and display of SCTP-related data in Wireshark.

## ◆ sctp_stat_get_info()

const sctp_allassocs_info_t * sctp_stat_get_info | ( | void |  | ) |

Gets the SCTP statistics information.

Returns
  Pointer to the SCTP statistics information.