3 * Routine to dissect ISO 8327-1 OSI Session Protocol packets
7 * Yuriy Sidelnikov <YSidelnikov@hotmail.com>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 #define PROTO_STRING_SES "ISO 8327-1 OSI Session Protocol"
32 #define PROTO_STRING_SES_INFO "ISO 8327-1 OSI Session Protocol."
37 * Dissect ses-encapsulated data in a TCP stream.
41 #define SES_EXT_CONT 0x01
43 /* protocol versions */
44 #define PROTOCOL_VERSION_1 0x01
45 #define PROTOCOL_VERSION_2 0x02
48 #define BEGINNING_SPDU 0x01
51 #define DATA_TOKEN 0x01
52 #define RELEASE_TOKEN 0x40
53 #define SYNCHRONIZE_MINOR_TOKEN 0x04
54 #define MAJOR_ACTIVITY_TOKEN 0x10
56 /* session user req flag */
57 #define HALF_DUPLEX_FUNCTION_UNIT 0x0001
58 #define DUPLEX_FUNCTION_UNIT 0x0002
59 #define EXPEDITED_DATA_FUNCTION_UNIT 0x0004
60 #define MINOR_SYNCHRONIZE_FUNCTION_UNIT 0x0008
61 #define MAJOR_SYNCHRONIZE_FUNCTION_UNIT 0x0010
62 #define RESYNCHRONIZE_FUNCTION_UNIT 0x0020
63 #define ACTIVITY_MANAGEMENT_FUNCTION_UNIT 0x0040
64 #define NEGOTIATED_RELEASE_FUNCTION_UNIT 0x0080
65 #define CAPABILITY_DATA_FUNCTION_UNIT 0x0100
66 #define EXCEPTION_FUNCTION_UNIT 0x0200
67 #define TYPED_DATA_FUNCTION_UNIT 0x0400
68 #define SYMMETRIC_SYNCHRONIZE_FUNCTION_UNIT 0x0800
69 #define DATA_SEPARATION_FUNCTION_UNIT 0x1000
71 #define SES_EXCEPTION_REPORT 0x2000
72 /*define SES_EXCEPTION_REPORT 0 */
73 #define SES_DATA_TRANSFER 1
74 #define SES_GIVE_TOKENS 1
75 #define SES_PLEASE_TOKENS 2
76 #define SES_EXPEDITED 5
78 #define SES_NOT_FINISHED 8
80 #define SES_DISCONNECT 10
82 #define SES_CONNECTION_REQUEST 13
83 #define SES_CONNECTION_ACCEPT 14
84 #define SES_CONNECTION_DATA_OVERFLOW 15
85 #define SES_OVERFLOW_ACCEPT 16
86 #define SES_GIVE_TOKENS_CONFIRM 21
87 #define SES_GIVE_TOKENS_ACK 22
89 #define SES_ABORT_ACCEPT 26
90 /*#define SES_ACTIVITY_INTERRUPT 25
91 #define SES_ACTIVITY_INTERRUPT_ACK 26 */
92 #define SES_ACTIVITY_RESUME 29
93 #define SES_TYPED_DATA 33
94 #define SES_RESYNCHRONIZE_ACK 34
95 #define SES_MAJOR_SYNC_POINT 41
96 /*#define SES_MAJOR_SYNC_POINT 41
97 #define SES_ACTIVITY_END 41 */
98 #define SES_MAJOR_SYNC_ACK 42
99 #define SES_ACTIVITY_START 45
100 #define SES_EXCEPTION_DATA 48
101 #define SES_MINOR_SYNC_POINT 49
102 #define SES_MINOR_SYNC_ACK 50
103 #define SES_RESYNCHRONIZE 53
104 #define SES_ACTIVITY_DISCARD 57
105 #define SES_ACTIVITY_DISCARD_ACK 58
106 #define SES_CAPABILITY 61
107 #define SES_CAPABILITY_DATA_ACK 62
108 #define CLSES_UNIT_DATA 64
112 0: Rejection by called SS-user; reason not specified.
113 1: Rejection by called SS-user due to temporary congestion.
114 2: Rejection by called SS-user. Subsequent octets may be used
115 for user data up to a length of 512 octets if Protocol
116 Version 1 has been selected, and up to a length such that
117 the total length (including SI and LI) of the SPDU does
118 not exceed 65 539 octets if Protocol Version 2 has been
120 128 + 1: Session Selector unknown.
121 128 + 2: SS-user not attached to SSAP.
122 128 + 3: SPM congestion at connect time.
123 128 + 4: Proposed protocol versions not supported.
124 128 + 5: Rejection by the SPM; reason not specified.
125 128 + 6: Rejection by the SPM; implementation restriction stated in the
128 #define reason_not_specified 0
129 #define temporary_congestion 1
131 #define Session_Selector_unknown 128+1
132 #define SS_user_not_attached_to_SSAP 128+2
133 #define SPM_congestion_at_connect_time 128+3
134 #define versions_not_supported 128+4
135 #define SPM_reason_not_specified 128+5
136 #define SPM_implementation_restriction 128+6
138 #define NON_TOKENS_SPDU FALSE
139 #define TOKENS_SPDU TRUE
141 #define TWO_BYTE_LEN 0xff
145 #define Connection_Identifier 1
146 #define Connect_Accept_Item 5
147 #define Linking_Information 33
148 #define User_Data 193
149 #define Extended_User_Data 194
153 #define Called_SS_user_Reference 9
154 #define Calling_SS_user_Reference 10
155 #define Common_Reference 11
156 #define Additional_Reference_Information 12
158 #define Sync_Type_Item 15
159 #define Token_Item 16
160 #define Transport_Disconnect 17
162 #define Protocol_Options 19
163 #define Session_Requirement 20
164 #define TSDU_Maximum_Size 21
165 #define Version_Number 22
166 #define Initial_Serial_Number 23
167 #define Prepare_Type 24
168 #define EnclosureItem 25
169 #define Token_Setting_Item 26
170 #define Resync_Type 27
172 #define Activity_Identifier 41
173 #define Serial_Number 42
175 #define Reflect_Parameter 49
177 #define Reason_Code 50
178 #define Calling_Session_Selector 51
179 #define Called_Session_Selector 52
180 #define Second_Resync_Type 53
181 #define Second_Serial_Number 54
182 #define Second_Initial_Serial_Number 55
183 #define Upper_Limit_Serial_Number 56
184 #define Large_Initial_Serial_Number 57
185 #define Large_Second_Initial_Serial_Number 58
187 #define Data_Overflow 60
189 /* transport disconnect values */
190 #define transport_connection_is_released 0x01
191 #define user_abort 0x02
192 #define protocol_error 0x04
193 #define no_reason 0x08
194 #define implementation_restriction 0x10
196 #define SESSION_NO_ABORT 0
197 #define SESSION_USER_ABORT 1
198 #define SESSION_PROVIDER_ABORT 2
200 /* data for presentation selector */
201 struct SESSION_DATA_STRUCTURE
207 gboolean rtse_reassemble;
210 extern const value_string ses_vals[];