Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / ui / rtp_stream_id.h
blob09adb10dc6075d91ae3287e4563b65eea4feed8c
1 /** @file
3 * RTP stream id functions for Wireshark
5 * Copyright 2003, Alcatel Business Systems
6 * By Lars Ruoff <lars.ruoff@gmx.net>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
15 #ifndef __RTP_STREAM_ID_H__
16 #define __RTP_STREAM_ID_H__
18 /** @file
19 * "RTP Streams" dialog box common routines.
20 * @ingroup main_ui_group
23 #include <epan/address.h>
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
29 /* forward */
30 struct _rtp_info;
32 /** Defines an rtp stream identification */
33 typedef 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;
39 } rtpstream_id_t;
41 /**
42 * Get hash of rtpstream_id
44 unsigned rtpstream_id_to_hash(const rtpstream_id_t *id);
46 /**
47 * Copy rtpstream_id_t structure
49 void rtpstream_id_copy(const rtpstream_id_t *src, rtpstream_id_t *dest);
51 /**
52 * Deep copy addresses and ports from pinfo
54 void rtpstream_id_copy_pinfo(const packet_info *pinfo, rtpstream_id_t *dest, bool swap_src_dst);
56 /**
57 * Shallow copy addresses and ports from pinfo
58 * Do not call rtpstream_id_free if you use this function.
60 void rtpstream_id_copy_pinfo_shallow(const packet_info *pinfo, rtpstream_id_t *dest, bool swap_src_dst);
62 /**
63 * Free memory allocated for id
64 * it releases address items only, do not release whole structure!
66 void rtpstream_id_free(rtpstream_id_t *id);
68 /**
69 * Check if two rtpstream_id_t are equal
70 * - compare src_addr, dest_addr, src_port, dest_port
71 * - compare other items when requested
72 * Note: ssrc is the only other item now, but it is expected it will be extended later
74 #define RTPSTREAM_ID_EQUAL_NONE 0x0000
75 #define RTPSTREAM_ID_EQUAL_SSRC 0x0001
76 bool rtpstream_id_equal(const rtpstream_id_t *id1, const rtpstream_id_t *id2, unsigned flags);
78 /**
79 * Check if rtpstream_id_t is equal to pinfo
80 * - compare src_addr, dest_addr, src_port, dest_port with pinfo
81 * - if swap_src_dst is true, compare src to dst and vice versa
83 bool rtpstream_id_equal_pinfo(const rtpstream_id_t *id, const packet_info *pinfo, bool swap_src_dst);
85 /**
86 * Check if rtpstream_id_t is equal to pinfo and rtp_info
87 * - compare src_addr, dest_addr, src_port, dest_port with pinfo
88 * - compare ssrc with rtp_info
90 bool rtpstream_id_equal_pinfo_rtp_info(const rtpstream_id_t *id, const packet_info *pinfo, const struct _rtp_info *rtp_info);
92 /**
93 * Get hash of rtpstream_id extracted from packet_info and _rtp_info
95 unsigned pinfo_rtp_info_to_hash(const packet_info *pinfo, const struct _rtp_info *rtp_info);
97 #ifdef __cplusplus
99 #endif /* __cplusplus */
101 #endif /* __RTP_STREAM_ID_H__ */