| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
packet-rdp.h
1/* packet-rdp.h
2 * RDP dissection
3 * Author: David Fort
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
8 *
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12
13#ifndef __PACKET_RDP_H__
14#define __PACKET_RDP_H__
15
16#include <epan/packet.h>
17
18 extern int proto_rdp;
19
20#define RDP_MAX_CHANNELS 31
21
22 typedef enum {
23 RDP_CHANNEL_UNKNOWN,
24 RDP_CHANNEL_DRDYNVC,
25 RDP_CHANNEL_CLIPBOARD,
26 RDP_CHANNEL_SOUND,
27 RDP_CHANNEL_DISK,
28 RDP_CHANNEL_RAIL,
29 RDP_CHANNEL_CONCTRL,
30} rdp_known_channel_t;
31
32
33 typedef struct {
34 wmem_array_t *currentPayload;
35 uint32_t packetLen;
36 uint32_t pendingLen;
37 uint32_t startFrame;
38 wmem_array_t *chunks;
39} rdp_channel_packet_context_t;
40
41 typedef struct {
42 uint32_t startFrame;
43 uint32_t endFrame;
44 tvbuff_t* tvb;
45 bool reassembled;
46} rdp_channel_pdu_chunk_t;
47
48 typedef struct _rdp_channel_def {
49 uint32_t value;
50 const char *strptr;
51 rdp_known_channel_t channelType;
52
53 rdp_channel_packet_context_t current_sc;
54 rdp_channel_packet_context_t current_cs;
55 wmem_multimap_t *chunks_sc;
56 wmem_multimap_t *chunks_cs;
57} rdp_channel_def_t;
58
59 typedef struct _rdp_server_address {
60 address addr;
61 uint16_t port;
62} rdp_server_address_t;
63
64
65
66 typedef struct _rdp_conv_info_t {
67 uint32_t staticChannelId;
68 uint32_t messageChannelId;
69 uint32_t encryptionMethod;
70 uint32_t encryptionLevel;
71 uint32_t licenseAgreed;
72 rdp_server_address_t serverAddr;
73 uint8_t maxChannels;
74 bool isRdstls;
75 rdp_channel_def_t staticChannels[RDP_MAX_CHANNELS+1];
76} rdp_conv_info_t;
77
78 unsigned dissect_rdp_bandwidth_req(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree, bool from_server);
79 void rdp_transport_set_udp_conversation(const packet_info *pinfo, bool reliable, uint32_t reqId,
80 uint8_t *cookie, conversation_t *conv);
81 conversation_t *rdp_find_tcp_conversation_from_udp(conversation_t *udp);
82
83 conversation_t *rdp_find_main_conversation(const packet_info *pinfo);
84
85
86#endif /* __PACKET_RDP_H__ */
address
struct _address address
Holds a network or link-layer address of any supported type.
conversation_t
struct conversation conversation_t
packet_info
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
wmem_array_t
struct _wmem_array_t wmem_array_t
Opaque type representing a dynamically resizable array in the wmem system.
Definition wmem_array.h:42
wmem_multimap_t
struct _wmem_multimap_t wmem_multimap_t
Opaque type representing a hash multimap in the wmem system.
Definition wmem_multimap.h:62
packet.h
_rdp_channel_def
Definition packet-rdp.h:48
_rdp_conv_info_t
Definition packet-rdp.h:66
_rdp_server_address
Definition packet-rdp.h:59
rdp_channel_packet_context_t
Definition packet-rdp.h:33
rdp_channel_pdu_chunk_t
Definition packet-rdp.h:41