Wireshark 5.1.0
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
18extern int proto_rdp;
19
20#define RDP_MAX_CHANNELS 31
21
22typedef 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
33typedef struct {
34 wmem_array_t *currentPayload;
35 uint32_t packetLen;
36 uint32_t pendingLen;
37 uint32_t startFrame;
38 wmem_array_t *chunks;
40
41typedef struct {
42 uint32_t startFrame;
43 uint32_t endFrame;
44 /* Reassembled payload (file scope); a tvb is built from it on
45 * every pass, as a tvb kept across passes would never be freed. */
46 const uint8_t *data;
47 unsigned length;
48 unsigned reportedLength;
49 bool reassembled;
51
52typedef struct _rdp_channel_def {
53 uint32_t value;
54 const char *strptr;
55 rdp_known_channel_t channelType;
56
59 wmem_multimap_t *chunks_sc;
60 wmem_multimap_t *chunks_cs;
61} rdp_channel_def_t;
62
63typedef struct _rdp_server_address {
64 address addr;
65 uint16_t port;
66} rdp_server_address_t;
67
68
69
70typedef struct _rdp_conv_info_t {
71 uint32_t staticChannelId;
72 uint32_t messageChannelId;
73 uint32_t encryptionMethod;
74 uint32_t encryptionLevel;
75 uint32_t licenseAgreed;
76 rdp_server_address_t serverAddr;
77 uint8_t maxChannels;
78 bool isRdstls;
79 rdp_channel_def_t staticChannels[RDP_MAX_CHANNELS+1];
80} rdp_conv_info_t;
81
82unsigned dissect_rdp_bandwidth_req(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree, bool from_server);
83void rdp_transport_set_udp_conversation(const packet_info *pinfo, bool reliable, uint32_t reqId,
84 uint8_t *cookie, conversation_t *conv);
85conversation_t *rdp_find_tcp_conversation_from_udp(conversation_t *udp);
86
87conversation_t *rdp_find_main_conversation(const packet_info *pinfo);
88
89
90#endif /* __PACKET_RDP_H__ */
struct _address address
Holds a network or link-layer address of any supported type.
struct conversation conversation_t
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
struct _wmem_array_t wmem_array_t
Opaque type representing a dynamically resizable array in the wmem system.
Definition wmem_array.h:42
struct _wmem_multimap_t wmem_multimap_t
Opaque type representing a hash multimap in the wmem system.
Definition wmem_multimap.h:62
Definition packet-rdp.h:52
Definition packet-rdp.h:70
Definition packet-rdp.h:63
Definition packet-rdp.h:33
Definition packet-rdp.h:41