Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
rtp_stream_id.h File Reference
#include <epan/address.h>

Go to the source code of this file.

Classes

struct  _rtpstream_id
 

Macros

#define RTPSTREAM_ID_EQUAL_NONE   0x0000
 
#define RTPSTREAM_ID_EQUAL_SSRC   0x0001
 

Typedefs

typedef struct _rtpstream_id rtpstream_id_t
 

Functions

unsigned rtpstream_id_to_hash (const rtpstream_id_t *id)
 Get hash of rtpstream_id.
 
void rtpstream_id_copy (const rtpstream_id_t *src, rtpstream_id_t *dest)
 Copy rtpstream_id_t structure.
 
void rtpstream_id_copy_pinfo (const packet_info *pinfo, rtpstream_id_t *dest, bool swap_src_dst)
 Deep copy addresses and ports from pinfo.
 
void rtpstream_id_copy_pinfo_shallow (const packet_info *pinfo, rtpstream_id_t *dest, bool swap_src_dst)
 Shallow copy addresses and ports from pinfo.
 
void rtpstream_id_free (rtpstream_id_t *id)
 Free memory allocated for id it releases address items only, do not release whole structure!
 
bool rtpstream_id_equal (const rtpstream_id_t *id1, const rtpstream_id_t *id2, unsigned flags)
 Compare two RTP stream IDs for equality.
 
bool rtpstream_id_equal_pinfo (const rtpstream_id_t *id, const packet_info *pinfo, bool swap_src_dst)
 Check if rtpstream_id_t is equal to pinfo.
 
bool rtpstream_id_equal_pinfo_rtp_info (const rtpstream_id_t *id, const packet_info *pinfo, const struct _rtp_info *rtp_info)
 Check if rtpstream_id_t is equal to pinfo and rtp_info.
 
unsigned pinfo_rtp_info_to_hash (const packet_info *pinfo, const struct _rtp_info *rtp_info)
 Get hash of rtpstream_id extracted from packet_info and _rtp_info.
 

Detailed Description

RTP stream id functions for Wireshark

Copyright 2003, Alcatel Business Systems By Lars Ruoff lars..nosp@m.ruof.nosp@m.f@gmx.nosp@m..net

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

"RTP Streams" dialog box common routines.

Typedef Documentation

◆ rtpstream_id_t

typedef struct _rtpstream_id rtpstream_id_t

Defines an rtp stream identification

Function Documentation

◆ pinfo_rtp_info_to_hash()

unsigned pinfo_rtp_info_to_hash ( const packet_info pinfo,
const struct _rtp_info rtp_info 
)

Get hash of rtpstream_id extracted from packet_info and _rtp_info.

Parameters
pinfoThe packet information containing source and destination addresses and ports.
rtp_infoThe RTP information containing the SSRC.
Returns
The hash value of the RTP stream ID.

◆ rtpstream_id_copy()

void rtpstream_id_copy ( const rtpstream_id_t src,
rtpstream_id_t dest 
)

Copy rtpstream_id_t structure.

Parameters
srcThe source RTP stream ID.
destThe destination RTP stream ID.

◆ rtpstream_id_copy_pinfo()

void rtpstream_id_copy_pinfo ( const packet_info pinfo,
rtpstream_id_t dest,
bool  swap_src_dst 
)

Deep copy addresses and ports from pinfo.

Parameters
pinfoThe packet information containing source and destination addresses and ports.
destThe destination RTP stream ID.
swap_src_dstWhether to swap source and destination for copying.

◆ rtpstream_id_copy_pinfo_shallow()

void rtpstream_id_copy_pinfo_shallow ( const packet_info pinfo,
rtpstream_id_t dest,
bool  swap_src_dst 
)

Shallow copy addresses and ports from pinfo.

Do not call rtpstream_id_free if you use this function.

Parameters
pinfoThe packet information containing source and destination addresses and ports.
destThe destination RTP stream ID.
swap_src_dstWhether to swap source and destination for copying.

◆ rtpstream_id_equal()

bool rtpstream_id_equal ( const rtpstream_id_t id1,
const rtpstream_id_t id2,
unsigned  flags 
)

Compare two RTP stream IDs for equality.

  • Check if two rtpstream_id_t are equal

compare src_addr, dest_addr, src_port, dest_port

  • compare other items when requested Note: ssrc is the only other item now, but it is expected it will be extended later

Compares two RTP stream IDs based on their source and destination addresses, ports, and optionally SSRC.

Parameters
id1Pointer to the first RTP stream ID.
id2Pointer to the second RTP stream ID.
flagsFlags indicating which fields to compare (e.g., RTPSTREAM_ID_EQUAL_SSRC).
Returns
true if the IDs are equal according to the specified criteria, false otherwise.

◆ rtpstream_id_equal_pinfo()

bool rtpstream_id_equal_pinfo ( const rtpstream_id_t id,
const packet_info pinfo,
bool  swap_src_dst 
)

Check if rtpstream_id_t is equal to pinfo.

  • compare src_addr, dest_addr, src_port, dest_port with pinfo
  • if swap_src_dst is true, compare src to dst and vice versa
Parameters
idThe RTP stream ID to compare.
pinfoThe packet information containing source and destination addresses and ports.
swap_src_dstWhether to swap source and destination for comparison.
Returns
true if the RTP stream ID matches the packet information according to the specified criteria, false otherwise.

◆ rtpstream_id_equal_pinfo_rtp_info()

bool rtpstream_id_equal_pinfo_rtp_info ( const rtpstream_id_t id,
const packet_info pinfo,
const struct _rtp_info rtp_info 
)

Check if rtpstream_id_t is equal to pinfo and rtp_info.

  • compare src_addr, dest_addr, src_port, dest_port with pinfo
  • compare ssrc with rtp_info
Parameters
idThe RTP stream ID to compare.
pinfoThe packet information containing source and destination addresses and ports.
rtp_infoThe RTP information containing the SSRC.
Returns
true if the RTP stream ID matches the packet information and RTP information according to the specified criteria, false otherwise.

◆ rtpstream_id_free()

void rtpstream_id_free ( rtpstream_id_t id)

Free memory allocated for id it releases address items only, do not release whole structure!

Parameters
idThe RTP stream ID to free.

◆ rtpstream_id_to_hash()

unsigned rtpstream_id_to_hash ( const rtpstream_id_t id)

Get hash of rtpstream_id.

Parameters
idThe RTP stream ID for which to calculate the hash.
Returns
The hash value of the RTP stream ID.