Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
rtp_stream_id.h
Go to the documentation of this file.
1
15#ifndef __RTP_STREAM_ID_H__
16#define __RTP_STREAM_ID_H__
17
23#include <epan/address.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif /* __cplusplus */
28
29/* forward */
30struct _rtp_info;
31
33typedef struct _rtpstream_id {
34 address src_addr;
35 uint16_t src_port;
36 address dst_addr;
37 uint16_t dst_port;
38 uint32_t ssrc;
40
46unsigned rtpstream_id_to_hash(const rtpstream_id_t *id);
47
53void rtpstream_id_copy(const rtpstream_id_t *src, rtpstream_id_t *dest);
54
61void rtpstream_id_copy_pinfo(const packet_info *pinfo, rtpstream_id_t *dest, bool swap_src_dst);
62
72void rtpstream_id_copy_pinfo_shallow(const packet_info *pinfo, rtpstream_id_t *dest, bool swap_src_dst);
73
81
82#define RTPSTREAM_ID_EQUAL_NONE 0x0000
83#define RTPSTREAM_ID_EQUAL_SSRC 0x0001
84
100bool rtpstream_id_equal(const rtpstream_id_t *id1, const rtpstream_id_t *id2, unsigned flags);
101
112bool rtpstream_id_equal_pinfo(const rtpstream_id_t *id, const packet_info *pinfo, bool swap_src_dst);
113
124bool rtpstream_id_equal_pinfo_rtp_info(const rtpstream_id_t *id, const packet_info *pinfo, const struct _rtp_info *rtp_info);
125
132unsigned pinfo_rtp_info_to_hash(const packet_info *pinfo, const struct _rtp_info *rtp_info);
133
134#ifdef __cplusplus
135}
136#endif /* __cplusplus */
137
138#endif /* __RTP_STREAM_ID_H__ */
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.
Definition rtp_stream_id.c:61
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.
Definition rtp_stream_id.c:132
unsigned rtpstream_id_to_hash(const rtpstream_id_t *id)
Get hash of rtpstream_id.
Definition rtp_stream_id.c:89
void rtpstream_id_copy_pinfo(const packet_info *pinfo, rtpstream_id_t *dest, bool swap_src_dst)
Deep copy addresses and ports from pinfo.
Definition rtp_stream_id.c:41
void rtpstream_id_free(rtpstream_id_t *id)
Free memory allocated for id it releases address items only, do not release whole structure!
Definition rtp_stream_id.c:80
bool rtpstream_id_equal(const rtpstream_id_t *id1, const rtpstream_id_t *id2, unsigned flags)
Compare two RTP stream IDs for equality.
Definition rtp_stream_id.c:109
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.
Definition rtp_stream_id.c:172
void rtpstream_id_copy(const rtpstream_id_t *src, rtpstream_id_t *dest)
Copy rtpstream_id_t structure.
Definition rtp_stream_id.c:30
struct _rtpstream_id rtpstream_id_t
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.
Definition rtp_stream_id.c:156
Holds a network or link-layer address of any supported type.
Definition address.h:62
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
Definition packet-rtp.h:29
Definition rtp_stream_id.h:33