blob: 43a521771fc6e09b0ab718e68cbb30cc2f793d0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
/* packet-ses.h
*
* Routine to dissect ISO 8327-1 OSI Session Protocol packets
*
* Yuriy Sidelnikov <YSidelnikov@hotmail.com>
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef PACKET_SES_H
#define PACKET_SES_H
#define PROTO_STRING_SES "ISO 8327-1 OSI Session Protocol"
#define PROTO_STRING_SES_INFO "ISO 8327-1 OSI Session Protocol."
/*
* Dissect ses-encapsulated data in a TCP stream.
*/
/* session parms */
#define SES_EXT_CONT 0x01
/* protocol versions */
#define PROTOCOL_VERSION_1 0x01
#define PROTOCOL_VERSION_2 0x02
/* enclosure item */
#define BEGINNING_SPDU 0x01
#define END_SPDU 0x02
#define DATA_TOKEN 0x01
#define RELEASE_TOKEN 0x40
#define SYNCHRONIZE_MINOR_TOKEN 0x04
#define MAJOR_ACTIVITY_TOKEN 0x10
/* session user req flag */
#define HALF_DUPLEX_FUNCTION_UNIT 0x0001
#define DUPLEX_FUNCTION_UNIT 0x0002
#define EXPEDITED_DATA_FUNCTION_UNIT 0x0004
#define MINOR_SYNCHRONIZE_FUNCTION_UNIT 0x0008
#define MAJOR_SYNCHRONIZE_FUNCTION_UNIT 0x0010
#define RESYNCHRONIZE_FUNCTION_UNIT 0x0020
#define ACTIVITY_MANAGEMENT_FUNCTION_UNIT 0x0040
#define NEGOTIATED_RELEASE_FUNCTION_UNIT 0x0080
#define CAPABILITY_DATA_FUNCTION_UNIT 0x0100
#define EXCEPTION_FUNCTION_UNIT 0x0200
#define TYPED_DATA_FUNCTION_UNIT 0x0400
#define SYMMETRIC_SYNCHRONIZE_FUNCTION_UNIT 0x0800
#define DATA_SEPARATION_FUNCTION_UNIT 0x1000
#define SES_EXCEPTION_REPORT 0x2000
/*define SES_EXCEPTION_REPORT 0 */
#define SES_DATA_TRANSFER 1
#define SES_GIVE_TOKENS 1
#define SES_PLEASE_TOKENS 2
#define SES_EXPEDITED 5
#define SES_PREPARE 7
#define SES_NOT_FINISHED 8
#define SES_FINISH 9
#define SES_DISCONNECT 10
#define SES_REFUSE 12
#define SES_CONNECTION_REQUEST 13
#define SES_CONNECTION_ACCEPT 14
#define SES_CONNECTION_DATA_OVERFLOW 15
#define SES_OVERFLOW_ACCEPT 16
#define SES_GIVE_TOKENS_CONFIRM 21
#define SES_GIVE_TOKENS_ACK 22
#define SES_ABORT 25
#define SES_ABORT_ACCEPT 26
/*#define SES_ACTIVITY_INTERRUPT 25
#define SES_ACTIVITY_INTERRUPT_ACK 26 */
#define SES_ACTIVITY_RESUME 29
#define SES_TYPED_DATA 33
#define SES_RESYNCHRONIZE_ACK 34
#define SES_MAJOR_SYNC_POINT 41
/*#define SES_MAJOR_SYNC_POINT 41
#define SES_ACTIVITY_END 41 */
#define SES_MAJOR_SYNC_ACK 42
#define SES_ACTIVITY_START 45
#define SES_EXCEPTION_DATA 48
#define SES_MINOR_SYNC_POINT 49
#define SES_MINOR_SYNC_ACK 50
#define SES_RESYNCHRONIZE 53
#define SES_ACTIVITY_DISCARD 57
#define SES_ACTIVITY_DISCARD_ACK 58
#define SES_CAPABILITY 61
#define SES_CAPABILITY_DATA_ACK 62
#define CLSES_UNIT_DATA 64
/*
reason code
0: Rejection by called SS-user; reason not specified.
1: Rejection by called SS-user due to temporary congestion.
2: Rejection by called SS-user. Subsequent octets may be used
for user data up to a length of 512 octets if Protocol
Version 1 has been selected, and up to a length such that
the total length (including SI and LI) of the SPDU does
not exceed 65 539 octets if Protocol Version 2 has been
selected.
128 + 1: Session Selector unknown.
128 + 2: SS-user not attached to SSAP.
128 + 3: SPM congestion at connect time.
128 + 4: Proposed protocol versions not supported.
128 + 5: Rejection by the SPM; reason not specified.
128 + 6: Rejection by the SPM; implementation restriction stated in the
PICS.
*/
#define reason_not_specified 0
#define temporary_congestion 1
#define Subsequent 2
#define Session_Selector_unknown 128+1
#define SS_user_not_attached_to_SSAP 128+2
#define SPM_congestion_at_connect_time 128+3
#define versions_not_supported 128+4
#define SPM_reason_not_specified 128+5
#define SPM_implementation_restriction 128+6
#define NON_TOKENS_SPDU false
#define TOKENS_SPDU true
#define TWO_BYTE_LEN 0xff
/* PGI's */
#define Connection_Identifier 1
#define Connect_Accept_Item 5
#define Linking_Information 33
#define User_Data 193
#define Extended_User_Data 194
/* PI's */
#define Called_SS_user_Reference 9
#define Calling_SS_user_Reference 10
#define Common_Reference 11
#define Additional_Reference_Information 12
#define Sync_Type_Item 15
#define Token_Item 16
#define Transport_Disconnect 17
#define Protocol_Options 19
#define Session_Requirement 20
#define TSDU_Maximum_Size 21
#define Version_Number 22
#define Initial_Serial_Number 23
#define Prepare_Type 24
#define EnclosureItem 25
#define Token_Setting_Item 26
#define Resync_Type 27
#define Activity_Identifier 41
#define Serial_Number 42
#define Reflect_Parameter 49
#define Reason_Code 50
#define Calling_Session_Selector 51
#define Called_Session_Selector 52
#define Second_Resync_Type 53
#define Second_Serial_Number 54
#define Second_Initial_Serial_Number 55
#define Upper_Limit_Serial_Number 56
#define Large_Initial_Serial_Number 57
#define Large_Second_Initial_Serial_Number 58
#define Data_Overflow 60
/* transport disconnect values */
#define transport_connection_is_released 0x01
#define user_abort 0x02
#define protocol_error 0x04
#define no_reason 0x08
#define implementation_restriction 0x10
#define SESSION_NO_ABORT 0
#define SESSION_USER_ABORT 1
#define SESSION_PROVIDER_ABORT 2
/* data for presentation selector */
struct SESSION_DATA_STRUCTURE
{
uint8_t spdu_type;
uint8_t abort_type;
uint8_t pres_ctx_id;
uint32_t ros_op;
bool rtse_reassemble;
};
extern value_string_ext ses_vals_ext;
#endif
/*
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 8
* tab-width: 8
* indent-tabs-mode: t
* End:
*
* vi: set shiftwidth=8 tabstop=8 noexpandtab:
* :indentSize=8:tabSize=8:noTabs=false:
*/
|