2 * Routines for tn5250.packet dissection
5 * 5494 Remote Control Unit - Functions Reference
6 * Release 3.0 Document Number SC30-3533-04
8 * http://publibfp.dhe.ibm.com/cgi-bin/bookmgr/BOOKS/co2e2001/CCONTENTS
9 * [Found in 2020 in https://archive.org/details/5494RemoteControlUnitFunctionsReferenceSC30353304]
11 * Copyright 2009, Robert Hogan <robert@roberthogan.net>
13 * Wireshark - Network traffic analyzer
14 * By Gerald Combs <gerald@wireshark.org>
15 * Copyright 1998 Gerald Combs
17 * SPDX-License-Identifier: GPL-2.0-or-later
23 #include <epan/packet.h>
24 #include <epan/expert.h>
25 #include <epan/conversation.h>
27 #include <wsutil/array.h>
28 #include "packet-tn5250.h"
30 void proto_register_tn5250(void);
32 typedef struct tn5250_conv_info_t
{
33 struct tn5250_conv_info_t
*next
;
34 uint32_t outbound_port
;
38 /* 13.4 SNA LU 4 and LU 7 Negative Responses */
40 #define NEGATIVE_RESPONSE1 0x081102
41 #define NEGATIVE_RESPONSE2 0x100301
42 #define NEGATIVE_RESPONSE3 0x100501
43 #define NEGATIVE_RESPONSE4 0x100502
45 static const value_string vals_tn5250_negative_responses
[] = {
46 { 0x08110200, "The Cancel key of a printer was pressed when it was not in an error state"},
47 { 0x08110201, "The Cancel key of a printer was pressed when it was in an error state"},
48 { 0x10030101, "Command that is not valid encountered in data stream"},
49 { 0x10030105, "Clear unit alternate command not valid"},
50 { 0x10030123, "Command to enter text mode not valid for the keyboard or country language code used"},
51 { 0x10050103, "Format table resequencing error on display data stream"},
52 { 0x10050110, "Structured field length is not valid"},
53 { 0x10050111, "Structured field class or type is not valid"},
54 { 0x10050112, "Parameter is not valid in structured field"},
55 { 0x10050113, "Structured field minor structure length is not valid"},
56 { 0x10050114, "Parameter is not valid in structured field minor structure"},
57 { 0x1005011B, "Data stream command is not valid in WP mode"},
58 { 0x1005011C, "Data stream command is not valid in data processing (DP) mode"},
59 { 0x1005011D, "Command not allowed on display with unlocked keyboard"},
60 { 0x10050121, "Premature data stream termination"},
61 { 0x10050122, "Write to display order row/col address is not valid"},
62 { 0x10050123, "The address in the Repeat to Address is less than the current workstation screen address"},
63 { 0x10050125, "Start-of-field order length not valid"},
64 { 0x10050126, "Start-of-field order address not valid"},
65 { 0x10050127, "Data in restore not valid"},
66 { 0x10050128, "Field extends past the end of the display"},
67 { 0x10050129, "Format table overflow"},
68 { 0x1005012A, "An attempt was made to write past the end of display"},
69 { 0x1005012B, "Start-of-header length not valid"},
70 { 0x1005012C, "Parameter that is not valid is on the ROLL command"},
71 { 0x1005012D, "Extended attribute type not valid"},
72 { 0x1005012E, "RAM load parameter not valid"},
73 { 0x1005012F, "Extended attribute not valid"},
74 { 0x10050130, "Start-of-field attribute not valid"},
75 { 0x10050131, "No escape code was found where it was expected"},
76 { 0x10050132, "WRITE ERROR CODE TO WINDOW command row/col address is not valid"},
77 { 0x10050133, "WRITE ERROR CODE TO WINDOW command is not valid with the message error line that is in use"},
78 { 0x10050134, "SAVE PARTIAL SCREEN command was followed by an immediate read or another SAVE type command"},
79 { 0x10050135, "Continued entry field segment is not valid"},
80 { 0x10050136, "Word wrap not allowed for this type of entry field"},
81 { 0x10050138, "An attempt was made to write a scroll bar beyond the last display column"},
82 { 0x10050139, "The total row/col, slider position (sliderpos), or display row/col on a scroll bar is not valid"},
83 { 0x1005013A, "At least one selection field choice must be allowed to accept the cursor"},
84 { 0x1005013B, "An attempt was made to write a selection field choice before column 1 or beyond the last display column"},
85 { 0x1005013C, "An attempt was made to define too many selection field choices"},
86 { 0x1005013D, "An attempt was made to define more than one default selected choice in a single choice selection field"},
87 { 0x1005013E, "Too many windows defined. 128 windows are allowed."},
88 { 0x10050140, "Write Data command to non-entry field"},
89 { 0x10050141, "Too much data or too little data in a Write Data command"},
90 { 0x10050142, "An attempt was made to write a X'FF' character to the display screen."},
91 { 0x10050148, "The Fax and Image feature is not supported on this device."},
92 { 0x10050149, "Data follows an image/fax download command in the data stream and the image/fax download command does"
93 " not contain the last of the image data. No other commands are accepted until all the image/fax data has been received."},
94 { 0x1005014C, "The display is not capable of video delivery."},
95 { 0x1005014D, "The first 2 bytes of the PC/TV command were not X'E201' or X'E301'."},
96 { 0x1005014F, "Data stream longer than 16,368 bytes."},
97 { 0x10050180, "The printer LSID sent in the copy-to-printer data stream from the AS/400 system was not in the SNA session table"},
98 { 0x10050181, "The LSID sent in the copy-to-printer data stream from the AS/400 system was not a printer LSID"},
99 { 0x10050187, "Self-check field length (self-check field > 33 bytes) not valid"},
100 { 0x10050188, "Self-check field control word not valid"},
101 { 0x10050228, "SCS command not valid"},
102 { 0x10050229, "SCS parameter not valid"},
103 { 0x1005022A, "Intelligent Printer Data Stream (IPDS parameter error)"},
104 { 0x10050260, "IPDS printer's multistatus functions are available"},
108 #define TN5250_ESCAPE 0x04
109 static const value_string vals_tn5250_escape_codes
[] = {
114 /* 15.1 Workstation Data Stream Commands*/
115 #define CLEAR_UNIT 0x40
116 #define CLEAR_UNIT_ALTERNATE 0x20
117 #define CLEAR_FORMAT_TABLE 0x50
118 #define WRITE_TO_DISPLAY 0x11
119 #define WRITE_ERROR_CODE 0x21
120 #define WRITE_ERROR_CODE_TO_WINDOW 0x22
121 #define READ_INPUT_FIELDS 0x42
122 #define READ_MDT_FIELDS 0x52
123 #define READ_MDT_ALTERNATE 0x82
124 #define READ_SCREEN 0x62
125 #define READ_SCREEN_WITH_EXTENDED_ATTRIBUTES 0x64
126 #define READ_SCREEN_TO_PRINT 0x66
127 #define READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES 0x68
128 #define READ_SCREEN_TO_PRINT_WITH_GRIDLINES 0x6A
129 #define READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES_AND_GRIDLINES 0x6C
130 #define READ_IMMEDIATE 0x72
131 #define READ_MODIFIED_IMMEDIATE_ALTERNATE 0x83
132 #define SAVE_SCREEN 0x02
133 #define SAVE_PARTIAL_SCREEN 0x03
134 #define RESTORE_SCREEN 0x12
135 #define RESTORE_PARTIAL_SCREEN 0x13
137 #define WRITE_STRUCTURED_FIELD 0xF3
138 #define WRITE_SINGLE_STRUCTURED_FIELD 0xF4
139 #define COPY_TO_PRINTER 0x16
141 static const value_string vals_tn5250_command_codes
[] = {
142 { CLEAR_UNIT
, "Clear Unit"},
143 { CLEAR_UNIT_ALTERNATE
, "Clear Unit Alternate"},
144 { CLEAR_FORMAT_TABLE
, "Clear Format Table"},
145 { WRITE_TO_DISPLAY
, "Write To Display"},
146 { WRITE_ERROR_CODE
, "Write Error Code"},
147 { WRITE_ERROR_CODE_TO_WINDOW
, "Write Error Code To Window"},
148 { READ_INPUT_FIELDS
, "Read Input Fields"},
149 { READ_MDT_FIELDS
, "Read Mdt Fields"},
150 { READ_MDT_ALTERNATE
, "Read Mdt Alternate"},
151 { READ_SCREEN
, "Read Screen"},
152 { READ_SCREEN_WITH_EXTENDED_ATTRIBUTES
, "Read Screen With Extended Attributes"},
153 { READ_SCREEN_TO_PRINT
, "Read Screen To Print"},
154 { READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES
, "Read Screen To Print With Extended Attributes"},
155 { READ_SCREEN_TO_PRINT_WITH_GRIDLINES
, "Read Screen To Print With Gridlines"},
156 { READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES_AND_GRIDLINES
, "Read Screen To Print With Extended Attributes And Gridlines"},
157 { READ_IMMEDIATE
, "Read Immediate"},
158 { READ_MODIFIED_IMMEDIATE_ALTERNATE
, "Read Modified Immediate Alternate"},
159 { SAVE_SCREEN
, "Save Screen"},
160 { SAVE_PARTIAL_SCREEN
, "Save Partial Screen"},
161 { RESTORE_SCREEN
, "Restore Screen"},
162 { RESTORE_PARTIAL_SCREEN
, "Restore Partial Screen"},
164 { WRITE_STRUCTURED_FIELD
, "Write Structured Field"},
165 { WRITE_SINGLE_STRUCTURED_FIELD
, "Write Single Structured Field"},
166 { COPY_TO_PRINTER
, "Copy-To-Printer"},
170 /* 15.4 Clear Unit Alternate*/
171 static const value_string vals_tn5250_cua_parms
[] = {
172 { 0x00 , "Set screen size to 27 rows by 132 columns"},
173 { 0x80 , "Leave the screen size unchanged and do not erase image/fax data from the display memory."},
178 /* 15.6 Order Codes */
179 #define TN5250_SBA 0x11
180 #define TN5250_IC 0x13
181 #define TN5250_MC 0x14
182 #define TN5250_RA 0x02
183 #define TN5250_EA 0x03
184 #define TN5250_SOH 0x01
185 #define TN5250_TD 0x10
186 #define TN5250_WEA 0x12
187 #define TN5250_SF 0x1D
188 #define TN5250_WDSF 0x15
190 static const value_string vals_tn5250_order_codes
[] = {
191 { TN5250_SBA
, "Set Buffer Address (SBA)"},
192 { TN5250_IC
, "Insert Cursor (IC)"},
193 { TN5250_MC
, "Move Cursor (MC)"},
194 { TN5250_RA
, "Repeat to Address (RA)"},
195 { TN5250_EA
, "Erase to Address (EA)"},
196 { TN5250_SOH
, "Start of Header (SOH)"},
197 { TN5250_TD
, "Transparent Data (TD)"},
198 { TN5250_WEA
, "Write Extended Attribute Order"},
199 { TN5250_SF
, "Start Field (SF)"},
200 { TN5250_WDSF
, "Write to Display Structured Field (WDSF)"},
204 /* 15.6.1 WTD Control Code */
207 static const value_string vals_tn5250_wtd_cc_byteone
[] = {
209 { 0x20 , "Reset pending AID, lock keyboard"},
210 { 0x40 , "Reset pending AID, lock keyboard, Reset MDT flags in non-bypass fields"},
211 { 0x60 , "Reset pending AID, lock keyboard, Reset MDT flags in all fields"},
212 { 0x80 , "Reset pending AID, lock keyboard, Null all non-bypass fields with MDT on"},
213 { 0xA0 , "Reset pending AID, lock keyboard, Reset MDT flags in non-bypass fields, Null all non-bypass fields"},
214 { 0xC0 , "Reset pending AID, lock keyboard, Reset MDT flags in non-bypass fields, Null all non-bypass fields with MDT on"},
215 { 0xE0 , "Reset pending AID, lock keyboard, Reset MDT flags in all fields, Null all non-bypass fields"},
219 /* 15.6.8 Erase to Address Order */
220 /* 15.6.11 Write Extended Attribute Order */
221 #define EXTENDED_IDEOGRAPHIC_ATTRIBUTES 0x05
222 #define EXTENDED_FOREGROUND_COLOR_ATTRIBUTES 0x03
223 #define EXTENDED_PRIMARY_ATTRIBUTES 0x01
225 static const value_string vals_tn5250_attributes
[] = {
226 { 0x00, "Display screen"},
227 { 0x01, "Extended primary attributes"},
228 { 0x02, "Extended text attributes (use in WP mode only)"},
229 { 0x03, "Extended foreground color attributes"},
230 { 0x05, "Extended ideographic attributes"},
231 { 0xFF, "Display screen and all extended attribute types supported by this "
232 "workstation. Use X'FF' to clear all extended attribute types for "
233 "optimum performance, even if all types are not used."},
238 /* 15.6.11.1 Write Extended Attribute Order - Extended Primary Attribute*/
239 /* 15.6.12.3 Start of Field Order - Field Attribute*/
241 #define FA_ID_BITS 0xE0
242 static const value_string vals_tn5250_fa_id
[] = {
243 { 0x01 , "Identifies Field as Field Format Word"},
247 static const struct true_false_string tn5250_field_attr_col
= {
248 "Column Separator On",
249 "Column Separator Off"
252 static const struct true_false_string tn5250_field_attr_blink
= {
257 static const struct true_false_string tn5250_field_attr_und
= {
259 "Do Not Underscore Field"
262 static const struct true_false_string tn5250_field_attr_int
= {
267 static const struct true_false_string tn5250_field_attr_rev
= {
273 /* 15.6.11.2 Write Extended Attribute Order - Valid Extended Foreground Color Attributes*/
275 static const value_string vals_tn5250_foreground_color_attributes
[] = {
276 { 0x00, "Null - continue currently defined attribute"},
277 { 0x80, "Color of the display background medium; black on most models"},
278 { 0x81 , "Color of the display background medium; black on most models"},
280 { 0x83, "blue; different shade of blue than X'82' on some displays"},
282 { 0x85, "green; different shade of green than X'84' on some displays"},
283 { 0x86, "turquoise"},
284 { 0x87, "turquoise; different shade of turquoise than X'86' on some displays"},
286 { 0x89, "red; different shade of red than X'88' on some displays"},
288 { 0x8B, "pink; different shade of pink than X'8A' on some displays"},
290 { 0x8D, "yellow; different shade of pink than X'8C' on some displays"},
292 { 0x8F, "white; different shade of white than X'8E' on some displays"},
297 /* 15.6.11.3 Write Extended Attribute Order - Valid Extended Ideographic Attributes*/
298 static const value_string vals_tn5250_ideographic_attributes
[] = {
299 { 0x00, "Null - continue currently defined attribute"},
300 { 0x80, "Normal display attribute - end double byte mode (SI)"},
301 { 0x81, "Begin double byte mode (SO)"},
305 /* 15.6.12.1 Start of Field Order - Field Format Word */
307 #define FFW_ID_BITS 0xC0
308 static const value_string vals_tn5250_ffw_id
[] = {
309 { 0x01 , "Identifies Field as Field Format Word"},
313 static const struct true_false_string tn5250_field_ffw_bypass
= {
314 "This is a bypass field",
315 "This is not a bypass field"
318 static const struct true_false_string tn5250_field_ffw_dup
= {
319 "Duplication or Field Mark is allowed in this field",
320 "Duplication or Field Mark is not allowed in this field"
323 static const struct true_false_string tn5250_field_ffw_mdt
= {
324 "This field has been modified",
325 "This field has not been modified"
328 #define FFW_SHIFT_BITS 0x07
330 static const value_string vals_tn5250_ffw_shift
[] = {
331 { 0x00, "Alpha shift"},
332 { 0x01, "Alpha only"},
333 { 0x02, "Numeric shift"},
334 { 0x03, "Numeric only"},
335 { 0x04, "Katakana shift"},
336 { 0x05, "Digits only"},
337 { 0x06, "I/O-(feature input field)"},
338 { 0x07, "Signed numeric"},
342 static const struct true_false_string tn5250_field_ffw_auto
= {
343 "Auto Enter When Field is Exited",
347 static const struct true_false_string tn5250_field_ffw_fer
= {
348 "Field Exit key is required",
349 "Field Exit key is not required"
352 static const struct true_false_string tn5250_field_ffw_monocase
= {
353 "Translate operator keyed letters to uppercase",
354 "Accept lower case letters"
357 static const struct true_false_string tn5250_field_ffw_me
= {
358 "Mandatory Enter Field",
359 "Not A Mandatory Enter Field"
362 #define FFW_ADJUST_BITS 0x07
364 static const value_string vals_tn5250_ffw_adjust
[] = {
365 { 0x00, "No adjust specified"},
370 { 0x05, "Right adjust, zero fill"},
371 { 0x06, "Right adjust, blank fill"},
372 { 0x07, "Mandatory fill"},
376 /* 15.6.12.2 Start of Field Order - Field Control Word */
378 #define SELECTOR 0x81
379 #define IDEOGRAPHIC 0x82
380 #define FORWARD_EDGE 0x85
381 #define CONTINUED_ENTRY 0x86
382 #define SELF_CHECK 0xB1
383 #define ENTRY_FIELD_RESEQUENCING 0x80
384 #define CURSOR_PROGRESSION_ENTRY_FIELD 0x88
385 #define HIGHLIGHTED_ENTRY_FIELD 0x89
386 #define POINTER_DEVICE_SELECTION_ENTRY_FIELD 0x8A
387 #define TRANSPARENCY_ENTRY_FIELD 0x84
389 static const range_string vals_tn5250_fcw
[] = {
390 { 0x8000, 0x8080, "Entry field resequencing. The nn specifies the next entry field in the sequence (X'00' to X'80')."},
391 { 0x8101, 0x8101, "Magnetic stripe reader entry field"},
392 { 0x8102, 0x8102, "Selector light pen or cursor select field"},
393 { 0x8103, 0x8103, "Magnetic stripe reader and selector light pen entry field"},
394 { 0x8106, 0x8106, "Selector light pen and selectable attention entry field"},
395 { 0x8200, 0x8200, "Ideographic-only entry field"},
396 { 0x8220, 0x8220, "Ideographic data type entry field"},
397 { 0x8240, 0x8240, "Ideographic-either entry field"},
398 { 0x8280, 0x8280, "Ideographic-open entry field"},
399 { 0x82C0, 0x82C0, "Ideographic-open entry field"},
400 { 0x8400, 0x84FF, "Transparency entry field. The nn can be any two digits."},
401 { 0x8501, 0x8501, "Forward edge trigger entry field"},
402 { 0x8601, 0x8603, "Continued entry field"},
403 { 0x8680, 0x8680, "Word Wrap entry field"},
404 { 0x8800, 0x88FF, "Cursor progression entry field. The nn is the next entry field in the specified application cursor progression sequence."},
405 { 0x8900, 0x89FF, "Highlighted entry field. The nn specifies the field attribute"},
406 { 0x8A00, 0x8AFF, "Pointer device selection entry field. If a user selects the entry field, the nn specifies the AID to be returned."},
407 { 0xB140, 0xB140, "Self-check modulus 11 entry field"},
408 { 0xB1A0, 0xB1A0, "Self-check modulus 10 entry field"},
414 #define MAGNETIC_STRIPE_READER_ENTRY_FIELD 0x8101
415 #define SELECTOR_LIGHT_PEN_OR_CURSOR_SELECT_FIELD 0x8102
416 #define MAGNETIC_STRIPE_READER_AND_SELECTOR_LIGHT_PEN_ENTRY_FIELD 0x8103
417 #define SELECTOR_LIGHT_PEN_AND_SELECTABLE_ATTENTION_ENTRY_FIELD 0x8106
418 #define IDEOGRAPHIC_ONLY_ENTRY_FIELD 0x8200
419 #define IDEOGRAPHIC_DATA_TYPE_ENTRY_FIELD 0x8220
420 #define IDEOGRAPHIC_EITHER_ENTRY_FIELD 0x8240
421 #define IDEOGRAPHIC_OPEN_ENTRY_FIELD 0x8280
422 #define IDEOGRAPHIC_OPEN_ENTRY_FIELD1 0x82C0
423 #define FORWARD_EDGE_TRIGGER_ENTRY_FIELD 0x8501
424 #define CONTINUED_ENTRY_FIELD 0x8601
425 #define CONTINUED_ENTRY_FIELD1 0x8602
426 #define CONTINUED_ENTRY_FIELD2 0x8603
427 #define WORD_WRAP_ENTRY_FIELD 0x8680
428 #define SELF_CHECK_MODULUS_11_ENTRY_FIELD 0xB140
429 #define SELF_CHECK_MODULUS_10_ENTRY_FIELD 0xB1A0
431 static const value_string vals_tn5250_fcw
[] = {
432 { ENTRY_FIELD_RESEQUENCING
, "Entry field resequencing. The NN specifies the next entry field "
433 "in the sequence (X'00' to X'80')."},
434 { MAGNETIC_STRIPE_READER_ENTRY_FIELD
, "Magnetic stripe reader entry field"},
435 { SELECTOR_LIGHT_PEN_OR_CURSOR_SELECT_FIELD
, "Selector light pen or cursor select field"},
436 { MAGNETIC_STRIPE_READER_AND_SELECTOR_LIGHT_PEN_ENTRY_FIELD
, "Magnetic stripe reader and selector light pen entry field"},
437 { SELECTOR_LIGHT_PEN_AND_SELECTABLE_ATTENTION_ENTRY_FIELD
, "Selector light pen and selectable attention entry field"},
438 { IDEOGRAPHIC_ONLY_ENTRY_FIELD
, "Ideographic-only entry field"},
439 { IDEOGRAPHIC_DATA_TYPE_ENTRY_FIELD
, "Ideographic data type entry field"},
440 { IDEOGRAPHIC_EITHER_ENTRY_FIELD
, "Ideographic-either entry field"},
441 { IDEOGRAPHIC_OPEN_ENTRY_FIELD
, "Ideographic-open entry field"},
442 { IDEOGRAPHIC_OPEN_ENTRY_FIELD1
, "Ideographic-open entry field"},
443 { TRANSPARENCY_ENTRY_FIELD
, "Transparency entry field. The NN can be any two digits."},
444 { FORWARD_EDGE_TRIGGER_ENTRY_FIELD
, "Forward edge trigger entry field"},
445 { CONTINUED_ENTRY_FIELD
, "Continued entry field"},
446 { CONTINUED_ENTRY_FIELD1
, "Continued entry field"},
447 { CONTINUED_ENTRY_FIELD2
, "Continued entry field"},
448 { WORD_WRAP_ENTRY_FIELD
, "Word Wrap entry field"},
449 { CURSOR_PROGRESSION_ENTRY_FIELD
, "Cursor progression entry field. The NN is the next entry field "
450 "in the specified application cursor progression sequence."},
451 { HIGHLIGHTED_ENTRY_FIELD
, "Highlighted entry field. The NN specifies the field attribute"},
452 { POINTER_DEVICE_SELECTION_ENTRY_FIELD
, "Pointer device selection entry field. If a user selects the "
453 "entry field, the NN specifies the AID to be returned."},
454 { SELF_CHECK_MODULUS_11_ENTRY_FIELD
, "Self-check modulus 11 entry field"},
455 { SELF_CHECK_MODULUS_10_ENTRY_FIELD
, "Self-check modulus 10 entry field"},
460 /* 15.6.12.3 Start of Field Order - Field Attribute */
462 static const value_string vals_tn5250_fa_color
[] = {
464 { 0x21, "Green/Reverse image"},
466 { 0x23, "White/Reverse image"},
467 { 0x24, "Green/Underscore"},
468 { 0x25, "Green/Underscore/Reverse image"},
469 { 0x26, "White/Underscore"},
470 { 0x27, "Nondisplay"},
472 { 0x29, "Red/Reverse image "},
473 { 0x2A, "Red/Blink"},
474 { 0x2B, "Red/Reverse image/Blink"},
475 { 0x2C, "Red/Underscore"},
476 { 0x2D, "Red/Underscore/Reverse image"},
477 { 0x2E, "Red/Underscore/Blink"},
478 { 0x2F, "Nondisplay"},
479 { 0x30, "Turquoise/Column separators "},
480 { 0x31, "Turquoise/Column separators/Reverse image"},
481 { 0x32, "Yellow/Column separators"},
482 { 0x33, "Yellow/Column separators/Reverse image"},
483 { 0x34, "Turquoise/Underscore"},
484 { 0x35, "Turquoise/Underscore/Reverse image"},
485 { 0x36, "Yellow/Underscore"},
486 { 0x37, "Nondisplay"},
488 { 0x39, "Pink/Reverse image"},
490 { 0x3B, "Blue/Reverse image"},
491 { 0x3C, "Pink/Underscore"},
492 { 0x3D, "Pink/Underscore/Reverse image "},
493 { 0x3E, "Blue/Underscore"},
494 { 0x3F, "Nondisplay"},
498 /* 15.6.13 Write to Display Structured Field Order */
499 #define CLASS_5250 0xD9
501 static const value_string vals_tn5250_sf_class
[] = {
502 { CLASS_5250
, "5250 Class of Structured Field"},
506 /* 15.6.13 - Major Structure Types */
507 #define DEFINE_SELECTION_FIELD 0x50
508 #define CREATE_WINDOW 0x51
509 #define UNRESTRICTED_WINDOW_CURSOR_MOVEMENT 0x52
510 #define DEFINE_SCROLL_BAR_FIELD 0x53
511 #define WRITE_DATA 0x54
512 #define PROGRAMMABLE_MOUSE_BUTTONS 0x55
513 #define REMOVE_GUI_SELECTION_FIELD 0x58
514 #define REMOVE_GUI_WINDOW 0x59
515 #define REMOVE_GUI_SCROLL_BAR_FIELD 0x5B
516 #define REMOVE_ALL_GUI_CONSTRUCTS 0x5F
517 #define DRAW_ERASE_GRID_LINES 0x60
518 #define CLEAR_GRID_LINE_BUFFER 0x61
519 #define IMAGE_FAX_CONTROL 0x66
520 #define IMAGE_FAX_DOWNLOAD 0x67
521 #define WSC_CUSTOMIZATION 0x71
522 #define DEFINE_AUDIT_WINDOW__TABLE 0x30
523 #define DEFINE_COMMAND_KEY_FUNCTION 0x31
524 #define READ_TEXT_SCREEN 0x32
525 #define DEFINE_PENDING_OPERATIONS 0x33
526 #define DEFINE_TEXT_SCREEN_FORMAT 0x34
527 #define DEFINE_SCALE_LINE 0x35
528 #define WRITE_TEXT_SCREEN 0x36
529 #define DEFINE_SPECIAL_CHARACTERS 0x37
530 #define PENDING_DATA 0x38
531 #define DEFINE_OPERATOR_ERROR_MESSAGES 0x39
532 #define DEFINE_PITCH_TABLE 0x3A
533 #define DEFINE_FAKE_DP_COMMAND_KEY_FUNCTION 0x3B
534 #define PASS_THROUGH 0x3F
535 #define TN5250_QUERY 0x70
536 #define TN5250_QUERY_STATION_STATE 0x72
537 #define VIDEO_AUDIO_CONTROLS 0x68
538 #define TRUE_TRANSPARENCY_WRITE 0x6A
540 static const value_string vals_tn5250_sf_type
[] = {
541 { DEFINE_SELECTION_FIELD
, "Define Selection Field"},
542 { CREATE_WINDOW
, "Create Window"},
543 { UNRESTRICTED_WINDOW_CURSOR_MOVEMENT
, "Unrestricted Window Cursor Movement"},
544 { DEFINE_SCROLL_BAR_FIELD
, "Define Scroll Bar Field"},
545 { WRITE_DATA
, "Write Data"},
546 { PROGRAMMABLE_MOUSE_BUTTONS
, "Programmable Mouse Buttons"},
547 { REMOVE_GUI_SELECTION_FIELD
, "Remove Gui Selection Field"},
548 { REMOVE_GUI_WINDOW
, "Remove Gui Window"},
549 { REMOVE_GUI_SCROLL_BAR_FIELD
, "Remove Gui Scroll Bar Field"},
550 { REMOVE_ALL_GUI_CONSTRUCTS
, "Remove All Gui Constructs"},
551 { DRAW_ERASE_GRID_LINES
, "Draw/Erase Grid Lines"},
552 { CLEAR_GRID_LINE_BUFFER
, "Clear Grid Line Buffer"},
553 { IMAGE_FAX_CONTROL
, "Image Fax Control"},
554 { IMAGE_FAX_DOWNLOAD
, "Image Fax Download"},
555 { WSC_CUSTOMIZATION
, "Wsc Customization"},
556 { DEFINE_AUDIT_WINDOW__TABLE
, "Define Audit Window Table"},
557 { DEFINE_COMMAND_KEY_FUNCTION
, "Define Command Key Function"},
558 { READ_TEXT_SCREEN
, "Read Text Screen"},
559 { DEFINE_PENDING_OPERATIONS
, "Define Pending Operations"},
560 { DEFINE_TEXT_SCREEN_FORMAT
, "Define Text Screen Format"},
561 { DEFINE_SCALE_LINE
, "Define Scale Line"},
562 { WRITE_TEXT_SCREEN
, "Write Text Screen"},
563 { DEFINE_SPECIAL_CHARACTERS
, "Define Special Characters"},
564 { PENDING_DATA
, "Pending Data"},
565 { DEFINE_OPERATOR_ERROR_MESSAGES
, "Define Operator Error Messages"},
566 { DEFINE_PITCH_TABLE
, "Define Pitch Table"},
567 { DEFINE_FAKE_DP_COMMAND_KEY_FUNCTION
, "Define Fake Dp Command Key Function"},
568 { PASS_THROUGH
, "Pass-Through"},
569 { TN5250_QUERY
, "5250 Query"},
570 { TN5250_QUERY_STATION_STATE
, "5250 Query Station State"},
571 { VIDEO_AUDIO_CONTROLS
, "Video/Audio Controls Command"},
572 { TRUE_TRANSPARENCY_WRITE
, "True Transparency Write Command"},
576 /* 15.6.13.1 Write to Display Structured Field Order - Create Window */
577 static const struct true_false_string tn5250_field_wdsf_cw_flag1_1
= {
578 "Cursor Restricted To Window",
579 "Cursor Not Restricted To Window"
582 static const struct true_false_string tn5250_field_wdsf_cw_flag1_2
= {
583 "Window Is A Pull-Down Menu Bar",
584 "Window Is Not A Pull-Down Menu Bar"
587 #define CW_BORDER_PRESENTATION 0x01
588 #define CW_TITLE_FOOTER 0x10
590 static const value_string vals_tn5250_wdsf_cw_minor_type
[] = {
591 { CW_BORDER_PRESENTATION
, "Border Presentation"},
592 { CW_TITLE_FOOTER
, "Window Title/Footer"},
596 /* 15.6.13.1 Write to Display Structured Field Order - Create Window - Border Presentation Minor Structure */
597 static const struct true_false_string tn5250_field_wdsf_cw_bp_flag1_1
= {
598 "Use Border Presentation Characters on a GUI-like NWS",
599 "Do Not Use Border Presentation Characters on a GUI-like NWS"
602 /* 15.6.13.1 Write to Display Structured Field Order - Create Window - Window Title/Footer Minor Structure */
603 #define WTF_BITS 0xC0
605 static const value_string vals_tn5250_wdsf_cw_tf_flag_orientation
[] = {
606 { 0, "Window Title or Footer is Centered"},
607 { 1, "Window Title or Footer is Right Justified"},
608 { 2, "Window Title or Footer is Left Justified"},
609 { 3, "Reserved (Window Title or Footer is Centered)"},
613 static const struct true_false_string tn5250_field_wdsf_cw_tf_flag_1
= {
614 "Window Footer is Defined",
615 "Window Title is Defined"
619 /* 15.6.13.4 Write to Display Structured Field Order - Remove All GUI Constructs*/
620 static const struct true_false_string tn5250_field_wdsf_ragc_flag1_0
= {
621 "5494 Maps GUI-like Characters",
622 "5494 Does Not Map GUI-like Characters"
626 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field*/
627 #define DS_CHOICE_TEXT 0x10
628 #define DS_MENU_BAR_SEPARATOR 0x09
629 #define DS_CHOICE_PRESENTATION_DISPLAY 0x01
630 #define DS_CHOICE_INDICATORS 0x02
631 #define DS_SCROLLBAR_INDICATORS 0x03
634 static const value_string vals_tn5250_wdsf_ds_minor_type
[] = {
635 { DS_CHOICE_TEXT
, "Choice Text"},
636 { DS_MENU_BAR_SEPARATOR
, "Menu Bar Separator"},
637 { DS_CHOICE_PRESENTATION_DISPLAY
, "Choice Presentation Display Attributes"},
638 { DS_CHOICE_INDICATORS
, "Choice Indicators"},
639 { DS_SCROLLBAR_INDICATORS
, "Scroll Bar Indicators"},
643 #define MOUSE_CHARACTERISTICS_BITS 0x03
645 static const value_string vals_tn5250_wdsf_ds_flag1_mouse_characteristics
[] = {
646 { 0x00, "Use this selection field in all cases"},
647 { 0x02, "Use this selection field only if the display does not have a mouse."},
648 { 0x01, "Use this selection field only if the display has a mouse."},
653 #define DS_AUTO_ENTER_BITS 0x30
655 static const value_string vals_tn5250_wdsf_ds_flag1_auto_enter
[] = {
656 { 0, "Selection field is not auto-enter"},
657 { 2, "Selection field is auto-enter on selection except if double-digit numeric selection is used."},
658 { 1, "Selection field is auto-enter on selection or deselection except if double-digit numeric selection is used. "},
659 { 3, "Selection field is auto-enter on selection except if single-digit or double-digit numeric selection is used."},
663 static const struct true_false_string tn5250_field_wdsf_ds_flag1_1
= {
664 "Auto-Select Enabled",
665 "Auto-Select Not Enabled"
668 static const struct true_false_string tn5250_field_wdsf_ds_flag1_2
= {
670 "Field MDT Not Enabled"
673 static const struct true_false_string tn5250_field_wdsf_ds_flag2_1
= {
674 "If set to on, a scroll bar should is created beside the selection field choices, and TotalRows and SliderPos that can "
675 "be scrolled are included in the major structure.",
679 static const struct true_false_string tn5250_field_wdsf_ds_flag2_2
= {
680 "If set to on, one blank is added after the numeric separator character.",
684 static const struct true_false_string tn5250_field_wdsf_ds_flag2_3
= {
685 "If set to on, an asterisk (*) replaces the first character of an unavailable choice on monochrome display.",
689 static const struct true_false_string tn5250_field_wdsf_ds_flag2_4
= {
690 "If set to on, cursor is limited to input-capable positions only.",
694 static const struct true_false_string tn5250_field_wdsf_ds_flag2_5
= {
695 "If set to on, the Field Advance/Field Backspace function is like the Character Advance/Character Backspace keys within "
696 "this selection field.",
700 static const struct true_false_string tn5250_field_wdsf_ds_flag2_6
= {
701 "If set to on, the cursor movement keys are not allowed to exit this selection field.",
705 static const struct true_false_string tn5250_field_wdsf_ds_flag3_1
= {
706 "If set to on, any selected choices are changed to available whenever the keyboard is unlocked.",
710 #define MENU_BAR 0x01
711 #define SINGLE_CHOICE_SELECTION_FIELD 0x11
712 #define MULTIPLE_CHOICE_SELECTION_FIELD 0x12
713 #define SINGLE_CHOICE_SELECTION_LIST 0x21
714 #define MULTIPLE_CHOICE_SELECTION_LIST 0x22
715 #define SINGLE_CHOICE_SELECTION_FIELD_AND_A_PULL_DOWN_LIST 0x31
716 #define MULTIPLE_CHOICE_SELECTION_FIELD_AND_A_PULL_DOWN_LIST 0x32
717 #define PUSH_BUTTONS 0x41
718 #define PUSH_BUTTONS_IN_A_PULL_DOWN_MENU_ 0x51
720 static const value_string vals_tn5250_wdsf_ds_type
[] = {
721 { MENU_BAR
, "Menu bar"},
722 { SINGLE_CHOICE_SELECTION_FIELD
, "Single choice selection field"},
723 { MULTIPLE_CHOICE_SELECTION_FIELD
, "Multiple choice selection field"},
724 { SINGLE_CHOICE_SELECTION_LIST
, "Single choice selection list"},
725 { MULTIPLE_CHOICE_SELECTION_LIST
, "Multiple choice selection list"},
726 { SINGLE_CHOICE_SELECTION_FIELD_AND_A_PULL_DOWN_LIST
, "Single choice selection field and a pull-down list"},
727 { MULTIPLE_CHOICE_SELECTION_FIELD_AND_A_PULL_DOWN_LIST
, "Multiple choice selection field and a pull-down list"},
728 { PUSH_BUTTONS
, "Push buttons"},
729 { PUSH_BUTTONS_IN_A_PULL_DOWN_MENU_
, "Push buttons in a pull-down menu "},
733 #define DS_INDICATOR1 0x00
734 #define DS_INDICATOR2 0x02
735 #define DS_INDICATOR3 0x03
736 #define DS_INDICATOR4 0x04
737 #define DS_INDICATOR5 0x05
738 #define DS_INDICATOR6 0x06
739 #define DS_INDICATOR7 0x0F
740 #define DS_INDICATORS_BITS 0x0F
742 static const value_string vals_tn5250_wdsf_ds_gdc_indicators
[] = {
743 { DS_INDICATOR1
, "An indicator to the left of each choice (check box or radio button) is created."},
744 { DS_INDICATOR2
, "A push button box is created around choice text and the choice text is padded with a blank on both sides."},
745 { DS_INDICATOR3
, "A push button indicator specifies each choice instead of a push button box on a GUI-like NWS. (A GUI "
746 "PWS treats this setting like B'0010'.)"},
747 { DS_INDICATOR4
, "A push button box is created around choice text and choice text is padded with a blank on both sides,"
748 " and a leading choice text attribute is written on top of the previous choice text ending attribute."},
749 { DS_INDICATOR5
, "A push button indicator specifies each choice instead of a push button box on a GUI-like NWS, and a leading "
750 "choice text attribute is specified on top of the previous ending choice text attribute. (A GUI PWS treats "
751 "this setting like B'0100'.)"},
752 { DS_INDICATOR6
, "A push button box is created around choice text (with no padding)."},
753 { DS_INDICATOR7
, "There are no indicators for this value. It is valid for all types of selection."},
757 #define DS_SELECTION_TECHNIQUES1 0x1
758 #define DS_SELECTION_TECHNIQUES2 0x2
759 #define DS_SELECTION_TECHNIQUES3 0x7
760 #define DS_SELECTION_TECHNIQUES_BITS 0xE0
762 static const value_string vals_tn5250_wdsf_ds_gdc_selection_techniques
[] = {
763 { DS_SELECTION_TECHNIQUES1
, "Defines a mnemonic (or numeric) selection for some or all of the choices. The mnemonic is underscored."},
764 { DS_SELECTION_TECHNIQUES2
, "Defines a mnemonic (or numeric) selection for some or all of the choices. "
765 "The mnemonic is not underscored."},
766 { DS_SELECTION_TECHNIQUES3
, "No mnemonic (or numeric) selection is specified."},
771 #define DS_NWS_INDICATOR1 0x00
772 #define DS_NWS_INDICATOR2 0x03
773 #define DS_NWS_INDICATOR3 0x05
774 #define DS_NWS_INDICATOR4 0x08
775 #define DS_NWS_INDICATOR5 0x0F
776 #define DS_NWS_INDICATORS_BITS 0x0F
778 static const value_string vals_tn5250_wdsf_ds_nws_indicators
[] = {
779 { DS_NWS_INDICATOR1
, "An indicator to the left of each choice (for example, a slash (/)) is created. (1)"},
780 { DS_NWS_INDICATOR2
, "A push button indicator specifies each choice. (2)"},
781 { DS_NWS_INDICATOR3
, "A push button indicator specifies each choice, and a leading choice text attribute is "
782 "specified on top of a previous ending choice text attribute. (2)"},
783 { DS_NWS_INDICATOR4
, "A numeric field to the left of the first choice is created. (Single- or double-digit "
784 "numeric fields are determined by bits 5-7.) (3)"},
785 { DS_NWS_INDICATOR5
, "No indicators are specified for this value. This is valid for all types of selection fields."},
789 #define DS_NWS_SELECTION_TECHNIQUES1 0x1
790 #define DS_NWS_SELECTION_TECHNIQUES2 0x2
791 #define DS_NWS_SELECTION_TECHNIQUES3 0x4
792 #define DS_NWS_SELECTION_TECHNIQUES4 0x5
793 #define DS_NWS_SELECTION_TECHNIQUES5 0x7
794 #define DS_NWS_SELECTION_TECHNIQUES_BITS 0xE0
796 static const value_string vals_tn5250_wdsf_ds_nws_selection_techniques
[] = {
797 { DS_NWS_SELECTION_TECHNIQUES1
, "Defines a mnemonic (or numeric) selection for some or all of the choices. "
798 "The mnemonic is underscored."},
799 { DS_NWS_SELECTION_TECHNIQUES2
, "Defines a mnemonic (or numeric) selection for some or all of the choices. "
800 "The mnemonic is not underscored."},
801 { DS_NWS_SELECTION_TECHNIQUES3
, "Defines a single-digit numeric selection."},
802 { DS_NWS_SELECTION_TECHNIQUES4
, "Defines a double-digit numeric selection."},
803 { DS_NWS_SELECTION_TECHNIQUES5
, "No mnemonic or numeric selection is defined."},
807 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Choice Text Minor Structure*/
808 #define DS_CHOICE_STATE1 0x01
809 #define DS_CHOICE_STATE2 0x02
810 #define DS_CHOICE_STATE3 0x03
811 #define DS_CHOICE_STATE_BITS 0x03
813 static const value_string vals_tn5250_wdsf_ds_ct_flag1_choice_state
[] = {
814 { DS_CHOICE_STATE1
, "Available and not a default selection"},
815 { DS_CHOICE_STATE2
, "Available and is a default selection (selected state)"},
816 { DS_CHOICE_STATE3
, "Not available"},
820 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag1_2
= {
821 "Set to on: specifies a menu bar choice that starts a new row.",
822 "Set to on: does not specify a menu bar choice that starts a new row."
825 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag1_3
= {
826 "Reserved (incorrectly set to on).",
827 "Reserved (set to zero)."
830 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag1_4
= {
831 "Set to on: specifies that a mnemonic offset is included in the minor structure.",
832 "Set to off: does not specify that a mnemonic offset is included in the minor structure."
835 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag1_5
= {
836 "If set to on, specifies an AID if 'selected' is included in this minor structure.",
840 #define DS_NUMERIC_SELECTION_NOT_INCLUDED 0x0
841 #define DS_NUMERIC_SELECTION_SINGLE_DIGIT 0x1
842 #define DS_NUMERIC_SELECTION_DOUBLE_DIGIT 0x2
843 #define DS_NUMERIC_SELECTION_BITS 0xC0
845 static const value_string vals_tn5250_wdsf_ds_ct_flag1_numeric_selection
[] = {
846 { DS_NUMERIC_SELECTION_NOT_INCLUDED
, "Numeric selection characters are not included in this minor structure."},
847 { DS_NUMERIC_SELECTION_SINGLE_DIGIT
, "A single-digit numeric selection character is included in this minor structure."},
848 { DS_NUMERIC_SELECTION_DOUBLE_DIGIT
, "Double-digit numeric selection characters are included in this minor structure."},
852 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_0
= {
853 "Set to on, the choice cannot accept a cursor.",
854 "Set to off, the choice can accept a cursor."
857 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_1
= {
858 "Set to on, the application user desires a roll-down AID if the Cursor Up key is pressed on this choice.",
859 "Set to off, the application user does not desire a roll-down AID if the Cursor Up key is pressed on this choice."
862 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_2
= {
863 "Set to on, the application user desires a roll-up AID if the Cursor Up key is pressed on this choice.",
864 "Set to off, the application user does not desire a roll-up AID if the Cursor Up key is pressed on this choice."
867 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_3
= {
868 "Set to on, the application user desires a roll-left AID if the Cursor Up key is pressed on this choice.",
869 "Set to off, the application user does not desire a roll-left AID if the Cursor Up key is pressed on this choice."
872 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_4
= {
873 "Set to on, the application user desires a roll-right AID if the Cursor Up key is pressed on this choice.",
874 "Set to off, the application user does not desire a roll-right AID if the Cursor Up key is pressed on this choice."
877 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_5
= {
878 "Set to on, no push-button box is written for this choice.",
879 "Set to off, a push-button box is written for this choice."
882 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_6
= {
883 "Reserved (incorrectly set to on).",
884 "Reserved (set to zero)."
887 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_7
= {
888 "Set to on, cursor direction is right to left.",
889 "Set to off, cursor direction is left to right."
892 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag3_0
= {
893 "Set to on, use this minor structure for GUI devices (including GUI-like NWSs).",
894 "Set to off, do not use this minor structure for GUI devices (including GUI-like NWSs)."
897 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag3_1
= {
898 "Set to on, use this minor structure for non-GUI NWSs that are capable of creating mnemonic underscores.",
899 "Set to off, do not use this minor structure for non-GUI NWSs that are capable of creating mnemonic underscores."
902 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag3_2
= {
903 "Set to on, use this minor structure for NWS display devices that are not capable of creating underscores.",
904 "Set to off, do not use this minor structure for NWS display devices that are not capable of creating underscores."
907 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Menu Bar Separator Minor Structure*/
909 static const struct true_false_string tn5250_field_wdsf_ds_mbs_flag_0
= {
910 "Use specified separator character on GUI-like NWSs.",
911 "Do not use specified separator character on GUI-like NWSs."
914 static const struct true_false_string tn5250_field_wdsf_ds_mbs_flag_1
= {
915 "Suppress writing of leading and ending attributes.",
916 "Do not suppress writing of leading and ending attributes."
919 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Choice Presentation Display Attributes Minor Structure*/
921 static const struct true_false_string tn5250_field_wdsf_ds_cpda_flag1_0
= {
922 "Uses the minor structure for GUI devices (including GUI-like NWSs).",
923 "Does not use the minor structure for GUI devices (including GUI-like NWSs)."
926 static const struct true_false_string tn5250_field_wdsf_ds_cpda_flag1_1
= {
927 "Uses the minor structure for NWSs that are capable of creating underscores.",
928 "Does not use the minor structure for NWSs that are capable of creating underscores."
931 static const struct true_false_string tn5250_field_wdsf_ds_cpda_flag1_2
= {
932 "Uses the minor structure for NWSs that are not capable of creating mnemonic underscores.",
933 "Does not use the minor structure for NWSs that are not capable of creating mnemonic underscores."
936 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Choice Indicators Minor Structure*/
938 static const struct true_false_string tn5250_field_wdsf_ds_ci_flag1_0
= {
939 "Use the specified indicators on GUI-like NWSs.",
940 "Do Not Use the specified indicators on GUI-like NWSs"
943 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Scroll Bar Indicators Minor Structure*/
945 static const struct true_false_string tn5250_field_wdsf_ds_sbi_flag1_0
= {
946 "Use the specified indicators on GUI-like NWSs.",
947 "Do Not Use the specified indicators on GUI-like NWSs"
950 /* 15.6.13.7 Write to Display Structured Field Order - Define Scroll Bar Field */
952 static const struct true_false_string tn5250_field_wdsf_dsb_flag1_0
= {
953 "On: Vertical scroll bar is set to off and horizontal scroll bar is set to on.",
954 "Off: Vertical scroll bar is set to off and horizontal scroll bar is set to on."
958 static const struct true_false_string tn5250_field_wdsf_dsb_flag1_1
= {
959 "On: The cursor is moved to the scroll bar on a pointer device scroll bar interaction",
960 "Off: The cursor is moved to the scroll bar on a pointer device scroll bar interaction."
964 static const struct true_false_string tn5250_field_wdsf_dsb_flag1_7
= {
969 /* 15.6.13.9 Write to Display Structured Field Order - Write Data Field */
971 static const struct true_false_string tn5250_field_wdsf_wdf_flag1_0
= {
972 "On: Write data to entry field",
973 "Off: Do not write data to entry field"
976 /* 15.6.13.10 Write to Display Structured Field Order - Programmable Mouse Buttons */
977 static const struct true_false_string tn5250_field_wdsf_pmb_flag1_0
= {
978 "Two-event definition",
979 "Single-event definition"
982 static const struct true_false_string tn5250_field_wdsf_pmb_flag1_1
= {
983 "On: The text cursor is moved to the location of the mouse cursor.",
984 "Off: The text cursor is NOT moved to the location of the mouse cursor."
987 static const struct true_false_string tn5250_field_wdsf_pmb_flag1_2
= {
988 "On: The single mouse event is queued if the keyboard is locked.",
989 "Off: The single mouse event is not queued if the keyboard is locked"
992 static const struct true_false_string tn5250_field_wdsf_pmb_flag1_3
= {
993 "On: A marker box is drawn on the first event of a two-event definition",
994 "Off: A marker box is not drawn on the first event of a two-event definition"
997 #define PMB_RESERVED 0x00
998 #define LEFT_BUTTON_PRESSED 0x01
999 #define LEFT_BUTTON_RELEASED 0x02
1000 #define LEFT_BUTTON_DOUBLE_CLICK 0x03
1001 #define RIGHT_BUTTON_PRESSED 0x04
1002 #define RIGHT_BUTTON_RELEASED 0x05
1003 #define RIGHT_BUTTON_DOUBLE_CLICK 0x06
1004 #define MIDDLE_BUTTON_PRESSED 0x07
1005 #define MIDDLE_BUTTON_RELEASED 0x08
1006 #define MIDDLE_BUTTON_DOUBLE_CLICK 0x09
1007 #define SHIFTED_LEFT_BUTTON_PRESSED 0x0A
1008 #define SHIFTED_LEFT_BUTTON_RELEASED 0x0B
1009 #define SHIFTED_LEFT_BUTTON_DOUBLE_CLICK 0x0C
1010 #define SHIFTED_RIGHT_BUTTON_PRESSED 0x0D
1011 #define SHIFTED_RIGHT_BUTTON_RELEASED 0x0E
1012 #define SHIFTED_RIGHT_BUTTON_DOUBLE_CLICK 0x0F
1013 #define SHIFTED_MIDDLE_BUTTON_PRESSED 0x10
1014 #define SHIFTED_MIDDLE_BUTTON_RELEASED 0x11
1015 #define SHIFTED_MIDDLE_BUTTON_DOUBLE_CLICK 0x12
1017 static const value_string vals_tn5250_mouse_events
[] = {
1018 { PMB_RESERVED
, "Reserved"},
1019 { LEFT_BUTTON_PRESSED
, "Left button pressed"},
1020 { LEFT_BUTTON_RELEASED
, "Left button released"},
1021 { LEFT_BUTTON_DOUBLE_CLICK
, "Left button double click"},
1022 { RIGHT_BUTTON_PRESSED
, "Right button pressed"},
1023 { RIGHT_BUTTON_RELEASED
, "Right button released"},
1024 { RIGHT_BUTTON_DOUBLE_CLICK
, "Right button double click"},
1025 { MIDDLE_BUTTON_PRESSED
, "Middle button pressed"},
1026 { MIDDLE_BUTTON_RELEASED
, "Middle button released"},
1027 { MIDDLE_BUTTON_DOUBLE_CLICK
, "Middle button double click"},
1028 { SHIFTED_LEFT_BUTTON_PRESSED
, "Shifted left button pressed"},
1029 { SHIFTED_LEFT_BUTTON_RELEASED
, "Shifted left button released"},
1030 { SHIFTED_LEFT_BUTTON_DOUBLE_CLICK
, "Shifted left button double click"},
1031 { SHIFTED_RIGHT_BUTTON_PRESSED
, "Shifted right button pressed"},
1032 { SHIFTED_RIGHT_BUTTON_RELEASED
, "Shifted right button released"},
1033 { SHIFTED_RIGHT_BUTTON_DOUBLE_CLICK
, "Shifted right button double click"},
1034 { SHIFTED_MIDDLE_BUTTON_PRESSED
, "Shifted middle button pressed"},
1035 { SHIFTED_MIDDLE_BUTTON_RELEASED
, "Shifted middle button released"},
1036 { SHIFTED_MIDDLE_BUTTON_DOUBLE_CLICK
, "Shifted middle button double click"},
1040 /* 15.7 Draw/Erase Grid Lines Structured Field */
1041 static const struct true_false_string tn5250_field_wdsf_deg_flag1_0
= {
1042 "On: Clear the grid line buffer specified by the partition byte",
1043 "Off: Do not clear the grid line buffer specified by the partition byte"
1046 #define SOLID_LINE 0x00
1047 #define THICK_SOLID_LINE_BOLD 0x01
1048 #define DOUBLE_LINE 0x02
1049 #define DOTTED_LINE 0x03
1050 #define DASHED_LINE 0x08
1051 #define THICK_DASHED_LINE_BOLD 0x09
1052 #define DOUBLE_DASHED_LINE 0x0A
1053 #define USE_DEFAULT_LINE_FOR_THE_DISPLAY 0xFF
1055 static const value_string vals_tn5250_deg_lines
[] = {
1056 { SOLID_LINE
, "Solid line"},
1057 { THICK_SOLID_LINE_BOLD
, "Thick solid line (bold)"},
1058 { DOUBLE_LINE
, "Double line"},
1059 { DOTTED_LINE
, "Dotted line"},
1060 { DASHED_LINE
, "Dashed line"},
1061 { THICK_DASHED_LINE_BOLD
, "Thick dashed line (bold)"},
1062 { DOUBLE_DASHED_LINE
, "Double dashed line"},
1063 { USE_DEFAULT_LINE_FOR_THE_DISPLAY
, "Use default line for the display."},
1067 /* 15.7.1 Draw/Erase Grid Lines Structured Field - Minor Structure*/
1068 #define UPPER_HORIZONTAL_LINE 0x00
1069 #define LOWER_HORIZONTAL_LINE 0x01
1070 #define LEFT_VERTICAL_LINE 0x02
1071 #define RIGHT_VERTICAL_LINE 0x03
1072 #define PLAIN_BOX 0x04
1073 #define HORIZONTALLY_RULED_BOX 0x05
1074 #define VERTICALLY_RULED_BOX 0x06
1075 #define HORIZONTALLY_AND_VERTICALLY_RULED_BOX 0x07
1077 static const value_string vals_tn5250_wdsf_deg_minor_type
[] = {
1078 { UPPER_HORIZONTAL_LINE
, "Upper horizontal line"},
1079 { LOWER_HORIZONTAL_LINE
, "Lower horizontal line"},
1080 { LEFT_VERTICAL_LINE
, "Left vertical line"},
1081 { RIGHT_VERTICAL_LINE
, "Right vertical line"},
1082 { PLAIN_BOX
, "Plain box"},
1083 { HORIZONTALLY_RULED_BOX
, "Horizontally ruled box"},
1084 { VERTICALLY_RULED_BOX
, "Vertically ruled box"},
1085 { HORIZONTALLY_AND_VERTICALLY_RULED_BOX
, "Horizontally and vertically ruled box"},
1089 static const struct true_false_string tn5250_field_wdsf_deg_ms_flag1_0
= {
1090 "Erase the construct specified",
1091 "Draw the construct specified"
1094 /* 15.22 SAVE PARTIAL SCREEN Command */
1095 static const struct true_false_string tn5250_field_sps_flag1_0
= {
1096 "Do not include image/fax information",
1097 "Include image/fax information if image/fax data is on the 5250 session"
1100 /* 15.25 ROLL Command */
1101 static const struct true_false_string tn5250_field_roll_flag1_0
= {
1106 /* 15.26.1 WRITE SINGLE STRUCTURED FIELD Command - 5250 WSC CUSTOMIZATION Command*/
1107 #define KEYSTROKE_BUFFERING_CONTROL 0x01
1108 #define CURSOR_CONTROL 0x02
1110 static const value_string vals_tn5250_wssf_minor_type
[] = {
1111 { KEYSTROKE_BUFFERING_CONTROL
, "Keystroke Buffering Control"},
1112 { CURSOR_CONTROL
, "Cursor Control"},
1116 #define WSC_MINOR_STRUCTURE_LENGTH 0x03
1118 static const struct true_false_string tn5250_field_wssf_flag2_0
= {
1120 "WARNING: Reserved, but set."
1123 static const struct true_false_string tn5250_field_wssf_flag2_1
= {
1124 "Set enhanced field exit required mode",
1125 "Do not set enhanced field exit required mode"
1128 static const struct true_false_string tn5250_field_wssf_flag2_2
= {
1129 "Resets enhanced field exit required mode",
1130 "Do not reset enhanced field exit required mode"
1133 static const struct true_false_string tn5250_field_wssf_flag2_3
= {
1134 "Set System/36* mode of operation",
1135 "Do not set System/36* mode of operation"
1138 static const struct true_false_string tn5250_field_wssf_flag2_4
= {
1139 "Reset System/36* mode of operation",
1140 "Do not reset System/36* mode of operation"
1143 static const struct true_false_string tn5250_field_wssf_flag2_5
= {
1144 "Set SBA code to X'04' in data returned for READ commands",
1145 "Do not set SBA code to X'04' in data returned for READ commands"
1148 static const struct true_false_string tn5250_field_wssf_flag2_6
= {
1149 "Set SBA code to X'11' in data returned for READ commands",
1150 "Do not set SBA code to X'11' in data returned for READ commands"
1153 static const struct true_false_string tn5250_field_wssf_flag2_7
= {
1154 "Customization applies to entire 5494",
1155 "Customization does not apply to entire 5494"
1158 /* 15.26.1 WRITE SINGLE STRUCTURED FIELD Command - 5250 WSC CUSTOMIZATION Command
1159 - Keystroke Buffering Control Minor Structure*/
1160 static const struct true_false_string tn5250_field_wssf_kbc_flag1_5
= {
1161 "Change type-ahead state",
1162 "Do not change type-ahead state"
1165 static const struct true_false_string tn5250_field_wssf_kbc_flag1_6
= {
1166 "Turn on type-ahead if bit is set to 1; ignored if bit 5 is set to 0",
1167 "Turn off type-ahead if bit 5 is set to 1; ignored if bit 5 is set to 0"
1170 static const struct true_false_string tn5250_field_wssf_kbc_flag1_7
= {
1171 "Attention key is buffered",
1172 "Attention key is not buffered"
1175 /* 15.26.1 WRITE SINGLE STRUCTURED FIELD Command - 5250 WSC CUSTOMIZATION Command
1176 - Cursor Control Minor Structure*/
1178 static const struct true_false_string tn5250_field_wssf_cc_flag1_7
= {
1179 "Cursor will blink",
1180 "Cursor will not blink"
1183 /* 15.26.2 WRITE SINGLE STRUCTURED FIELD Command - IMAGE/FAX CONTROL Command */
1185 static const struct true_false_string tn5250_field_wssf_ifc_flag1_0
= {
1186 "If the display supports a cache,this image/fax data remains in cache memory when the application "
1187 "sends one of the above commands to erase this image/fax data",
1188 "Erase this image/fax from memory whenever any of the following commands are received: CLEAR UNIT, CLEAR UNIT ALTERNATE "
1189 "(without saving image/fax), RESTORE RESTORE PARTIAL (if image/fax data was indicated in the SAVE PARTIAL), Another IMAGE/FAX CONTROL command"
1192 static const value_string tn5250_vals_tn5250_wssf_ifc_vals
[] = {
1193 { 0x00 , "Normal display (default)"},
1194 { 0x08 , "Transparent display (underlying text may be seen through the image/fax)"},
1195 { 0x04 , "Non-display (the image/fax data remains in memory until it is erased). All other parameters in this command are ignored."},
1196 { 0x02 , "Previously stored image/fax data is erased from the 5250 session and possibly from display memory "
1197 "(see bit 0 previously). All other parameters in this command are ignored."},
1201 static const struct true_false_string tn5250_field_wssf_ifc_flag1_4
= {
1202 "The display does not present scroll bars",
1203 "The display presents vertical and horizontal scroll bars as needed and allows the user to scroll without "
1204 "any interaction with the AS/400 application"
1207 static const struct true_false_string tn5250_field_wssf_ifc_flag1_5
= {
1208 "Image/fax is light foreground on dark background. Preserve the light foreground data during scaling",
1209 "Image/fax is dark foreground on light background. Preserve the dark foreground data during scaling"
1212 static const struct true_false_string tn5250_field_wssf_ifc_flag1_6
= {
1213 "Background and foreground colors are reversed",
1214 "Normal image/fax display"
1217 static const struct true_false_string tn5250_field_wssf_ifc_flag1_7
= {
1218 "Do not allow EasyScroll with the primary mouse button.",
1219 "Allow the primary mouse button to EasyScroll the image/fax"
1222 static const struct true_false_string tn5250_field_wssf_ifc_flag2_0
= {
1223 "For Group 3 or 4 fax, each scan line is duplicated. For high-resolution fax transmission, characters would otherwise appear flattened on the display screen",
1224 "Normal image/fax display"
1227 static const struct true_false_string tn5250_field_wssf_ifc_flag2_1
= {
1228 "Inhibit the secondary mouse button to Trim Magnify",
1229 "Allow the secondary mouse button to Trim Magnify the image/fax data"
1232 static const struct true_false_string tn5250_field_wssf_ifc_flag2_7
= {
1233 "True. Reserved for IBM image/fax-capable displays. It is used to download compression algorithms. Non-IBM displays should ignore this bit.",
1234 "False. Reserved for IBM image/fax-capable displays. It is used to download compression algorithms. Non-IBM displays should ignore this bit."
1237 static const value_string vals_tn5250_image_format
[] = {
1238 { 0x0000, "An unknown IBM-defined format."},
1239 { 0x0001, "IOCA (The IOCA header defines the compression algorithm.)"},
1240 { 0x0002, "TIFF (The TIFF header defines the compression algorithm.)"},
1242 { 0x0004, "Stand alone Group 3 Fax compression."},
1247 static const value_string vals_tn5250_wssf_ifc_scaling
[] = {
1248 { 0xFFFE, "No Scroll Bar Scaling. The data is scaled such that it fits within the Viewport without requiring scrolling in either direction."},
1249 { 0xFFFD, "Fill Scaling. The data is scaled such that it fits horizontally within the Viewport without requiring horizontal scroll bars."},
1250 { 0xFFEA, "Decrement Scaling Values."},
1251 { 0xFFDA, "Increment Scaling Values."},
1256 /* 15.26.3 WRITE SINGLE STRUCTURED FIELD Command - IMAGE/FAX DOWNLOAD Command */
1257 static const struct true_false_string tn5250_field_wssf_ifd_flag1_0
= {
1258 "This is the last or only IMAGE/FAX DOWNLOAD command for this image/fax",
1259 "Additional IMAGE/FAX DOWNLOAD commands follow, containing data for this image/fax"
1262 static const value_string vals_tn5250_image_fax_error
[] = {
1263 { 0x0001, "Image/fax data was too large. Only the first portion of the data is displayed."},
1264 { 0x0002, " Image/fax data was too large. The data was ignored."},
1265 { 0x0003, " Invalid major length in the IMAGE/FAX CONTROL command"},
1266 { 0x0004, " Invalid major length in the IMAGE/FAX DOWNLOAD command"},
1267 { 0x0005, " Error in the IMAGE/FAX CONTROL command"},
1268 { 0x0006, " Error in the IMAGE/FAX DOWNLOAD command"},
1269 { 0x0007, " Error detected in the image/fax data"},
1275 /* 15.26.4 WRITE SINGLE STRUCTURED FIELD Command - Video/Audio Controls Command Major Structure */
1277 static const range_string vals_tn5250_vac_data
[] = {
1278 { 0x13000001, 0x13000001, "Set View Mode to PIP"},
1279 { 0x13000000, 0x13000000, "Set View Mode to Off"},
1280 { 0x14000000, 0x14000000, "Turn Audio On"},
1281 { 0x14000001, 0x14000001, "Turn Audio Off"},
1282 { 0x0C000000, 0x0C000064, "Set PC/TV Volume"},
1283 /* N.B. Set PIP Location and Size was moved to last, to stop it
1284 * from hiding everything that follows it */
1285 { 0x1F000001, 0x1F000001, "Set PIP See Through On"},
1286 { 0x1F000000, 0x1F000000, "Set PIP SeeThrough Off"},
1287 { 0x20000001, 0x20000001, "Freeze PIP"},
1288 { 0x20000000, 0x20000000, "Resume After Freeze"},
1289 { 0x12000000, 0x12000064, "Set PC/TV Channel"},
1290 { 0x11000000, 0x11000000, "Set Antenna Tuner Source"},
1291 { 0x11000001, 0x11000001, "Set Cable Tuner Source"},
1292 { 0x21000001, 0x21000001, "Disable Internal Speaker"},
1293 { 0x21000000, 0x21000000, "Enable Internal Speaker"},
1294 { 0x17000001, 0x17000001, "Keyboard Disable"},
1295 { 0x17000000, 0x17000000, "Keyboard Enable"},
1296 { 0x0D000000, 0x0D000064, "Set PC/TV Brightness"},
1297 { 0x0F000000, 0x0F000064, "Set PC/TV Color"},
1298 { 0x0E000000, 0x0E000064, "Set PC/TV Contrast"},
1299 { 0x10000000, 0x10006464, "Set PC/TV Tint"},
1300 { 0x01010101, 0x1b841b84, "Set PIP Location and Size"}, /* Bytes are RRCCrrcc */
1304 /* Appendix B.1 WRITE SINGLE STRUCTURED FIELD Command - True Transparency Write Command Major Structure */
1305 static const value_string vals_tn5250_wssf_ttw_flag
[] = {
1307 { 0x01, "ASCII Data"},
1312 /* 15.27.3 WRITE STRUCTURED FIELD (WSF) Command - 5250 QUERY STATION STATE Command*/
1313 static const struct true_false_string tn5250_field_wsf_qss_flag1_0
= {
1314 "QUERY STATION STATE Command Response",
1315 "QUERY STATION STATE Command"
1318 static const struct true_false_string tn5250_field_wsf_qss_flag2_7
= {
1319 "Return all customization states",
1320 "Return Keystroke Buffering Control Minor Structure"
1323 /* 15.27.4.1 DEFINE AUDIT WINDOW TABLE Command */
1324 static const range_string vals_tn5250_dawt_id
[] = {
1325 { 0x00, 0x7F, "Indicates if update of primary audit window table is necessary. If this byte matches the ID of the existing primary audit window table, the rest of this command is discarded" },
1326 { 0x80, 0xFE, "Indicates if update of secondary audit window table is necessary. If this byte matches the ID of the existing secondary audit window table, the rest of this command is discarded" },
1327 { 0xFF, 0xFF, "Indicates the value of the ID bytes set by the 5494 when the table is built initially. If an ID value of X'FF' is received, both the primary and secondary tables are initially emptied" },
1331 static const range_string vals_tn5250_dawt_length
[] = {
1332 { 0x00, 0x01, "Length of Table Entry is Invalid (should between 2 and 22)" },
1333 { 0x02, 0x16, "Length of Table Entry" },
1334 { 0x17, 0xFF, "Length of Table Entry is Invalid (should between 2 and 22)" },
1338 /* 15.27.4.2 DEFINE COMMAND KEY FUNCTION Command */
1339 static const range_string vals_tn5250_dckf_id
[] = {
1340 { 0x00, 0x7F, "Indicates if update of primary command key function table is necessary. If this byte matches the ID of the existing primary command key function table, the rest of this command is discarded" },
1341 { 0x80, 0xFE, "Indicates if update of secondary command key function table is necessary. If this byte matches the ID of the existing secondary command key function table, the rest of this command is discarded" },
1342 { 0xFF, 0xFF, "Indicates the value of the ID bytes set by the 5494 when the table is built initially. If an ID value of X'FF' is received, both the primary and secondary tables are initially emptied" },
1346 static const range_string vals_tn5250_dckf_length
[] = {
1347 { 0x00, 0x02, "Length of Table Entry is Invalid (should between 3 and 82)" },
1348 { 0x03, 0x52, "Length of Table Entry" },
1349 { 0x53, 0xFF, "Length of Table Entry is Invalid (should between 3 and 82)" },
1353 static const range_string vals_tn5250_dckf_key_code
[] = {
1354 { 0x01, 0x18, "Command key number"},
1355 { 0xFB, 0xFB, "Symbols Support (Cmd + A) message"},
1356 { 0xFC, 0xFC, "Formatted text usage"},
1357 { 0xFD, 0xFD, "Stop code advance key"},
1358 { 0xFE, 0xFE, "Del key"},
1359 { 0xFF, 0xFF, "Home key"},
1363 static const value_string vals_tn5250_dckf_function_code
[] = {
1364 { 0x01, "Perform general prompt"},
1365 { 0x02, "Perform locate"},
1366 { 0x03, "Perform copy text"},
1367 { 0x04, "Perform move text"},
1368 { 0x05, "Perform delete text"},
1369 { 0x06, "Perform hyphenate text"},
1370 { 0x07, "Display AS/400 system-defined prompt line message"},
1374 /* 15.27.4.3 READ TEXT SCREEN Command */
1376 static const range_string vals_tn5250_rts_partition
[] = {
1377 { 0x00, 0x00, "Valid Partition ID" },
1378 { 0x01, 0xFF, "Invalid Partition ID" },
1382 static const struct true_false_string tn5250_field_rts_flag1_0
= {
1383 "The data field is in IBM 5250 line format.The structured field command form is used. Command pending format is used. No pending data is included with the command.",
1384 "WARNING: Invalid Value"
1389 /* 15.27.4.4 DEFINE PENDING OPERATIONS Command */
1391 static const struct true_false_string tn5250_field_dpo_flag1_0
= {
1392 "Insert mode enabled",
1393 "Insert mode not enabled"
1396 static const struct true_false_string tn5250_field_dpo_flag1_1
= {
1397 "Locate mode enabled",
1398 "Locate mode not enabled"
1401 static const struct true_false_string tn5250_field_dpo_flag1_2
= {
1402 "AS/400 system controls text delete",
1403 "AS/400 system does not control text delete"
1406 static const struct true_false_string tn5250_field_dpo_flag1_3
= {
1407 "5494 responds to the Error Reset key by locking the workstation keyboard and sending an X'4E' AID request to the AS/400 system",
1408 "5494 does not respond to the Error Reset key by locking the workstation keyboard and sending an X'4E' AID request to the AS/400 system"
1411 static const struct true_false_string tn5250_field_dpo_flag1_4
= {
1412 "5494 must notify the AS/400 system on completion of a copy, move, or delete operation",
1413 "5494 does not need to notify the AS/400 system on completion of a copy, move, or delete operation"
1416 static const struct true_false_string tn5250_field_dpo_flag1_5
= {
1417 "AS/400 system assisted locate function enabled",
1418 "AS/400 system assisted locate function not enabled"
1421 static const struct true_false_string tn5250_field_dpo_flag1_6
= {
1422 "Tab function independent of shift status",
1423 "Tab function not independent of shift status"
1426 static const struct true_false_string tn5250_field_dpo_flag1_7
= {
1427 "Insert mode is reset by Error Reset key",
1428 "Insert mode is toggled by the Insert key"
1431 static const struct true_false_string tn5250_field_dpo_flag2_0
= {
1432 "Copy, move, or delete is pending",
1433 "Copy, move, or delete is not pending"
1437 /* 15.27.4.5 DEFINE TEXT SCREEN FORMAT Command */
1438 static const struct true_false_string tn5250_field_dtsf_flag1_0
= {
1439 "Column edit active",
1440 "Column edit is not active"
1443 static const struct true_false_string tn5250_field_dtsf_flag1_1
= {
1444 "Data exists outside left margin",
1445 "No data outside left margin"
1448 static const struct true_false_string tn5250_field_dtsf_flag1_2
= {
1449 "Data exists outside right margin",
1450 "No data outside right margin"
1453 static const struct true_false_string tn5250_field_dtsf_flag1_3
= {
1454 "Cursor-sensitive scrolling active",
1455 "No cursor-sensitive scrolling active"
1458 static const struct true_false_string tn5250_field_dtsf_flag1_4
= {
1459 "Fake DP mode active",
1460 "No fake DP mode active"
1463 static const struct true_false_string tn5250_field_dtsf_flag1_5
= {
1464 "Do not clear screen",
1465 "Clear screen as normal"
1468 static const struct true_false_string tn5250_field_dtsf_flag1_6
= {
1469 "Document orientation is right to left",
1470 "Document orientation is left to right"
1473 static const struct true_false_string tn5250_field_dtsf_flag1_7
= {
1474 "Host does not have BIDI support.",
1475 "Host has bi-directional (BIDI) support"
1479 static const struct true_false_string tn5250_field_dtsf_flag2_0
= {
1480 "Data stream from AS/400 system.",
1481 "Data stream from S/36 system."
1484 static const struct true_false_string tn5250_field_dtsf_flag2_1
= {
1485 "The screen data does have extended attributes.",
1486 "The screen data in READ and WRITE commands does not have extended attributes."
1489 static const struct true_false_string tn5250_field_dtsf_flag2_2
= {
1490 "WordPerfect/400* edit session",
1491 "OfficeVision/400* edit session"
1494 static const struct true_false_string tn5250_field_dtsf_flag2_3
= {
1495 "Secondary language tables should be used.",
1496 "Primary language tables should be used."
1499 static const range_string vals_tn5250_dtsf_flag2_vals
[] = {
1500 { 0x0, 0x7, "Reserved"},
1501 { 0x8, 0x8, "System Version 2 Release 2.0"},
1502 { 0x9, 0x9, "System Version 2 Release 3.0"},
1503 { 0xA, 0xA, "System Version 3 Release 0.5"},
1504 { 0xB, 0xB, "System Version 3 Release 1.0"},
1505 { 0xC, 0xF, "Reserved"},
1509 /* 15.27.4.6 DEFINE SCALE LINE Command */
1510 static const struct true_false_string tn5250_field_dsl_flag1_0
= {
1511 "Suppress display of the right margin symbol",
1512 "Do not suppress display of the right margin symbol"
1515 static const struct true_false_string tn5250_field_dsl_flag1_1
= {
1516 "Suppress display of the left margin symbol",
1517 "Do not suppress display of the left margin symbol"
1520 static const struct true_false_string tn5250_field_dsl_flag1_2
= {
1521 "Indicate a tab stop located off the display if the absolute right margin is not defined",
1522 "Do not indicate a tab stop located off the display if the absolute right margin is not defined"
1525 static const range_string vals_tn5250_dsl_function
[] = {
1526 { 0x01, 0x01, "Left margin symbol"},
1527 { 0x02, 0x02, "Right margin symbol"},
1528 { 0x03, 0x03, "Left tab symbol"},
1529 { 0x04, 0x04, "Right tab symbol"},
1530 { 0x05, 0x05, "Center tab symbol"},
1531 { 0x06, 0x06, "Decimal align tab symbol"},
1532 { 0x07, 0x07, "Comma align tab symbol"},
1533 { 0x08, 0x08, "Colon align tab symbol"},
1534 { 0x09, 0x09, "Inactive tab stop symbol"},
1535 { 0x0A, 0x0A, "Center of margins symbol"},
1536 { 0x0B, 0x0B, "Paper edge symbol"},
1537 { 0x0C, 0x0C, "Pitch symbol"},
1538 { 0x0D, 0xFF, "Reserved."},
1543 /* 15.27.4.7 WRITE TEXT SCREEN Command */
1544 static const struct true_false_string tn5250_field_wts_flag1_0
= {
1546 "3270 format (not supported on 5494)."
1549 static const struct true_false_string tn5250_field_wts_flag1_1
= {
1550 "First line in body is an odd number of half-spacing units.",
1551 "First line in body is an even number of half-spacing units."
1554 static const struct true_false_string tn5250_field_wts_flag1_2
= {
1555 "Cursor is on a line of formatted text. The 5494 displays text message defined in the Define Command Key table.",
1556 "Cursor is not on a line that contains formatted text. No function is performed."
1559 static const struct true_false_string tn5250_field_wts_flag1_3
= {
1560 "Display the primary attribute at the cursor location.",
1561 "Do not display the primary attribute"
1564 static const struct true_false_string tn5250_field_wts_flag2_6
= {
1565 "Lock keyboard to inhibit data input before any lines are written to screen",
1566 "Do not lock keyboard to inhibit data input before any lines are written to screen"
1569 static const struct true_false_string tn5250_field_wts_flag3_0
= {
1571 "Reserved: should be 0!"
1574 static const struct true_false_string tn5250_field_wts_flag3_1
= {
1575 "Moves cursor to home position after write operation is completed",
1576 "Does not move cursor to home position after write operation is completed"
1579 static const struct true_false_string tn5250_field_wts_flag3_2
= {
1580 "Resets Cursor Blinking mode after write operation is completed",
1581 "Does not reset Cursor Blinking mode after write operation is completed"
1584 static const struct true_false_string tn5250_field_wts_flag3_3
= {
1585 "Sets Cursor Blinking mode after write operation is completed",
1586 "Does not set Cursor Blinking mode after write operation is completed"
1589 static const struct true_false_string tn5250_field_wts_flag3_4
= {
1590 "Resets keyboard locking function after write operation is completed",
1591 "Does not reset keyboard locking function after write operation is completed"
1594 static const struct true_false_string tn5250_field_wts_flag3_5
= {
1595 "Enables audible alarm after write operation is completed",
1596 "Does not enable audible alarm after write operation is completed"
1599 static const struct true_false_string tn5250_field_wts_flag3_6
= {
1600 "Resets Message Waiting indicator after write operation is completed",
1601 "Does not reset Message Waiting indicator after write operation is completed"
1604 static const struct true_false_string tn5250_field_wts_flag3_7
= {
1605 "Sets Message Waiting indicator after write operation is completed",
1606 "Does not set Message Waiting indicator after write operation is completed"
1609 /* Structure of the WRITE TEXT SCREEN Command Line Data */
1610 static const struct true_false_string tn5250_field_wts_cld_flag1_0
= {
1611 "Writes nulls to the line before writing data",
1612 "Does not write nulls to the line before writing data"
1615 static const struct true_false_string tn5250_field_wts_cld_flag1_1
= {
1616 "Inhibits changes to text on this line",
1617 "Does not inhibit changes to text on this line"
1620 static const struct true_false_string tn5250_field_wts_cld_flag1_2
= {
1621 "Inhibits all input functions on this line",
1622 "Does not inhibit all input functions on this line"
1625 static const struct true_false_string tn5250_field_wts_cld_flag1_3
= {
1626 "Indicates that this line has been modified by the operator",
1627 "Indicates that this line has not been modified by the operator"
1630 static const struct true_false_string tn5250_field_wts_cld_flag1_4
= {
1631 "Indicates that the text body has been modified",
1632 "Indicates that the text body has not been modified"
1635 static const struct true_false_string tn5250_field_wts_cld_flag1_5
= {
1636 "Inhibits the word spill function on this line",
1637 "Does not inhibit the word spill function on this line"
1640 static const struct true_false_string tn5250_field_wts_cld_flag1_6
= {
1641 "Spills the last word on this line to the next line",
1642 "Does not spill the last word on this line to the next line"
1645 static const struct true_false_string tn5250_field_wts_cld_flag1_7
= {
1646 "Invalid Use of Reserved Field",
1650 static const struct true_false_string tn5250_field_wts_cld_flag2_0
= {
1651 "Indicates that this row contains formatted text",
1652 "Indicates that this row does not contain formatted text"
1655 static const struct true_false_string tn5250_field_wts_cld_flag2_1
= {
1656 "Indicates that a required tab character exists left of absolute left margin",
1657 "Indicates that a required tab character does not exist left of absolute left margin"
1660 static const struct true_false_string tn5250_field_wts_cld_flag2_2
= {
1661 "Indicates that a tab character exists left of absolute left margin",
1662 "Indicates that a tab character does not exist left of absolute left margin"
1665 static const struct true_false_string tn5250_field_wts_cld_flag2_3
= {
1666 "Indicates that a required tab character exists right of absolute right margin",
1667 "Indicates that a required tab character does not exist right of absolute right margin"
1670 static const struct true_false_string tn5250_field_wts_cld_flag2_4
= {
1671 "Indicates that a tab character exists right of absolute right margin",
1672 "Indicates that a tab character does not exist right of absolute right margin"
1675 static const struct true_false_string tn5250_field_wts_cld_flag3_0
= {
1676 "Indicates that line orientation is right to left",
1677 "Indicates that line orientation is not right to left"
1680 static const struct true_false_string tn5250_field_wts_cld_flag3_1
= {
1681 "Indicates that 'begin reverse' exists to the left of left margin",
1682 "Indicates that 'begin reverse' is not to the left of left margin"
1685 static const struct true_false_string tn5250_field_wts_cld_flag3_2
= {
1686 "Indicates that 'end reverse' exists to the right of right margin",
1687 "Indicates that 'end reverse' is not to the right of right margin"
1690 static const struct true_false_string tn5250_field_wts_cld_flag3_3
= {
1691 "Invalid Use of Reserved Field",
1695 static const struct true_false_string tn5250_field_wts_cld_flag3_4
= {
1696 "Indicates that a primary attribute exists on the line",
1697 "Indicates that a primary attribute does not exist on the line"
1700 static const struct true_false_string tn5250_field_wts_cld_flag3_5
= {
1701 "Indicates that an end attribute exists one position to the right of right margin",
1702 "Indicates that an end attribute does not exist one position to the right of right margin"
1705 static const struct true_false_string tn5250_field_wts_cld_flag3_6
= {
1706 "Indicates that one or more word underscore control characters (X'1D') exist on the line",
1707 "Indicates that one or more word underscore control characters (X'1D') do not exist on the line"
1710 static const struct true_false_string tn5250_field_wts_cld_flag3_7
= {
1711 "Indicates that one or more half index up or half index down text attributes exist on the line",
1712 "Indicates that one or more half index up or half index down text attributes do not exist on the line"
1715 /* 15.27.4.10 DEFINE OPERATOR ERROR MESSAGES Command */
1717 static const range_string vals_tn5250_dorm_id
[] = {
1718 { 0x00, 0x7F, "Indicates update of primary operator error message table is necessary."},
1719 { 0x80, 0xFE, "Indicates update of secondary operator error message table is necessary."},
1720 { 0xFF, 0xFF, "Indicates the value of the ID bytes set by the 5494 when the table is built initially."},
1724 static const range_string vals_tn5250_dorm_length
[] = {
1725 { 0x00, 0x02, "Length of Table Entry is Invalid (should between 3 and 82)" },
1726 { 0x03, 0x53, "Length of Table Entry" },
1727 { 0x54, 0xFF, "Length of Table Entry is Invalid (should between 3 and 82)" },
1731 /* 15.27.4.11 DEFINE PITCH TABLE Command */
1733 static const range_string vals_tn5250_dpt_id
[] = {
1734 { 0x00, 0x7F, "Indicates update of primary pitch table is necessary."},
1735 { 0x80, 0xFE, "Indicates update of secondary pitch table is necessary."},
1736 { 0xFF, 0xFF, "Indicates the value of the ID bytes set by the 5494 when the table is built initially."},
1740 /* 15.27.4.12 DEFINE FAKE DP COMMAND KEY FUNCTION Command */
1741 #define TOP_ROW_COMMAND_KEYS 0x40
1742 #define CORE_AREA_COMMAND_KEYS 0x80
1744 static const range_string vals_tn5250_dfdpck_data_field
[] = {
1745 { 0x00, 0x3f, "Invalid Data Field Type"},
1746 { 0x40, 0x40, "Top Row Command Key Functions"},
1747 { 0x41, 0x79, "Invalid Data Field Type"},
1748 { 0x80, 0x80, "Core Area Key Command Functions"},
1749 { 0x81, 0xFF, "Invalid Data Field Type"},
1753 /* Structure of the DEFINE FAKE DP COMMAND KEY FUNCTION Core Area Command Keys */
1755 static const struct true_false_string tn5250_field_dfdpck_coreflag_0
= {
1756 "Typing Cmd u (begin underscore) causes the operator error '77'.",
1760 static const struct true_false_string tn5250_field_dfdpck_coreflag_1
= {
1761 "Typing Cmd j (end attribute) causes the operator error '77'.",
1765 static const struct true_false_string tn5250_field_dfdpck_coreflag_2
= {
1766 "Typing Cmd b (begin bold) causes the operator error '77'.",
1770 static const struct true_false_string tn5250_field_dfdpck_coreflag_3
= {
1771 "Typing Cmd w (word underscore) causes the operator error '77'.",
1775 static const struct true_false_string tn5250_field_dfdpck_coreflag_4
= {
1776 "Typing Cmd y (half-index-up) causes the operator error '77'.",
1780 static const struct true_false_string tn5250_field_dfdpck_coreflag_5
= {
1781 "Typing Cmd h (half-index-down) causes the operator error '77'.",
1785 static const struct true_false_string tn5250_field_dfdpck_coreflag_6
= {
1786 "Typing Cmd s (stop code) causes the operator error '77'.",
1790 static const struct true_false_string tn5250_field_dfdpck_coreflag_7
= {
1791 "Typing Cmd space (requiredspace) causes the operator error '77'.",
1795 /* Structure of the DEFINE FAKE DP COMMAND KEY FUNCTION Top Row Command Keys */
1796 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_0
= {
1797 "Typing PFA1 causes the operator error '77'.",
1801 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_1
= {
1802 "Typing PFA2 causes the operator error '77'.",
1806 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_2
= {
1807 "Typing PFA3 causes the operator error '77'.",
1811 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_3
= {
1812 "Typing PFA4 causes the operator error '77'.",
1816 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_4
= {
1817 "Typing PFA5 causes the operator error '77'.",
1821 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_5
= {
1822 "Typing PFA6 causes the operator error '77'.",
1826 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_6
= {
1827 "Typing PFA7 causes the operator error '77'.",
1831 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_7
= {
1832 "Typing PFA8 causes the operator error '77'.",
1836 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_0
= {
1837 "Typing PFA9 causes the operator error '77'.",
1841 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_1
= {
1842 "Typing PFA10 causes the operator error '77'.",
1846 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_2
= {
1847 "Typing PFA11 causes the operator error '77'.",
1851 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_3
= {
1852 "Typing PFA12 causes the operator error '77'.",
1856 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_4
= {
1857 "Typing PFA13 causes the operator error '77'.",
1861 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_5
= {
1862 "Typing PFA14 causes the operator error '77'.",
1866 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_6
= {
1867 "Typing PFA15 causes the operator error '77'.",
1871 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_7
= {
1872 "Typing PFA16 causes the operator error '77'.",
1876 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_0
= {
1877 "Typing PFA17 causes the operator error '77'.",
1881 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_1
= {
1882 "Typing PFA18 causes the operator error '77'.",
1886 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_2
= {
1887 "Typing PFA19 causes the operator error '77'.",
1891 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_3
= {
1892 "Typing PFA20 causes the operator error '77'.",
1896 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_4
= {
1897 "Typing PFA21 causes the operator error '77'.",
1901 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_5
= {
1902 "Typing PFA22 causes the operator error '77'.",
1906 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_6
= {
1907 "Typing PFA23 causes the operator error '77'.",
1911 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_7
= {
1912 "Typing PFA24 causes the operator error '77'.",
1916 /* 16.2.1 - AID Codes */
1917 #define AID_CLEAR 0xBD
1918 #define AID_ENTER_OR_RECORD_ADV 0xF1
1919 #define AID_HELP 0xF3
1920 #define AID_ROLL_DOWN 0xF4
1921 #define AID_ROLL_UP 0xF5
1922 #define AID_ROLL_LEFT 0xD9
1923 #define AID_ROLL_RIGHT 0xDA
1924 #define AID_PRINT 0xF6
1925 #define AID_RECORD_BACKSPACE 0xF8
1926 #define AID_SLP_AUTO_ENTER 0x3F
1927 #define AID_FORWARD_EDGE_TRIGGER_AUTO__ENTER 0x50
1928 #define AID_PA1 0x6C
1929 #define AID_PA2 0x6E
1930 #define AID_PA3 0x6B
1931 #define AID_CMD_01 0x31
1932 #define AID_CMD_02 0x32
1933 #define AID_CMD_03 0x33
1934 #define AID_CMD_04 0x34
1935 #define AID_CMD_05 0x35
1936 #define AID_CMD_06 0x36
1937 #define AID_CMD_07 0x37
1938 #define AID_CMD_08 0x38
1939 #define AID_CMD_09 0x39
1940 #define AID_CMD_10 0x3A
1941 #define AID_CMD_11 0x3B
1942 #define AID_CMD_12 0x3C
1943 #define AID_CMD_13 0xB1
1944 #define AID_CMD_14 0xB2
1945 #define AID_CMD_15 0xB3
1946 #define AID_CMD_16 0xB4
1947 #define AID_CMD_17 0xB5
1948 #define AID_CMD_18 0xB6
1949 #define AID_CMD_19 0xB7
1950 #define AID_CMD_20 0xB8
1951 #define AID_CMD_21 0xB9
1952 #define AID_CMD_22 0xBA
1953 #define AID_CMD_23 0xBB
1954 #define AID_CMD_24 0xBC
1955 #define AID_INBOUND_WRITE_STRUCTURED_FIELD 0x88
1956 #define AID_PASS_THROUGH_RESPONSE 0xFF
1957 #define AID_IMAGE_FAX_REQUEST 0x81
1958 #define AID_UNKNOWN_IMAGE_FAX_FORMAT 0x82
1959 #define AID_IMAGE_FAX_ERROR 0x83
1961 static const range_string vals_tn5250_attention_identification_bytes
[] = {
1962 { AID_CLEAR
, AID_CLEAR
, "Clear"},
1963 { AID_ENTER_OR_RECORD_ADV
, AID_ENTER_OR_RECORD_ADV
, "Enter or Record Adv"},
1964 { AID_HELP
, AID_HELP
, "Help"},
1965 { AID_ROLL_DOWN
, AID_ROLL_DOWN
, "Roll Down"},
1966 { AID_ROLL_UP
, AID_ROLL_UP
, "Roll Up"},
1967 { AID_ROLL_LEFT
, AID_ROLL_LEFT
, "Roll Left"},
1968 { AID_ROLL_RIGHT
, AID_ROLL_RIGHT
, "Roll Right"},
1969 { AID_PRINT
, AID_PRINT
, "Print"},
1970 { AID_RECORD_BACKSPACE
, AID_RECORD_BACKSPACE
, "Record Backspace"},
1971 { AID_SLP_AUTO_ENTER
, AID_SLP_AUTO_ENTER
, "SLP Auto Enter"},
1972 { AID_FORWARD_EDGE_TRIGGER_AUTO__ENTER
, AID_FORWARD_EDGE_TRIGGER_AUTO__ENTER
, "Forward Edge Trigger Auto Enter"},
1973 { AID_PA1
, AID_PA1
, "PA1"},
1974 { AID_PA2
, AID_PA2
, "PA2"},
1975 { AID_PA3
, AID_PA3
, "PA3"},
1976 { AID_CMD_01
, AID_CMD_01
, "Cmd 01"},
1977 { AID_CMD_02
, AID_CMD_02
, "Cmd 02"},
1978 { AID_CMD_03
, AID_CMD_03
, "Cmd 03"},
1979 { AID_CMD_04
, AID_CMD_04
, "Cmd 04"},
1980 { AID_CMD_05
, AID_CMD_05
, "Cmd 05"},
1981 { AID_CMD_06
, AID_CMD_06
, "Cmd 06"},
1982 { AID_CMD_07
, AID_CMD_07
, "Cmd 07"},
1983 { AID_CMD_08
, AID_CMD_08
, "Cmd 08"},
1984 { AID_CMD_09
, AID_CMD_09
, "Cmd 09"},
1985 { AID_CMD_10
, AID_CMD_10
, "Cmd 10"},
1986 { AID_CMD_11
, AID_CMD_11
, "Cmd 11"},
1987 { AID_CMD_12
, AID_CMD_12
, "Cmd 12"},
1988 { AID_CMD_13
, AID_CMD_13
, "Cmd 13"},
1989 { AID_CMD_14
, AID_CMD_14
, "Cmd 14"},
1990 { AID_CMD_15
, AID_CMD_15
, "Cmd 15"},
1991 { AID_CMD_16
, AID_CMD_16
, "Cmd 16"},
1992 { AID_CMD_17
, AID_CMD_17
, "Cmd 17"},
1993 { AID_CMD_18
, AID_CMD_18
, "Cmd 18"},
1994 { AID_CMD_19
, AID_CMD_19
, "Cmd 19"},
1995 { AID_CMD_20
, AID_CMD_20
, "Cmd 20"},
1996 { AID_CMD_21
, AID_CMD_21
, "Cmd 21"},
1997 { AID_CMD_22
, AID_CMD_22
, "Cmd 22"},
1998 { AID_CMD_23
, AID_CMD_23
, "Cmd 23"},
1999 { AID_CMD_24
, AID_CMD_24
, "Cmd 24"},
2000 { 0x70 , 0x7F , "Application Use"},
2001 { AID_INBOUND_WRITE_STRUCTURED_FIELD
, AID_INBOUND_WRITE_STRUCTURED_FIELD
, "AID Inbound Write Structured Field"},
2002 { AID_IMAGE_FAX_REQUEST
, AID_IMAGE_FAX_REQUEST
, "Image/Fax Request Aid"},
2003 { AID_UNKNOWN_IMAGE_FAX_FORMAT
, AID_UNKNOWN_IMAGE_FAX_FORMAT
, "Unknown Image/Fax Format Aid"},
2004 { AID_IMAGE_FAX_ERROR
, AID_IMAGE_FAX_ERROR
, "Image/Fax Error Reporting Aid"},
2009 /*TN5250 - RFC1205 - Query Reply Fields */
2010 static const struct true_false_string tn5250_field_qr_flag_0
= {
2015 static const value_string vals_tn5250_chc
[] = {
2016 { 0x0001, "Local Twinax Controller"},
2017 { 0x0061, "Local ASCII Controller"},
2018 { 0x0101, "SDLC/X.21/X.25 Twinax Controller (5394 emulating a 5294)"},
2019 { 0x0103, "SDLC/X.21/X.25 Twinax Controller (5394)"},
2020 { 0x0200, "PC DOS non-DBCS WSF"},
2021 { 0x0300, "OS/2 non-DBCS WSF"},
2022 { 0x0400, "PC DOS DBCS WSF"},
2023 { 0x0500, "OS/2 DBCS WSF"},
2024 { 0x0600, "Other WSF or any other 5250 Emulator"},
2028 static const value_string vals_tn5250_dt
[] = {
2029 { 0x01, "5250 Display or 5250 Emulation"},
2034 static const value_string vals_tn5250_qr_ki
[] = {
2035 { 0x02, "Standard Keyboard"},
2036 { 0x82, "G Keyboard"},
2040 static const struct true_false_string tn5250_field_qr_flag1_1
= {
2041 "Row 1/Col 1 support",
2042 "No Row 1/Col 1 support"
2045 static const struct true_false_string tn5250_field_qr_flag1_2
= {
2046 "Read MDT Alternate Command support",
2047 "No Read MDT Alternate Command support"
2050 static const struct true_false_string tn5250_field_qr_flag1_3
= {
2051 "Display does have PA1/PA2 support",
2052 "Display does not have PA1/PA2 support"
2055 static const struct true_false_string tn5250_field_qr_flag1_4
= {
2056 "Display does have PA3 support",
2057 "Display does not have PA3 support"
2060 static const struct true_false_string tn5250_field_qr_flag1_5
= {
2061 "Display does have Cursor Select support",
2062 "Display does not have Cursor Select support"
2065 static const struct true_false_string tn5250_field_qr_flag1_6
= {
2066 "Display does have Move Cursor Order support",
2067 "Display does not have Move Cursor Order support"
2070 static const struct true_false_string tn5250_field_qr_flag1_7
= {
2071 "Read MDT Immediate Alt Command support",
2072 "No Read MDT Immediate Alt Command support"
2075 static const value_string vals_tn5250_qr_flag2_0to3
[] = {
2076 { 0x1, "24 x 80 Screen Size"},
2077 { 0x3, "Capable of 24 x 80 and 27 x 132"},
2081 static const struct true_false_string tn5250_field_qr_flag2_4
= {
2082 "Light pen support",
2083 "No Light pen support"
2086 static const struct true_false_string tn5250_field_qr_flag2_5
= {
2087 "Mag Stripe Reader support",
2088 "No Mag Stripe Reader support"
2091 static const value_string vals_tn5250_qr_flag2_6to7
[] = {
2092 { 0x00, "Mono display"},
2093 { 0x01, "5292/3179 style color, including color PCs"},
2097 static const value_string vals_tn5250_qr_flag3
[] = {
2098 { 0x00, "No Double Byte Character Set (DBCS) capability"},
2099 { 0x20, "Presentation screen DBCS capability only"},
2103 static const value_string vals_tn5250_qr_flag4
[] = {
2104 { 0x00, "No graphics capability"},
2105 { 0x20, "5292-2 style graphics"},
2111 /* TN5250 Header - Data Type */
2112 #define TN5250_5250_DATA 0x00
2113 #define TN5250_BIND_IMAGE 0x03
2114 #define TN5250_NVT_DATA 0x05
2115 #define TN5250_REQUEST 0x06
2116 #define TN5250_RESPONSE 0x02
2117 #define TN5250_SCS_DATA 0x01
2118 #define TN5250_SSCP_LU_DATA 0x07
2119 #define TN5250_UNBIND 0x04
2121 static const value_string vals_tn5250_header_data_types
[] = {
2122 { TN5250_5250_DATA
, "5250_DATA"},
2123 { TN5250_BIND_IMAGE
, "BIND_IMAGE"},
2124 { TN5250_NVT_DATA
, "NVT_DATA"},
2125 { TN5250_REQUEST
, "REQUEST"},
2126 { TN5250_RESPONSE
, "RESPONSE"},
2127 { TN5250_SCS_DATA
, "SCS_DATA"},
2128 { TN5250_SSCP_LU_DATA
, "SSCP_LU_DATA"},
2129 { TN5250_UNBIND
, "UNBIND"},
2134 /* TN5250 Header - Record Type */
2137 static const value_string vals_tn5250_sna_record_type
[] = {
2138 { GDS
, "General Data Stream"},
2142 /* TN5250 Header - Operation Code */
2143 #define NO_OPERATION 0x00
2144 #define INVITE_OPERATION 0x01
2145 #define OUTPUT_ONLY 0x02
2146 #define PUT_GET_OPERATION 0x03
2147 #define SAVE_SCREEN_OPERATION 0x04
2148 #define RESTORE_SCREEN_OPERATION 0x05
2149 #define READ_IMMEDIATE_OPERATION 0x06
2150 #define RESERVED1 0x07
2151 #define READ_SCREEN_OPERATION 0x08
2152 #define RESERVED2 0x09
2153 #define CANCEL_INVITE_OPERATION 0x0A
2154 #define TURN_ON_MESSAGE_LIGHT 0x0B
2155 #define TURN_OFF_MESSAGE_LIGHT 0x0C
2157 static const value_string vals_tn5250_header_operation_code
[] = {
2158 { NO_OPERATION
, "No Operation"},
2159 { INVITE_OPERATION
, "Invite Operation"},
2160 { OUTPUT_ONLY
, "Output Only"},
2161 { PUT_GET_OPERATION
, "Put or Get Operation"},
2162 { SAVE_SCREEN_OPERATION
, "Save Screen Operation"},
2163 { RESTORE_SCREEN_OPERATION
, "Restore Screen Operation"},
2164 { READ_IMMEDIATE_OPERATION
, "Read Immediate Operation"},
2165 { RESERVED1
, "Reserved"},
2166 { READ_SCREEN_OPERATION
, "Read Screen Operation"},
2167 { RESERVED2
, "Reserved"},
2168 { CANCEL_INVITE_OPERATION
, "Cancel Invite Operation"},
2169 { TURN_ON_MESSAGE_LIGHT
, "Turn On Message Light"},
2170 { TURN_OFF_MESSAGE_LIGHT
, "Turn Off Message Light"},
2175 /* TN5250 Header _ Response Flags - Data Type Response */
2176 #define TN5250_POSITIVE_RESPONSE 0x00
2177 #define TN5250_NEGATIVE_RESPONSE 0x01
2179 static const value_string vals_tn5250_header_response_flags_response
[] = {
2180 { TN5250_POSITIVE_RESPONSE
, "POSITIVE-RESPONSE"},
2181 { TN5250_NEGATIVE_RESPONSE
, "NEGATIVE-RESPONSE"},
2187 static const value_string vals_tn5250_header_error_codes
[] = {
2188 { 0x0000, "Help key not allowed."},
2189 { 0x0001, "Keyboard overrun."},
2190 { 0x0002, "Incorrect scan code."},
2191 { 0x0003, "Command or PF key not valid."},
2192 { 0x0004, "Data not allowed in this field."},
2193 { 0x0005, "Cursor in protected area of display."},
2194 { 0x0006, "Key following Sys Req Key is not valid."},
2195 { 0x0007, "Mandatory entry field; you must enter data."},
2196 { 0x0008, "This field must have alphabetic characters."},
2197 { 0x0009, "This field must have numeric characters."},
2198 { 0x0010, "Only characters 0 through 9 allowed."},
2199 { 0x0011, "You tried to enter data into the last position of a signed numeric field."},
2200 { 0x0012, "Insert mode; no room to insert data."},
2201 { 0x0013, "Insert mode; only data keys permitted."},
2202 { 0x0014, "Must fill field to exit."},
2203 { 0x0015, "Modulo 10 or 11 check digit error. You entered data into a self-check field, and the number you entered and the check digit do not compare."},
2204 { 0x0016, "Field- not valid in this field."},
2205 { 0x0017, "Mandatory-fill field; key pressed is not valid."},
2206 { 0x0018, "Key used to exit this field not valid."},
2207 { 0x0019, "Dup or Field Mark not permitted in this field."},
2208 { 0x0020, "Function key not valid for right-adjust field."},
2209 { 0x0021, "Must enter data in mandatory entry field."},
2210 { 0x0022, "An AS/400 system error occurred. The status of the current field is not known. This error can occur during an insert or delete operation."},
2211 { 0x0023, "Hexadecimal mode; entry not valid."},
2212 { 0x0024, "Decimal field; entry not valid."},
2213 { 0x0026, "Field- entry not allowed."},
2214 { 0x0027, "Cannot use undefined key."},
2215 { 0x0029, "Diacritic character not valid."},
2216 { 0x0031, "Data buffer overflow."},
2217 { 0x0032, "MSR error."},
2218 { 0x0033, "MSR data not authorized."},
2219 { 0x0034, "Magnetic stripe reader (MSR) data exceeds length of field."},
2220 { 0x0035, "MSR error."},
2221 { 0x0036, "Cursor select not allowed in field exit required state."},
2222 { 0x0037, "You pressed Cursor Select in a non-selectable field."},
2223 { 0x0038, "Light pen and magnetic stripe reader (MSR) not allowed."},
2224 { 0x0040, "The modem or data circuit-terminating equipment (DCE) is not ready for one of the following reasons:"},
2225 { 0x0041, "X.25: Idle condition has been detected. The receive line was idle for 15 or more contiguous bit-times."},
2226 { 0x0042, "The receive clock signal is not being received from the modem or data circuit-terminating equipment (DCE)."},
2227 { 0x0043, "The 5494 attempted to disconnect from the line, but the data set ready (DSR) signal was not deactivated by the modem or DCE."},
2228 { 0x0044, "Switched lines: This error indicates that no valid data has been received for 30 seconds. The 5494 disconnected the line."},
2229 { 0x0045, "X.25: The data circuit-terminating equipment (DCE) will not activate. Either a Disconnect mode (DM) or a Disconnect (DISC) command was received during the link setup sequence."},
2230 { 0x0046, "X.25 or LAN: Frame reject received. The 5494 received a frame reject (FRMR) from the network, indicating that an error was detected in the last frame transmitted."},
2231 { 0x0047, "X.25 or LAN: An unexpected Disconnect mode (DM) or a Disconnect (DISC) command was received while in information transfer state."},
2232 { 0x0048, "X.25: An unexpected unnumbered acknowledgment (UA) frame was received."},
2233 { 0x0049, "LAN: A set asynchronous balance mode extended (SABME) was received while the 5494 was in information transfer state."},
2234 { 0x0050, "Error in ready-for-sending (RFS) signal, also known as the clear-to-send (CTS) signal, received from the modem or data circuit-terminating equipment (DCE). This error is posted when one of the following has occurred:"},
2235 { 0x0051, "The transmit clock from the modem or data circuit-terminating equipment (DCE) failed during a transmit operation."},
2236 { 0x0052, "The link adapter hardware failed to complete a transmit operation within 30 seconds, but no transmit clock or other modem or data circuit-terminating equipment (DCE) signal failure was detected."},
2237 { 0x0053, "X.25: The retry count has expired. No acknowledgment of a transmission was received within the allowed timeout. Timeout retry count (N2) and retry interval (T1) are specified in the 5494 configuration."},
2238 { 0x0054, "Frame reject (FRMR) sent. The 5494 sent a link-level FRMR response to the AS/400 system after receiving a data link control (DLC) or link access protocol balanced (LAPB) command that is not valid. Sense bytes S1, S2, and S3 preserve the contents of the FRMR I-field."},
2239 { 0x0055, "The 5494 ran a cable wrap test and determined that the communication cable is not attached to the 5494."},
2240 { 0x0056, "The link between the AS/400 system and the 5494 was lost. A bridge failure occurred, the AS/400 system has varied off line, or a node in an SNA Subarea network has failed."},
2241 { 0x0060, "Ideographic support SRC: You attempted to enter alphanumeric data into a field that accepts only double-byte data characters."},
2242 { 0x0061, "Ideographic support SRC: You attempted to enter a double-byte character into a field that accepts only alphanumeric data."},
2243 { 0x0062, "You attempted to change the data type, but the cursor is not in an open field or in the first position of an ideographic either field."},
2244 { 0x0063, "You entered an ideographic character that is not valid while operating in Alternate Entry mode."},
2245 { 0x0064, "You pressed a key that is not valid for the current keyboard mode."},
2246 { 0x0065, "The cursor is positioned in a column reserved for shift-out or shift-in characters."},
2247 { 0x0066, "Repeat key not valid. The cursor is positioned under a shift character or attribute character, or at the first valid entry character position of an input field. Only data characters can be repeated at these positions."},
2248 { 0x0067, "The workstation extension character RAM is full. Any additional extension characters display as special default characters."},
2249 { 0x0068, "The output data stream to the 5494 is not valid for extension characters. Any additional extension characters display as special default characters."},
2250 { 0x0069, "Ideographic support SRC: The output data stream to the 5494 contains extension characters that are not valid or are undefined. Any additional extension characters display as special default characters."},
2251 { 0x0070, "An error occurred during the word spill function or the carriage return function."},
2252 { 0x0071, "You attempted a start copy, move, or delete text operation while one of the previous operations was already in progress."},
2253 { 0x0072, "The key pressed is not valid when the cursor is in the current position."},
2254 { 0x0073, "An attempt was made to delete or replace an instruction or format change when the general prompt function was not active."},
2255 { 0x0074, "A key was pressed that is not valid when using the general prompt function."},
2256 { 0x0075, "The find function failed to find the keyed characters."},
2257 { 0x0076, "The insert function failed because the AS/400 system has not processed the text on the screen."},
2258 { 0x0077, "You either pressed a function key that is not valid at this time or tried to use a 5250 keyboard function while in word-processing mode."},
2259 { 0x0078, "The required scale line is not defined for your workstation. There is an error in the application program."},
2260 { 0x0081, "Too many workstations are attached to the 5494. The 5494 with LAN adapter installed allows a maximum of 80 devices."},
2261 { 0x0082, "Keyboard function is not valid within a selection field. These invalid functions include Dup, Erase EOF, and Field Mark."},
2262 { 0x0083, "A selection character is not valid. The numeric or mnemonic character you entered is not associated with any of the choices defined within the current selection field."},
2263 { 0x0084, "An attempt has been made to select an unavailable selection field."},
2264 { 0x0087, "X.25: A flow control entry error has occurred. The 5494 configuration settings for Flow Control Negotiation and Manual Options Allowed are not compatible. If the configuration setting for Flow Control Negotiation is permitted, then Manual Options must be allowed."},
2265 { 0x0089, "One or more fields required for the operation of the 5494 are blank. When you press Enter, the 5494 checks for blank fields and moves the cursor to the first blank."},
2266 { 0x008A, "One or more fields contain an embedded blank. When you press Enter, the 5494 checks for embedded blanks and moves the cursor to the first embedded blank."},
2267 { 0x008B, "Too many different keyboard codes have been used. A maximum of 4 different keyboard codes can be selected (the master country and 3 others)."},
2268 { 0x008D, "Printer port and station values are not valid. Valid ports for the Twinaxial Expansion Kit are 4-7. Valid stations are 0-7."},
2269 { 0x008E, "One or more fields contain an insufficient number of characters. The cursor is positioned in the field that contains an insufficient number of characters."},
2270 { 0x008F, "One or more fields contain a value that is outside the valid range. The cursor is placed under the first character of the field with a value that is out of range."},
2271 { 0x0091, "Reverse and Close keys are not supported in a Word Wrap entry field."},
2272 { 0x0092, "The reverse key is not supported on a display which is configured for shared addressing."},
2273 { 0x0097, "A test request function is not supported by the AS/400 system."},
2274 { 0x0098, "Undefined hardware error."},
2275 { 0x0099, "A key requiring AS/400 system action was pressed, but one of the following has occurred:"},
2276 { 0x009A, "An invalid password has been entered three times in an attempt to access concurrent diagnostics from a PWS."},
2277 { 0x0170, "A problem with an attached workstation has been detected. The workstation failed to detect the end of a printer definition table (PDT). Sense data is 00."},
2278 { 0x0172, "A problem with an attached workstation has been detected. The workstation detected invalid data in a printer definition table (PDT) sent to it from the AS/400 system. The sense data is 00ccxxyyyyyyyy, where cc is the command code of the definition containing invalid data, xx, is the offset from the command to invalid data in bytes, and yyyyyyyy is additional error data."},
2279 { 0x0173, "A problem with an attached workstation has been detected. The workstation received a printer definition table (PDT) that was larger than its maximum size. Sense data is 00xxxxyyyy, where xxxx is the workstation's maximum PDT size, and yyyy was the size of the PDT sent to the display by the AS/400 system."},
2280 { 0x0176, "A problem with an attached workstation has been detected. The workstation received a microcode correction file from the AS/400 system that was in error. The sense data defines the error as follows:"},
2281 { 0x0177, "A problem with an attached workstation has been detected. The workstation received a font file from the AS/400 system that was in error. Sense data defines the error as follows:"},
2285 static const range_string vals_tn5250_reserved
[] = {
2286 { 0x00, 0x00, "Reserved"},
2287 { 0x01, 0xFE, "Invalid Use of Reserved Field"},
2292 static int proto_tn5250
;
2293 static int hf_tn5250_aid
;
2294 static int hf_tn5250_attn_key
;
2295 static int hf_tn5250_attribute_type
;
2296 static int hf_tn5250_buffer_x
;
2297 static int hf_tn5250_buffer_y
;
2298 static int hf_tn5250_command_code
;
2299 static int hf_tn5250_ctp_lsid
;
2300 static int hf_tn5250_ctp_mlpp
;
2301 static int hf_tn5250_cua_parm
;
2302 static int hf_tn5250_dawt_char
;
2303 static int hf_tn5250_dawt_id
;
2304 static int hf_tn5250_dawt_length
;
2305 static int hf_tn5250_dawt_message
;
2306 static int hf_tn5250_dckf_function_code
;
2307 static int hf_tn5250_dckf_id
;
2308 static int hf_tn5250_dckf_key_code
;
2309 static int hf_tn5250_dckf_length
;
2310 static int hf_tn5250_dckf_prompt_text
;
2311 static int hf_tn5250_dfdpck_coreflag
;
2312 static int hf_tn5250_dfdpck_coreflag_0
;
2313 static int hf_tn5250_dfdpck_coreflag_1
;
2314 static int hf_tn5250_dfdpck_coreflag_2
;
2315 static int hf_tn5250_dfdpck_coreflag_3
;
2316 static int hf_tn5250_dfdpck_coreflag_4
;
2317 static int hf_tn5250_dfdpck_coreflag_5
;
2318 static int hf_tn5250_dfdpck_coreflag_6
;
2319 static int hf_tn5250_dfdpck_coreflag_7
;
2320 static int hf_tn5250_dfdpck_data_field
;
2321 static int hf_tn5250_dfdpck_partition
;
2322 static int hf_tn5250_dfdpck_toprowflag1
;
2323 static int hf_tn5250_dfdpck_toprowflag1_0
;
2324 static int hf_tn5250_dfdpck_toprowflag1_1
;
2325 static int hf_tn5250_dfdpck_toprowflag1_2
;
2326 static int hf_tn5250_dfdpck_toprowflag1_3
;
2327 static int hf_tn5250_dfdpck_toprowflag1_4
;
2328 static int hf_tn5250_dfdpck_toprowflag1_5
;
2329 static int hf_tn5250_dfdpck_toprowflag1_6
;
2330 static int hf_tn5250_dfdpck_toprowflag1_7
;
2331 static int hf_tn5250_dfdpck_toprowflag2
;
2332 static int hf_tn5250_dfdpck_toprowflag2_0
;
2333 static int hf_tn5250_dfdpck_toprowflag2_1
;
2334 static int hf_tn5250_dfdpck_toprowflag2_2
;
2335 static int hf_tn5250_dfdpck_toprowflag2_3
;
2336 static int hf_tn5250_dfdpck_toprowflag2_4
;
2337 static int hf_tn5250_dfdpck_toprowflag2_5
;
2338 static int hf_tn5250_dfdpck_toprowflag2_6
;
2339 static int hf_tn5250_dfdpck_toprowflag2_7
;
2340 static int hf_tn5250_dfdpck_toprowflag3
;
2341 static int hf_tn5250_dfdpck_toprowflag3_0
;
2342 static int hf_tn5250_dfdpck_toprowflag3_1
;
2343 static int hf_tn5250_dfdpck_toprowflag3_2
;
2344 static int hf_tn5250_dfdpck_toprowflag3_3
;
2345 static int hf_tn5250_dfdpck_toprowflag3_4
;
2346 static int hf_tn5250_dfdpck_toprowflag3_5
;
2347 static int hf_tn5250_dfdpck_toprowflag3_6
;
2348 static int hf_tn5250_dfdpck_toprowflag3_7
;
2349 static int hf_tn5250_dorm_ec
;
2350 static int hf_tn5250_dorm_id
;
2351 static int hf_tn5250_dorm_length
;
2352 static int hf_tn5250_dorm_mt
;
2353 static int hf_tn5250_dpo_displace_characters
;
2354 static int hf_tn5250_dpo_flag1
;
2355 static int hf_tn5250_dpo_flag1_0
;
2356 static int hf_tn5250_dpo_flag1_1
;
2357 static int hf_tn5250_dpo_flag1_2
;
2358 static int hf_tn5250_dpo_flag1_3
;
2359 static int hf_tn5250_dpo_flag1_4
;
2360 static int hf_tn5250_dpo_flag1_5
;
2361 static int hf_tn5250_dpo_flag1_6
;
2362 static int hf_tn5250_dpo_flag1_7
;
2363 static int hf_tn5250_dpo_flag2
;
2364 static int hf_tn5250_dpo_flag2_0
;
2365 static int hf_tn5250_dpo_flag2_reserved
;
2366 static int hf_tn5250_dpo_partition
;
2367 static int hf_tn5250_dpo_start_location_col
;
2368 static int hf_tn5250_dpo_start_location_row
;
2369 static int hf_tn5250_dpt_ec
;
2370 static int hf_tn5250_dpt_id
;
2371 static int hf_tn5250_ds_output_error
;
2372 static int hf_tn5250_dsc_ev
;
2373 static int hf_tn5250_dsc_partition
;
2374 static int hf_tn5250_dsc_sk
;
2375 static int hf_tn5250_dsl_flag1
;
2376 static int hf_tn5250_dsl_flag1_0
;
2377 static int hf_tn5250_dsl_flag1_1
;
2378 static int hf_tn5250_dsl_flag1_2
;
2379 static int hf_tn5250_dsl_flag1_reserved
;
2380 static int hf_tn5250_dsl_function
;
2381 static int hf_tn5250_dsl_id
;
2382 static int hf_tn5250_dsl_location
;
2383 static int hf_tn5250_dsl_offset
;
2384 static int hf_tn5250_dsl_partition
;
2385 static int hf_tn5250_dsl_rtl_offset
;
2386 static int hf_tn5250_dtsf_first_line
;
2387 static int hf_tn5250_dtsf_flag1
;
2388 static int hf_tn5250_dtsf_flag1_0
;
2389 static int hf_tn5250_dtsf_flag1_1
;
2390 static int hf_tn5250_dtsf_flag1_2
;
2391 static int hf_tn5250_dtsf_flag1_3
;
2392 static int hf_tn5250_dtsf_flag1_4
;
2393 static int hf_tn5250_dtsf_flag1_5
;
2394 static int hf_tn5250_dtsf_flag1_6
;
2395 static int hf_tn5250_dtsf_flag1_7
;
2396 static int hf_tn5250_dtsf_flag2
;
2397 static int hf_tn5250_dtsf_flag2_0
;
2398 static int hf_tn5250_dtsf_flag2_1
;
2399 static int hf_tn5250_dtsf_flag2_2
;
2400 static int hf_tn5250_dtsf_flag2_3
;
2401 static int hf_tn5250_dtsf_flag2_4to7
;
2402 static int hf_tn5250_dtsf_line_cmd_field_size
;
2403 static int hf_tn5250_dtsf_location_of_pitch
;
2404 static int hf_tn5250_dtsf_partition
;
2405 static int hf_tn5250_dtsf_text_body_height
;
2406 static int hf_tn5250_dtsf_text_body_width
;
2407 static int hf_tn5250_soh_err
;
2408 static int hf_tn5250_error_code
;
2409 static int hf_tn5250_error_state
;
2410 static int hf_tn5250_escape_code
;
2411 static int hf_tn5250_fa_color
;
2412 static int hf_tn5250_fcw
;
2413 static int hf_tn5250_ffw
;
2414 static int hf_tn5250_ffw_adjust
;
2415 static int hf_tn5250_ffw_auto
;
2416 static int hf_tn5250_ffw_bypass
;
2417 static int hf_tn5250_ffw_dup
;
2418 static int hf_tn5250_ffw_fer
;
2419 static int hf_tn5250_ffw_id
;
2420 static int hf_tn5250_ffw_mdt
;
2421 static int hf_tn5250_ffw_me
;
2422 static int hf_tn5250_ffw_monocase
;
2423 static int hf_tn5250_ffw_res
;
2424 static int hf_tn5250_ffw_shift
;
2425 static int hf_tn5250_field_data
;
2426 static int hf_tn5250_foreground_color_attr
;
2427 static int hf_tn5250_header_flags
;
2428 static int hf_tn5250_ideographic_attr
;
2429 static int hf_tn5250_length
;
2430 static int hf_tn5250_length_twobyte
;
2431 static int hf_tn5250_logical_record_length
;
2432 static int hf_tn5250_operation_code
;
2433 static int hf_tn5250_order_code
;
2434 static int hf_tn5250_repeated_character
;
2435 static int hf_tn5250_reserved
;
2436 static int hf_tn5250_roll_bottom_line
;
2437 static int hf_tn5250_roll_flag1
;
2438 static int hf_tn5250_roll_flag1_0
;
2439 static int hf_tn5250_roll_flag1_lines
;
2440 static int hf_tn5250_roll_flag1_reserved
;
2441 static int hf_tn5250_roll_top_line
;
2442 static int hf_tn5250_rts_flag1
;
2443 static int hf_tn5250_rts_flag1_0
;
2444 static int hf_tn5250_rts_flag1_reserved
;
2445 static int hf_tn5250_rts_partition
;
2446 static int hf_tn5250_sf_attr_flag
;
2447 static int hf_tn5250_sf_class
;
2448 static int hf_tn5250_fa
;
2449 static int hf_tn5250_sf_length
;
2450 static int hf_tn5250_sf_type
;
2451 static int hf_tn5250_sna_record_type
;
2452 static int hf_tn5250_soh_cursor_direction
;
2453 static int hf_tn5250_soh_flags
;
2454 static int hf_tn5250_soh_input_capable_only
;
2455 static int hf_tn5250_soh_pf1
;
2456 static int hf_tn5250_soh_pf10
;
2457 static int hf_tn5250_soh_pf11
;
2458 static int hf_tn5250_soh_pf12
;
2459 static int hf_tn5250_soh_pf13
;
2460 static int hf_tn5250_soh_pf14
;
2461 static int hf_tn5250_soh_pf15
;
2462 static int hf_tn5250_soh_pf16
;
2463 static int hf_tn5250_soh_pf16to9
;
2464 static int hf_tn5250_soh_pf17
;
2465 static int hf_tn5250_soh_pf18
;
2466 static int hf_tn5250_soh_pf19
;
2467 static int hf_tn5250_soh_pf2
;
2468 static int hf_tn5250_soh_pf20
;
2469 static int hf_tn5250_soh_pf21
;
2470 static int hf_tn5250_soh_pf22
;
2471 static int hf_tn5250_soh_pf23
;
2472 static int hf_tn5250_soh_pf24
;
2473 static int hf_tn5250_soh_pf24to17
;
2474 static int hf_tn5250_soh_pf3
;
2475 static int hf_tn5250_soh_pf4
;
2476 static int hf_tn5250_soh_pf5
;
2477 static int hf_tn5250_soh_pf6
;
2478 static int hf_tn5250_soh_pf7
;
2479 static int hf_tn5250_soh_pf8
;
2480 static int hf_tn5250_soh_pf8to1
;
2481 static int hf_tn5250_soh_pf9
;
2482 static int hf_tn5250_soh_resq
;
2483 static int hf_tn5250_soh_screen_reverse
;
2484 static int hf_tn5250_sps_flag1
;
2485 static int hf_tn5250_sps_flag1_0
;
2486 static int hf_tn5250_sps_flag1_reserved
;
2487 static int hf_tn5250_sps_left_column
;
2488 static int hf_tn5250_sps_top_row
;
2489 static int hf_tn5250_sps_window_depth
;
2490 static int hf_tn5250_sps_window_width
;
2491 static int hf_tn5250_sys_request_key
;
2492 static int hf_tn5250_test_request_key
;
2493 static int hf_tn5250_unknown_data
;
2494 static int hf_tn5250_variable_record_length
;
2495 static int hf_tn5250_wdsf_cw_bp_flag1_reserved
;
2496 static int hf_tn5250_wdsf_cw_tf_flag_reserved
;
2497 static int hf_tn5250_wdsf_deg_flag2_reserved
;
2498 static int hf_tn5250_wdsf_deg_ms_flag1_reserved
;
2499 static int hf_tn5250_wdsf_ds_ci_flag1_reserved
;
2500 static int hf_tn5250_wdsf_ds_cpda_flag1_reserved
;
2501 static int hf_tn5250_wdsf_ds_ct_flag3_reserved
;
2502 static int hf_tn5250_wdsf_ds_gdc_reserved
;
2503 static int hf_tn5250_wdsf_ds_nws_reserved
;
2504 static int hf_tn5250_wdsf_ds_sbi_flag1_reserved
;
2505 static int hf_tn5250_wdsf_dsb_flag1_reserved
;
2506 static int hf_tn5250_wdsf_pmb_flag1_reserved
;
2507 static int hf_tn5250_wdsf_wdf_flag1_reserved
;
2508 static int hf_tn5250_wdsf_cgl_partition
;
2509 static int hf_tn5250_wdsf_cgl_rectangle_height
;
2510 static int hf_tn5250_wdsf_cgl_rectangle_width
;
2511 static int hf_tn5250_wdsf_cgl_start_column
;
2512 static int hf_tn5250_wdsf_cgl_start_row
;
2513 static int hf_tn5250_wdsf_cw_bp_bbc
;
2514 static int hf_tn5250_wdsf_cw_bp_cba
;
2515 static int hf_tn5250_wdsf_cw_bp_flag1
;
2516 static int hf_tn5250_wdsf_cw_bp_flag1_1
;
2517 static int hf_tn5250_wdsf_cw_bp_lbc
;
2518 static int hf_tn5250_wdsf_cw_bp_llbc
;
2519 static int hf_tn5250_wdsf_cw_bp_lrbc
;
2520 static int hf_tn5250_wdsf_cw_bp_mba
;
2521 static int hf_tn5250_wdsf_cw_bp_rbc
;
2522 static int hf_tn5250_wdsf_cw_bp_tbc
;
2523 static int hf_tn5250_wdsf_cw_bp_ulbc
;
2524 static int hf_tn5250_wdsf_cw_bp_urbc
;
2525 static int hf_tn5250_wdsf_cw_flag1
;
2526 static int hf_tn5250_wdsf_cw_flag1_1
;
2527 static int hf_tn5250_wdsf_cw_flag1_2
;
2528 static int hf_tn5250_wdsf_cw_flag1_reserved
;
2529 static int hf_tn5250_wdsf_cw_minor_type
;
2530 static int hf_tn5250_wdsf_cw_tf_cba
;
2531 static int hf_tn5250_wdsf_cw_tf_flag
;
2532 static int hf_tn5250_wdsf_cw_tf_flag_1
;
2533 static int hf_tn5250_wdsf_cw_tf_flag_orientation
;
2534 static int hf_tn5250_wdsf_cw_tf_mba
;
2535 static int hf_tn5250_wdsf_cw_tf_text
;
2536 static int hf_tn5250_wdsf_cw_wd
;
2537 static int hf_tn5250_wdsf_cw_ww
;
2538 static int hf_tn5250_wdsf_deg_default_color
;
2539 static int hf_tn5250_wdsf_deg_default_line
;
2540 static int hf_tn5250_wdsf_deg_flag1
;
2541 static int hf_tn5250_wdsf_deg_flag1_0
;
2542 static int hf_tn5250_wdsf_deg_flag1_reserved
;
2543 static int hf_tn5250_wdsf_deg_flag2
;
2544 static int hf_tn5250_wdsf_deg_flag2_0
;
2545 static int hf_tn5250_wdsf_deg_minor_type
;
2546 static int hf_tn5250_wdsf_deg_ms_default_color
;
2547 static int hf_tn5250_wdsf_deg_ms_flag1
;
2548 static int hf_tn5250_wdsf_deg_ms_flag1_0
;
2549 static int hf_tn5250_wdsf_deg_ms_horizontal_dimension
;
2550 static int hf_tn5250_wdsf_deg_ms_line_interval
;
2551 static int hf_tn5250_wdsf_deg_ms_line_repeat
;
2552 static int hf_tn5250_wdsf_deg_ms_start_column
;
2553 static int hf_tn5250_wdsf_deg_ms_start_row
;
2554 static int hf_tn5250_wdsf_deg_ms_vertical_dimension
;
2555 static int hf_tn5250_wdsf_deg_partition
;
2556 static int hf_tn5250_wdsf_ds_cancel_aid
;
2557 static int hf_tn5250_wdsf_ds_ci_first_choice
;
2558 static int hf_tn5250_wdsf_ds_ci_flag1
;
2559 static int hf_tn5250_wdsf_ds_ci_flag1_0
;
2560 static int hf_tn5250_wdsf_ds_ci_left_push
;
2561 static int hf_tn5250_wdsf_ds_ci_right_push
;
2562 static int hf_tn5250_wdsf_ds_columns
;
2563 static int hf_tn5250_wdsf_ds_country_sel
;
2564 static int hf_tn5250_wdsf_ds_cpda_color_avail
;
2565 static int hf_tn5250_wdsf_ds_cpda_color_indicator
;
2566 static int hf_tn5250_wdsf_ds_cpda_color_sel_avail
;
2567 static int hf_tn5250_wdsf_ds_cpda_color_sel_selected
;
2568 static int hf_tn5250_wdsf_ds_cpda_color_sel_unavail
;
2569 static int hf_tn5250_wdsf_ds_cpda_color_selected
;
2570 static int hf_tn5250_wdsf_ds_cpda_color_unavail
;
2571 static int hf_tn5250_wdsf_ds_cpda_color_unavail_indicator
;
2572 static int hf_tn5250_wdsf_ds_cpda_flag1
;
2573 static int hf_tn5250_wdsf_ds_cpda_flag1_0
;
2574 static int hf_tn5250_wdsf_ds_cpda_flag1_1
;
2575 static int hf_tn5250_wdsf_ds_cpda_flag1_2
;
2576 static int hf_tn5250_wdsf_ds_cpda_monochrome_avail
;
2577 static int hf_tn5250_wdsf_ds_cpda_monochrome_indicator
;
2578 static int hf_tn5250_wdsf_ds_cpda_monochrome_sel_avail
;
2579 static int hf_tn5250_wdsf_ds_cpda_monochrome_sel_selected
;
2580 static int hf_tn5250_wdsf_ds_cpda_monochrome_sel_unavail
;
2581 static int hf_tn5250_wdsf_ds_cpda_monochrome_selected
;
2582 static int hf_tn5250_wdsf_ds_cpda_monochrome_unavail
;
2583 static int hf_tn5250_wdsf_ds_cpda_monochrome_unavail_indicator
;
2584 static int hf_tn5250_wdsf_ds_ct_aid
;
2585 static int hf_tn5250_wdsf_ds_ct_flag1
;
2586 static int hf_tn5250_wdsf_ds_ct_flag1_2
;
2587 static int hf_tn5250_wdsf_ds_ct_flag1_3
;
2588 static int hf_tn5250_wdsf_ds_ct_flag1_4
;
2589 static int hf_tn5250_wdsf_ds_ct_flag1_5
;
2590 static int hf_tn5250_wdsf_ds_ct_flag1_choice_state
;
2591 static int hf_tn5250_wdsf_ds_ct_flag1_numeric_selection
;
2592 static int hf_tn5250_wdsf_ds_ct_flag2
;
2593 static int hf_tn5250_wdsf_ds_ct_flag2_0
;
2594 static int hf_tn5250_wdsf_ds_ct_flag2_1
;
2595 static int hf_tn5250_wdsf_ds_ct_flag2_2
;
2596 static int hf_tn5250_wdsf_ds_ct_flag2_3
;
2597 static int hf_tn5250_wdsf_ds_ct_flag2_4
;
2598 static int hf_tn5250_wdsf_ds_ct_flag2_5
;
2599 static int hf_tn5250_wdsf_ds_ct_flag2_6
;
2600 static int hf_tn5250_wdsf_ds_ct_flag2_7
;
2601 static int hf_tn5250_wdsf_ds_ct_flag3
;
2602 static int hf_tn5250_wdsf_ds_ct_flag3_0
;
2603 static int hf_tn5250_wdsf_ds_ct_flag3_1
;
2604 static int hf_tn5250_wdsf_ds_ct_flag3_2
;
2605 static int hf_tn5250_wdsf_ds_ct_mnemonic_offset
;
2606 static int hf_tn5250_wdsf_ds_ct_numeric_onebyte
;
2607 static int hf_tn5250_wdsf_ds_ct_numeric_twobyte
;
2608 static int hf_tn5250_wdsf_ds_ct_text
;
2609 static int hf_tn5250_wdsf_ds_flag1
;
2610 static int hf_tn5250_wdsf_ds_flag1_1
;
2611 static int hf_tn5250_wdsf_ds_flag1_2
;
2612 static int hf_tn5250_wdsf_ds_flag1_auto_enter
;
2613 static int hf_tn5250_wdsf_ds_flag1_mouse_characteristics
;
2614 static int hf_tn5250_wdsf_ds_flag1_reserved
;
2615 static int hf_tn5250_wdsf_ds_flag2
;
2616 static int hf_tn5250_wdsf_ds_flag2_1
;
2617 static int hf_tn5250_wdsf_ds_flag2_2
;
2618 static int hf_tn5250_wdsf_ds_flag2_3
;
2619 static int hf_tn5250_wdsf_ds_flag2_4
;
2620 static int hf_tn5250_wdsf_ds_flag2_5
;
2621 static int hf_tn5250_wdsf_ds_flag2_6
;
2622 static int hf_tn5250_wdsf_ds_flag2_reserved
;
2623 static int hf_tn5250_wdsf_ds_flag3
;
2624 static int hf_tn5250_wdsf_ds_flag3_1
;
2625 static int hf_tn5250_wdsf_ds_flag3_reserved
;
2626 static int hf_tn5250_wdsf_ds_gdc
;
2627 static int hf_tn5250_wdsf_ds_gdc_indicators
;
2628 static int hf_tn5250_wdsf_ds_gdc_selection_techniques
;
2629 static int hf_tn5250_wdsf_ds_mbs_color_sep
;
2630 static int hf_tn5250_wdsf_ds_mbs_end_column
;
2631 static int hf_tn5250_wdsf_ds_mbs_flag
;
2632 static int hf_tn5250_wdsf_ds_mbs_flag_0
;
2633 static int hf_tn5250_wdsf_ds_mbs_flag_1
;
2634 static int hf_tn5250_wdsf_ds_mbs_flag_reserved
;
2635 static int hf_tn5250_wdsf_ds_mbs_monochrome_sep
;
2636 static int hf_tn5250_wdsf_ds_mbs_sep_char
;
2637 static int hf_tn5250_wdsf_ds_mbs_start_column
;
2638 static int hf_tn5250_wdsf_ds_minor_type
;
2639 static int hf_tn5250_wdsf_ds_numeric_sep
;
2640 static int hf_tn5250_wdsf_ds_nws
;
2641 static int hf_tn5250_wdsf_ds_nws_indicators
;
2642 static int hf_tn5250_wdsf_ds_nws_selection_techniques
;
2643 static int hf_tn5250_wdsf_ds_nws_wout
;
2644 static int hf_tn5250_wdsf_ds_padding
;
2645 static int hf_tn5250_wdsf_ds_rows
;
2646 static int hf_tn5250_wdsf_ds_sbi_bottom_character
;
2647 static int hf_tn5250_wdsf_ds_sbi_color_top_highlight
;
2648 static int hf_tn5250_wdsf_ds_sbi_color_top_highlight_shaft
;
2649 static int hf_tn5250_wdsf_ds_sbi_empty_character
;
2650 static int hf_tn5250_wdsf_ds_sbi_flag1
;
2651 static int hf_tn5250_wdsf_ds_sbi_flag1_0
;
2652 static int hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight
;
2653 static int hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight_shaft
;
2654 static int hf_tn5250_wdsf_ds_sbi_slider_character
;
2655 static int hf_tn5250_wdsf_ds_sbi_top_character
;
2656 static int hf_tn5250_wdsf_ds_sliderpos
;
2657 static int hf_tn5250_wdsf_ds_textsize
;
2658 static int hf_tn5250_wdsf_ds_totalrows
;
2659 static int hf_tn5250_wdsf_ds_type
;
2660 static int hf_tn5250_wdsf_dsb_flag1
;
2661 static int hf_tn5250_wdsf_dsb_flag1_0
;
2662 static int hf_tn5250_wdsf_dsb_flag1_1
;
2663 static int hf_tn5250_wdsf_dsb_flag1_7
;
2664 static int hf_tn5250_wdsf_pmb_first_mouse_event
;
2665 static int hf_tn5250_wdsf_pmb_flag1
;
2666 static int hf_tn5250_wdsf_pmb_flag1_0
;
2667 static int hf_tn5250_wdsf_pmb_flag1_1
;
2668 static int hf_tn5250_wdsf_pmb_flag1_2
;
2669 static int hf_tn5250_wdsf_pmb_flag1_3
;
2670 static int hf_tn5250_wdsf_pmb_second_mouse_event
;
2671 static int hf_tn5250_wdsf_ragc_flag1
;
2672 static int hf_tn5250_wdsf_ragc_flag1_0
;
2673 static int hf_tn5250_wdsf_ragc_reserved
;
2674 static int hf_tn5250_wdsf_rgw_flag1
;
2675 static int hf_tn5250_wdsf_rgw_flag1_0
;
2676 static int hf_tn5250_wdsf_rgw_flag1_1
;
2677 static int hf_tn5250_wdsf_rgw_reserved
;
2678 static int hf_tn5250_wdsf_sbi_rowscols
;
2679 static int hf_tn5250_wdsf_sbi_sliderpos
;
2680 static int hf_tn5250_wdsf_sbi_total_scroll
;
2681 static int hf_tn5250_wdsf_wdf_flag1
;
2682 static int hf_tn5250_wdsf_wdf_flag1_0
;
2683 static int hf_tn5250_wea_prim_attr
;
2684 static int hf_tn5250_wea_prim_attr_blink
;
2685 static int hf_tn5250_wea_prim_attr_col
;
2686 static int hf_tn5250_wea_prim_attr_flag
;
2687 static int hf_tn5250_wea_prim_attr_int
;
2688 static int hf_tn5250_wea_prim_attr_rev
;
2689 static int hf_tn5250_wea_prim_attr_und
;
2690 static int hf_tn5250_wectw_end_column
;
2691 static int hf_tn5250_wectw_start_column
;
2692 static int hf_tn5250_wsf_qss_flag1
;
2693 static int hf_tn5250_wsf_qss_flag1_0
;
2694 static int hf_tn5250_wsf_qss_flag1_reserved
;
2695 static int hf_tn5250_wsf_qss_flag2
;
2696 static int hf_tn5250_wsf_qss_flag2_7
;
2697 static int hf_tn5250_wsf_qss_flag2_reserved
;
2698 static int hf_tn5250_wssf_cc_flag1
;
2699 static int hf_tn5250_wssf_cc_flag1_7
;
2700 static int hf_tn5250_wssf_cc_flag1_reserved
;
2701 static int hf_tn5250_wssf_flag1
;
2702 static int hf_tn5250_wssf_flag2
;
2703 static int hf_tn5250_wssf_flag2_0
;
2704 static int hf_tn5250_wssf_flag2_1
;
2705 static int hf_tn5250_wssf_flag2_2
;
2706 static int hf_tn5250_wssf_flag2_3
;
2707 static int hf_tn5250_wssf_flag2_4
;
2708 static int hf_tn5250_wssf_flag2_5
;
2709 static int hf_tn5250_wssf_flag2_6
;
2710 static int hf_tn5250_wssf_flag2_7
;
2711 static int hf_tn5250_wssf_ifc_background_color
;
2712 static int hf_tn5250_wssf_ifc_flag1
;
2713 static int hf_tn5250_wssf_ifc_flag1_0
;
2714 static int hf_tn5250_wssf_ifc_flag1_1to3
;
2715 static int hf_tn5250_wssf_ifc_flag1_4
;
2716 static int hf_tn5250_wssf_ifc_flag1_5
;
2717 static int hf_tn5250_wssf_ifc_flag1_6
;
2718 static int hf_tn5250_wssf_ifc_flag1_7
;
2719 static int hf_tn5250_wssf_ifc_flag2
;
2720 static int hf_tn5250_wssf_ifc_flag2_0
;
2721 static int hf_tn5250_wssf_ifc_flag2_1
;
2722 static int hf_tn5250_wssf_ifc_flag2_7
;
2723 static int hf_tn5250_wssf_ifc_flag2_reserved
;
2724 static int hf_tn5250_wssf_ifc_foreground_color
;
2725 static int hf_tn5250_wssf_ifc_image_format
;
2726 static int hf_tn5250_wssf_ifc_imagefax_name
;
2727 static int hf_tn5250_wssf_ifc_rotation
;
2728 static int hf_tn5250_wssf_ifc_scaling
;
2729 static int hf_tn5250_wssf_ifc_viewimage_location_col
;
2730 static int hf_tn5250_wssf_ifc_viewimage_location_row
;
2731 static int hf_tn5250_wssf_ifc_viewport_location_col
;
2732 static int hf_tn5250_wssf_ifc_viewport_location_row
;
2733 static int hf_tn5250_wssf_ifc_viewport_size_col
;
2734 static int hf_tn5250_wssf_ifc_viewport_size_row
;
2735 static int hf_tn5250_wssf_ifd_flag1
;
2736 static int hf_tn5250_wssf_ifd_flag1_0
;
2737 static int hf_tn5250_wssf_ifd_flag1_reserved
;
2738 static int hf_tn5250_wssf_ifd_imagefax_data
;
2739 static int hf_tn5250_wssf_ifd_imagefax_name
;
2740 static int hf_tn5250_wssf_kbc_flag1
;
2741 static int hf_tn5250_wssf_kbc_flag1_5
;
2742 static int hf_tn5250_wssf_kbc_flag1_6
;
2743 static int hf_tn5250_wssf_kbc_flag1_7
;
2744 static int hf_tn5250_wssf_kbc_flag1_reserved
;
2745 static int hf_tn5250_wssf_wsc_minor_type
;
2746 static int hf_tn5250_wtd_ccc1
;
2747 static int hf_tn5250_wtd_ccc2
;
2748 static int hf_tn5250_wtd_ccc2_alarm
;
2749 static int hf_tn5250_wtd_ccc2_cursor
;
2750 static int hf_tn5250_wtd_ccc2_off
;
2751 static int hf_tn5250_wtd_ccc2_on
;
2752 static int hf_tn5250_wtd_ccc2_res
;
2753 static int hf_tn5250_wtd_ccc2_reset
;
2754 static int hf_tn5250_wtd_ccc2_set
;
2755 static int hf_tn5250_wtd_ccc2_unlock
;
2756 static int hf_tn5250_wts_cld_flag1
;
2757 static int hf_tn5250_wts_cld_flag1_0
;
2758 static int hf_tn5250_wts_cld_flag1_1
;
2759 static int hf_tn5250_wts_cld_flag1_2
;
2760 static int hf_tn5250_wts_cld_flag1_3
;
2761 static int hf_tn5250_wts_cld_flag1_4
;
2762 static int hf_tn5250_wts_cld_flag1_5
;
2763 static int hf_tn5250_wts_cld_flag1_6
;
2764 static int hf_tn5250_wts_cld_flag1_7
;
2765 static int hf_tn5250_wts_cld_flag2
;
2766 static int hf_tn5250_wts_cld_flag2_0
;
2767 static int hf_tn5250_wts_cld_flag2_1
;
2768 static int hf_tn5250_wts_cld_flag2_2
;
2769 static int hf_tn5250_wts_cld_flag2_3
;
2770 static int hf_tn5250_wts_cld_flag2_4
;
2771 static int hf_tn5250_wts_cld_flag2_line_spacing
;
2772 static int hf_tn5250_wts_cld_flag3
;
2773 static int hf_tn5250_wts_cld_flag3_0
;
2774 static int hf_tn5250_wts_cld_flag3_1
;
2775 static int hf_tn5250_wts_cld_flag3_2
;
2776 static int hf_tn5250_wts_cld_flag3_3
;
2777 static int hf_tn5250_wts_cld_flag3_4
;
2778 static int hf_tn5250_wts_cld_flag3_5
;
2779 static int hf_tn5250_wts_cld_flag3_6
;
2780 static int hf_tn5250_wts_cld_flag3_7
;
2781 static int hf_tn5250_wts_cld_io
;
2782 static int hf_tn5250_wts_cld_li
;
2783 static int hf_tn5250_wts_cld_lmo
;
2784 static int hf_tn5250_wts_cld_page_num
;
2785 static int hf_tn5250_wts_cld_row
;
2786 static int hf_tn5250_wts_cld_sli
;
2787 static int hf_tn5250_wts_flag1
;
2788 static int hf_tn5250_wts_flag1_0
;
2789 static int hf_tn5250_wts_flag1_1
;
2790 static int hf_tn5250_wts_flag1_2
;
2791 static int hf_tn5250_wts_flag1_3
;
2792 static int hf_tn5250_wts_flag1_reserved
;
2793 static int hf_tn5250_wts_flag2
;
2794 static int hf_tn5250_wts_flag2_6
;
2795 static int hf_tn5250_wts_flag2_reserved
;
2796 static int hf_tn5250_wts_flag2_reserved2
;
2797 static int hf_tn5250_wts_flag3
;
2798 static int hf_tn5250_wts_flag3_0
;
2799 static int hf_tn5250_wts_flag3_1
;
2800 static int hf_tn5250_wts_flag3_2
;
2801 static int hf_tn5250_wts_flag3_3
;
2802 static int hf_tn5250_wts_flag3_4
;
2803 static int hf_tn5250_wts_flag3_5
;
2804 static int hf_tn5250_wts_flag3_6
;
2805 static int hf_tn5250_wts_flag3_7
;
2806 static int hf_tn5250_wts_home_position_col
;
2807 static int hf_tn5250_wts_home_position_row
;
2808 static int hf_tn5250_wts_partition
;
2809 static int hf_tn5250_soh_length
;
2810 static int hf_tn5250_negative_response
;
2811 static int hf_tn5250_qr_ccl
;
2812 static int hf_tn5250_qr_chc
;
2813 static int hf_tn5250_qr_dm
;
2814 static int hf_tn5250_qr_dsn
;
2815 static int hf_tn5250_qr_dt
;
2816 static int hf_tn5250_qr_dtc
;
2817 static int hf_tn5250_qr_eki
;
2818 static int hf_tn5250_qr_flag
;
2819 static int hf_tn5250_qr_flag1
;
2820 static int hf_tn5250_qr_flag2
;
2821 static int hf_tn5250_qr_flag3
;
2822 static int hf_tn5250_qr_flag4
;
2823 static int hf_tn5250_qr_ki
;
2824 static int hf_tn5250_qr_flag1_0
;
2825 static int hf_tn5250_qr_flag1_1
;
2826 static int hf_tn5250_qr_flag1_2
;
2827 static int hf_tn5250_qr_flag1_3
;
2828 static int hf_tn5250_qr_flag1_4
;
2829 static int hf_tn5250_qr_flag1_5
;
2830 static int hf_tn5250_qr_flag1_6
;
2831 static int hf_tn5250_qr_flag1_7
;
2832 static int hf_tn5250_qr_flag2_0to3
;
2833 static int hf_tn5250_qr_flag2_4
;
2834 static int hf_tn5250_qr_flag2_5
;
2835 static int hf_tn5250_qr_flag2_6to7
;
2836 static int hf_tn5250_qr_flag_0
;
2837 static int hf_tn5250_qr_flag_reserved
;
2838 static int hf_tn5250_qr_mni
;
2839 static int hf_tn5250_image_fax_error
;
2840 static int hf_tn5250_vac_data
;
2841 static int hf_tn5250_vac_prefix
;
2842 static int hf_tn5250_wssf_ttw_flag
;
2843 static int hf_tn5250_wssf_ttw_data
;
2845 static int ett_tn5250
;
2846 static int ett_tn5250_wcc
;
2848 static int ett_tn5250_field_attribute
;
2849 static int ett_tn5250_dfdpck_mask
;
2850 static int ett_tn5250_field_validation
;
2851 static int ett_tn5250_header_flags
;
2852 static int ett_tn5250_roll_mask
;
2853 static int ett_tn5250_soh_mask
;
2854 static int ett_tn5250_soh_pf16to9_mask
;
2855 static int ett_tn5250_soh_pf24to17_mask
;
2856 static int ett_tn5250_soh_pf8to1_mask
;
2857 static int ett_tn5250_sps_mask
;
2858 static int ett_tn5250_wdsf_cw_bp_mask
;
2859 static int ett_tn5250_wdsf_cw_mask
;
2860 static int ett_tn5250_wdsf_cw_tf_mask
;
2861 static int ett_tn5250_wdsf_deg_mask
;
2862 static int ett_tn5250_wdsf_deg_ms_mask
;
2863 static int ett_tn5250_wdsf_ds_ci_mask
;
2864 static int ett_tn5250_wdsf_ds_cpda_mask
;
2865 static int ett_tn5250_wdsf_ds_ct_mask
;
2866 static int ett_tn5250_wdsf_ds_mask
;
2867 static int ett_tn5250_wdsf_ds_mbs_mask
;
2868 static int ett_tn5250_wdsf_ds_sbi_mask
;
2869 static int ett_tn5250_wdsf_dsb_mask
;
2870 static int ett_tn5250_wdsf_pmb_mask
;
2871 static int ett_tn5250_wdsf_ragc_mask
;
2872 static int ett_tn5250_wdsf_rgw_mask
;
2873 static int ett_tn5250_wdsf_wdf_mask
;
2874 static int ett_tn5250_wsf_dpo_mask
;
2875 static int ett_tn5250_wsf_dsl_mask
;
2876 static int ett_tn5250_wsf_dtsf_mask
;
2877 static int ett_tn5250_wsf_qss_mask
;
2878 static int ett_tn5250_wsf_rts_mask
;
2879 static int ett_tn5250_wssf_cc_mask
;
2880 static int ett_tn5250_wssf_ifc_mask
;
2881 static int ett_tn5250_wssf_ifd_mask
;
2882 static int ett_tn5250_wssf_kbc_mask
;
2883 static int ett_tn5250_wssf_mask
;
2884 static int ett_tn5250_wts_mask
;
2885 static int ett_tn5250_qr_mask
;
2886 static int ett_tn5250_wea_prim_attr
;
2889 static expert_field ei_tn5250_command_code
;
2891 static uint32_t dissect_tn5250_orders_and_data(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
);
2893 typedef struct hf_items
{
2897 int * const *bitmask
;
2901 /* Utility Functions */
2904 tn5250_is_valid_aid(int aid
)
2908 case AID_ENTER_OR_RECORD_ADV
:
2913 case AID_ROLL_RIGHT
:
2915 case AID_RECORD_BACKSPACE
:
2916 case AID_SLP_AUTO_ENTER
:
2917 case AID_FORWARD_EDGE_TRIGGER_AUTO__ENTER
:
2945 case AID_INBOUND_WRITE_STRUCTURED_FIELD
:
2946 case AID_PASS_THROUGH_RESPONSE
:
2955 tn5250_add_hf_items(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
,
2956 const hf_items
*fields
)
2958 int start
=offset
, byte
;
2961 for (i
= 0; fields
[i
].phf
; ++i
) {
2962 if (fields
[i
].bitmask
== 0) {
2963 /* Skip an 0xFF byte acting as an escape byte */
2964 byte
= tvb_get_uint8(tvb
,offset
);
2968 proto_tree_add_item(tn5250_tree
, *fields
[i
].phf
, tvb
, offset
,
2969 fields
[i
].length
, fields
[i
].encoding
);
2971 proto_tree_add_bitmask(tn5250_tree
, tvb
, offset
, *fields
[i
].phf
,
2972 fields
[i
].bitmask_ett
, fields
[i
].bitmask
, ENC_BIG_ENDIAN
);
2974 DISSECTOR_ASSERT(fields
[i
].length
> 0);
2975 offset
+=fields
[i
].length
;
2977 return (offset
- start
);
2981 dissect_unknown_data(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
,
2982 int start
, int sf_length
)
2986 len_left
= sf_length
- (offset
- start
);
2989 proto_tree_add_item(tn5250_tree
, hf_tn5250_unknown_data
, tvb
, offset
,
2997 dissect_wcc(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3000 static int * const wcc_byte
[] = {
3001 &hf_tn5250_wtd_ccc2_res
,
3002 &hf_tn5250_wtd_ccc2_cursor
,
3003 &hf_tn5250_wtd_ccc2_reset
,
3004 &hf_tn5250_wtd_ccc2_set
,
3005 &hf_tn5250_wtd_ccc2_unlock
,
3006 &hf_tn5250_wtd_ccc2_alarm
,
3007 &hf_tn5250_wtd_ccc2_off
,
3008 &hf_tn5250_wtd_ccc2_on
,
3012 hf_items wcc_fields
[] = {
3013 { &hf_tn5250_wtd_ccc1
, 0, 1, 0, ENC_BIG_ENDIAN
},
3014 { &hf_tn5250_wtd_ccc2
, ett_tn5250_wcc
, 1, wcc_byte
, 0 },
3015 { NULL
, 0, 0, 0, 0 }
3018 tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, wcc_fields
);
3025 dissect_row_column(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3028 proto_tree_add_item(tn5250_tree
, hf_tn5250_buffer_x
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3030 proto_tree_add_item(tn5250_tree
, hf_tn5250_buffer_y
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3033 return (offset
- start
);
3036 /* End - Utility Functions */
3039 /* Start: Handle WCC, Orders and Data */
3041 /* 15.6.8 Erase to Address Order */
3043 dissect_erase_to_address(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3048 dissect_row_column(tn5250_tree
, tvb
, offset
);
3050 length
= tvb_get_uint8(tvb
, offset
);
3051 proto_tree_add_item(tn5250_tree
, hf_tn5250_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3054 for (i
=1; i
< length
; i
++) {
3055 proto_tree_add_item(tn5250_tree
, hf_tn5250_attribute_type
, tvb
, offset
, 1,
3060 return (offset
- start
);
3063 /* 15.6.9 Start of Header Order */
3065 dissect_start_of_header(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3069 /*TODO: Warn on invalid length. <= 7 */
3070 static int * const byte
[] = {
3071 &hf_tn5250_soh_cursor_direction
,
3072 &hf_tn5250_soh_screen_reverse
,
3073 &hf_tn5250_soh_input_capable_only
,
3077 static int * const byte1
[] = {
3078 &hf_tn5250_soh_pf24
, &hf_tn5250_soh_pf23
, &hf_tn5250_soh_pf22
,
3079 &hf_tn5250_soh_pf21
, &hf_tn5250_soh_pf20
, &hf_tn5250_soh_pf19
,
3080 &hf_tn5250_soh_pf18
, &hf_tn5250_soh_pf17
,
3084 static int * const byte2
[] = {
3085 &hf_tn5250_soh_pf16
, &hf_tn5250_soh_pf15
, &hf_tn5250_soh_pf14
,
3086 &hf_tn5250_soh_pf13
, &hf_tn5250_soh_pf12
, &hf_tn5250_soh_pf11
,
3087 &hf_tn5250_soh_pf10
, &hf_tn5250_soh_pf9
,
3091 static int * const byte3
[] = {
3092 &hf_tn5250_soh_pf8
, &hf_tn5250_soh_pf7
, &hf_tn5250_soh_pf6
,
3093 &hf_tn5250_soh_pf5
, &hf_tn5250_soh_pf4
, &hf_tn5250_soh_pf3
,
3094 &hf_tn5250_soh_pf2
, &hf_tn5250_soh_pf1
,
3098 hf_items start_of_header_fields
[] = {
3099 { &hf_tn5250_soh_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3100 { &hf_tn5250_soh_flags
, ett_tn5250_soh_mask
, 1, byte
, 0 },
3101 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3102 { &hf_tn5250_soh_resq
, 1, 1, 0, ENC_BIG_ENDIAN
},
3103 { &hf_tn5250_soh_err
, 1, 1, 0, ENC_BIG_ENDIAN
},
3104 { &hf_tn5250_soh_pf24to17
, ett_tn5250_soh_pf24to17_mask
, 1, byte1
, 0 },
3105 { &hf_tn5250_soh_pf16to9
, ett_tn5250_soh_pf16to9_mask
, 1, byte2
, 0 },
3106 { &hf_tn5250_soh_pf8to1
, ett_tn5250_soh_pf8to1_mask
, 1, byte3
, 0 },
3107 { NULL
, 0, 0, 0, 0 }
3111 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
3112 start_of_header_fields
);
3114 return (offset
- start
);
3117 /* 15.6.10 Transparent Data */
3119 dissect_twobyte_length_and_data(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3124 length
= tvb_get_ntohs(tvb
, offset
);
3125 proto_tree_add_item(tn5250_tree
, hf_tn5250_length_twobyte
, tvb
, offset
, 2,
3129 if (tvb_reported_length_remaining(tvb
, offset
) >= length
) {
3130 proto_tree_add_item(tn5250_tree
, hf_tn5250_field_data
, tvb
, offset
,
3131 length
, ENC_EBCDIC
);
3134 offset
+= dissect_unknown_data(tn5250_tree
, tvb
, offset
, start
, length
);
3137 return (offset
- start
);
3140 /* 15.6.11 Write Extended Attribute Order */
3142 dissect_field_attribute_pair(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3147 static int * const byte
[] = {
3148 &hf_tn5250_wea_prim_attr_flag
, &hf_tn5250_wea_prim_attr_col
,
3149 &hf_tn5250_wea_prim_attr_blink
, &hf_tn5250_wea_prim_attr_und
,
3150 &hf_tn5250_wea_prim_attr_int
, &hf_tn5250_wea_prim_attr_rev
,
3154 attribute_type
= tvb_get_uint8(tvb
, offset
);
3155 proto_tree_add_item(tn5250_tree
, hf_tn5250_attribute_type
, tvb
, offset
, 1,
3158 switch (attribute_type
) {
3159 case EXTENDED_PRIMARY_ATTRIBUTES
:
3160 proto_tree_add_bitmask(tn5250_tree
, tvb
, offset
, hf_tn5250_wea_prim_attr
,
3161 ett_tn5250_wea_prim_attr
, byte
, ENC_BIG_ENDIAN
);
3164 case EXTENDED_FOREGROUND_COLOR_ATTRIBUTES
:
3165 proto_tree_add_item(tn5250_tree
, hf_tn5250_foreground_color_attr
, tvb
,
3166 offset
, 1, ENC_BIG_ENDIAN
);
3169 case EXTENDED_IDEOGRAPHIC_ATTRIBUTES
:
3170 proto_tree_add_item(tn5250_tree
, hf_tn5250_ideographic_attr
, tvb
, offset
,
3175 /*TODO: Add invalid data statement here*/
3179 return (offset
- start
);
3182 /* 15.6.12 Start of Field Order */
3184 dissect_start_of_field(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3188 int ffw
= 0, fcw
= 0, fa
= 0;
3190 static int * const byte
[] = {
3192 &hf_tn5250_ffw_bypass
,
3195 &hf_tn5250_ffw_shift
,
3199 static int * const byte1
[] = {
3200 &hf_tn5250_ffw_auto
,
3202 &hf_tn5250_ffw_monocase
,
3205 &hf_tn5250_ffw_adjust
,
3209 static int * const fabyte
[] = {
3210 &hf_tn5250_sf_attr_flag
, &hf_tn5250_wea_prim_attr_col
,
3211 &hf_tn5250_wea_prim_attr_blink
, &hf_tn5250_wea_prim_attr_und
,
3212 &hf_tn5250_wea_prim_attr_int
, &hf_tn5250_wea_prim_attr_rev
,
3216 hf_items outbound_text_header_fields
[] = {
3217 { &hf_tn5250_ffw
, ett_tn5250_soh_mask
, 1, byte
, 0 },
3218 { &hf_tn5250_ffw
, ett_tn5250_soh_mask
, 1, byte1
, 0 },
3219 { NULL
, 0, 0, 0, 0 }
3222 ffw
= tvb_get_uint8(tvb
, offset
);
3225 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
3226 outbound_text_header_fields
);
3227 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3228 fcw
= tvb_get_uint8(tvb
, offset
);
3233 case CONTINUED_ENTRY
:
3235 case ENTRY_FIELD_RESEQUENCING
:
3236 case CURSOR_PROGRESSION_ENTRY_FIELD
:
3237 case HIGHLIGHTED_ENTRY_FIELD
:
3238 case POINTER_DEVICE_SELECTION_ENTRY_FIELD
:
3239 case TRANSPARENCY_ENTRY_FIELD
:
3240 proto_tree_add_item(tn5250_tree
, hf_tn5250_fcw
, tvb
, offset
,
3251 fa
= tvb_get_uint8(tvb
, offset
);
3254 proto_tree_add_bitmask(tn5250_tree
, tvb
, offset
, hf_tn5250_fa
,
3255 ett_tn5250_wea_prim_attr
, fabyte
, ENC_BIG_ENDIAN
);
3258 proto_tree_add_item(tn5250_tree
, hf_tn5250_fa_color
, tvb
, offset
,
3262 proto_tree_add_item(tn5250_tree
, hf_tn5250_length_twobyte
, tvb
, offset
,
3266 return (offset
- start
);
3269 /* 15.6.13 Write To Display Structured Field Order */
3271 dissect_create_window(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3275 int done
= 0, minor_structure
= 0;
3277 static int * const byte
[] = {
3278 &hf_tn5250_wdsf_cw_flag1_1
,
3279 &hf_tn5250_wdsf_cw_flag1_2
,
3280 &hf_tn5250_wdsf_cw_flag1_reserved
,
3284 hf_items cw_fields
[] = {
3285 { &hf_tn5250_wdsf_cw_flag1
, ett_tn5250_wdsf_cw_mask
, 1, byte
, 0 },
3286 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3287 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3288 { &hf_tn5250_wdsf_cw_wd
, 0, 1, 0, ENC_BIG_ENDIAN
},
3289 { &hf_tn5250_wdsf_cw_ww
, 0, 1, 0, ENC_BIG_ENDIAN
},
3290 { NULL
, 0, 0, 0, 0 }
3293 static int * const cw_bp_flag1
[] = {
3294 &hf_tn5250_wdsf_cw_bp_flag1_1
,
3295 &hf_tn5250_wdsf_cw_bp_flag1_reserved
,
3300 hf_items cwbp_fields
[] = {
3301 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3302 { &hf_tn5250_wdsf_cw_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3303 { &hf_tn5250_wdsf_cw_bp_flag1
, ett_tn5250_wdsf_cw_bp_mask
, 1, cw_bp_flag1
, 0 },
3304 { &hf_tn5250_wdsf_cw_bp_mba
, 0, 1, 0, ENC_BIG_ENDIAN
},
3305 { &hf_tn5250_wdsf_cw_bp_cba
, 0, 1, 0, ENC_BIG_ENDIAN
},
3306 { &hf_tn5250_wdsf_cw_bp_ulbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3307 { &hf_tn5250_wdsf_cw_bp_tbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3308 { &hf_tn5250_wdsf_cw_bp_urbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3309 { &hf_tn5250_wdsf_cw_bp_lbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3310 { &hf_tn5250_wdsf_cw_bp_rbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3311 { &hf_tn5250_wdsf_cw_bp_llbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3312 { &hf_tn5250_wdsf_cw_bp_bbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3313 { &hf_tn5250_wdsf_cw_bp_lrbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3314 { NULL
, 0, 0, 0, 0 }
3317 static int * const cw_tf_flag1
[] = {
3318 &hf_tn5250_wdsf_cw_tf_flag_orientation
,
3319 &hf_tn5250_wdsf_cw_tf_flag_1
,
3320 &hf_tn5250_wdsf_cw_tf_flag_reserved
,
3325 hf_items cw_tf_fields
[] = {
3326 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3327 { &hf_tn5250_wdsf_cw_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3328 { &hf_tn5250_wdsf_cw_tf_flag
, ett_tn5250_wdsf_cw_tf_mask
, 1, cw_tf_flag1
, 0 },
3329 { &hf_tn5250_wdsf_cw_tf_mba
, 0, 1, 0, ENC_BIG_ENDIAN
},
3330 { &hf_tn5250_wdsf_cw_tf_cba
, 0, 1, 0, ENC_BIG_ENDIAN
},
3331 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3332 { NULL
, 0, 0, 0, 0 }
3335 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, cw_fields
);
3337 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3338 minor_structure
= tvb_get_uint8(tvb
, offset
+1);
3339 switch (minor_structure
) {
3340 case CW_BORDER_PRESENTATION
:
3341 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, cwbp_fields
);
3343 case CW_TITLE_FOOTER
:
3344 length
= tvb_get_uint8(tvb
,offset
);
3345 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, cw_tf_fields
);
3347 /* XXX - expert info on the length field */
3350 proto_tree_add_item(tn5250_tree
, hf_tn5250_wdsf_cw_tf_text
, tvb
, offset
,
3351 (length
- 6), ENC_EBCDIC
);
3352 offset
+= (uint32_t)((length
- 6));
3360 return (offset
- start
);
3364 dissect_define_selection(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3368 int done
= 0, minor_structure
= 0, digit_selection
= 0;
3369 int minor_structure_start
;
3371 static int * const ds_flag1
[] = {
3372 &hf_tn5250_wdsf_ds_flag1_mouse_characteristics
, &hf_tn5250_wdsf_ds_flag1_reserved
,
3373 &hf_tn5250_wdsf_ds_flag1_auto_enter
, &hf_tn5250_wdsf_ds_flag1_1
,
3374 &hf_tn5250_wdsf_ds_flag1_2
, NULL
3377 static int * const ds_flag2
[] = {
3378 &hf_tn5250_wdsf_ds_flag2_1
, &hf_tn5250_wdsf_ds_flag2_2
,
3379 &hf_tn5250_wdsf_ds_flag2_3
, &hf_tn5250_wdsf_ds_flag2_4
,
3380 &hf_tn5250_wdsf_ds_flag2_5
, &hf_tn5250_wdsf_ds_flag2_6
,
3381 &hf_tn5250_wdsf_ds_flag2_reserved
,
3385 static int * const ds_flag3
[] = {
3386 &hf_tn5250_wdsf_ds_flag3_1
, &hf_tn5250_wdsf_ds_flag3_reserved
,
3390 static int * const ds_gdc
[] = {
3391 &hf_tn5250_wdsf_ds_gdc_indicators
, &hf_tn5250_wdsf_ds_gdc_reserved
,
3392 &hf_tn5250_wdsf_ds_gdc_selection_techniques
,
3396 static int * const ds_nws
[] = {
3397 &hf_tn5250_wdsf_ds_nws_indicators
, &hf_tn5250_wdsf_ds_nws_reserved
,
3398 &hf_tn5250_wdsf_ds_nws_selection_techniques
,
3402 hf_items ds_fields
[] = {
3403 { &hf_tn5250_wdsf_ds_flag1
, ett_tn5250_wdsf_ds_mask
, 1, ds_flag1
, 0 },
3404 { &hf_tn5250_wdsf_ds_flag2
, ett_tn5250_wdsf_ds_mask
, 1, ds_flag2
, 0 },
3405 { &hf_tn5250_wdsf_ds_flag3
, ett_tn5250_wdsf_ds_mask
, 1, ds_flag3
, 0 },
3406 { &hf_tn5250_wdsf_ds_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3407 { &hf_tn5250_wdsf_ds_gdc
, ett_tn5250_wdsf_ds_mask
, 1, ds_gdc
, 0 },
3408 { &hf_tn5250_wdsf_ds_nws
, ett_tn5250_wdsf_ds_mask
, 1, ds_nws
, 0 },
3409 { &hf_tn5250_wdsf_ds_nws_wout
, ett_tn5250_wdsf_ds_mask
, 1, ds_nws
, 0 },
3410 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3411 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3412 { &hf_tn5250_wdsf_ds_textsize
, 0, 1, 0, ENC_BIG_ENDIAN
},
3413 { &hf_tn5250_wdsf_ds_rows
, 0, 1, 0, ENC_BIG_ENDIAN
},
3414 { &hf_tn5250_wdsf_ds_columns
, 0, 1, 0, ENC_BIG_ENDIAN
},
3415 { &hf_tn5250_wdsf_ds_padding
, 0, 1, 0, ENC_BIG_ENDIAN
},
3416 { &hf_tn5250_wdsf_ds_numeric_sep
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3417 { &hf_tn5250_wdsf_ds_country_sel
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3418 { &hf_tn5250_wdsf_ds_cancel_aid
, 0, 1, 0, ENC_BIG_ENDIAN
},
3419 { &hf_tn5250_wdsf_ds_totalrows
, 0, 4, 0, ENC_BIG_ENDIAN
},
3420 { &hf_tn5250_wdsf_ds_sliderpos
, 0, 4, 0, ENC_BIG_ENDIAN
},
3421 { NULL
, 0, 0, 0, 0 }
3424 static int * const ds_ct_flag1
[] = {
3425 &hf_tn5250_wdsf_ds_ct_flag1_choice_state
, &hf_tn5250_wdsf_ds_ct_flag1_2
,
3426 &hf_tn5250_wdsf_ds_ct_flag1_3
, &hf_tn5250_wdsf_ds_ct_flag1_4
,
3427 &hf_tn5250_wdsf_ds_ct_flag1_5
, &hf_tn5250_wdsf_ds_ct_flag1_numeric_selection
,
3431 static int * const ds_ct_flag2
[] = {
3432 &hf_tn5250_wdsf_ds_ct_flag2_0
, &hf_tn5250_wdsf_ds_ct_flag2_1
,
3433 &hf_tn5250_wdsf_ds_ct_flag2_2
, &hf_tn5250_wdsf_ds_ct_flag2_3
,
3434 &hf_tn5250_wdsf_ds_ct_flag2_4
, &hf_tn5250_wdsf_ds_ct_flag2_5
,
3435 &hf_tn5250_wdsf_ds_ct_flag2_6
, &hf_tn5250_wdsf_ds_ct_flag2_7
,
3439 static int * const ds_ct_flag3
[] = {
3440 &hf_tn5250_wdsf_ds_ct_flag3_0
, &hf_tn5250_wdsf_ds_ct_flag3_1
,
3441 &hf_tn5250_wdsf_ds_ct_flag3_2
, &hf_tn5250_wdsf_ds_ct_flag3_reserved
,
3445 hf_items ds_ct_fields
[] = {
3446 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3447 { &hf_tn5250_wdsf_ds_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3448 { &hf_tn5250_wdsf_ds_ct_flag1
, ett_tn5250_wdsf_ds_ct_mask
, 1, ds_ct_flag1
, 0 },
3449 { &hf_tn5250_wdsf_ds_ct_flag2
, ett_tn5250_wdsf_ds_ct_mask
, 1, ds_ct_flag2
, 0 },
3450 { &hf_tn5250_wdsf_ds_ct_flag3
, ett_tn5250_wdsf_ds_ct_mask
, 1, ds_ct_flag3
, 0 },
3451 { &hf_tn5250_wdsf_ds_ct_mnemonic_offset
, 0, 1, 0, ENC_BIG_ENDIAN
},
3452 { &hf_tn5250_wdsf_ds_ct_aid
, 0, 1, 0, ENC_BIG_ENDIAN
},
3453 { &hf_tn5250_wdsf_ds_ct_numeric_onebyte
, 0, 1, 0, ENC_BIG_ENDIAN
},
3454 { &hf_tn5250_wdsf_ds_ct_numeric_twobyte
, 0, 2, 0, ENC_BIG_ENDIAN
},
3455 { NULL
, 0, 0, 0, 0 }
3458 static int * const ds_mbs_flag
[] = {
3459 &hf_tn5250_wdsf_ds_mbs_flag_0
, &hf_tn5250_wdsf_ds_mbs_flag_1
,
3460 &hf_tn5250_wdsf_ds_mbs_flag_reserved
,
3464 hf_items ds_mbs_fields
[] = {
3465 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3466 { &hf_tn5250_wdsf_ds_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3467 { &hf_tn5250_wdsf_ds_mbs_flag
, ett_tn5250_wdsf_ds_mbs_mask
, 1, ds_mbs_flag
, 0 },
3468 { &hf_tn5250_wdsf_ds_mbs_start_column
, 0, 1, 0, ENC_BIG_ENDIAN
},
3469 { &hf_tn5250_wdsf_ds_mbs_end_column
, 0, 1, 0, ENC_BIG_ENDIAN
},
3470 { &hf_tn5250_wdsf_ds_mbs_start_column
, 0, 1, 0, ENC_BIG_ENDIAN
},
3471 { &hf_tn5250_wdsf_ds_mbs_monochrome_sep
, 0, 1, 0, ENC_BIG_ENDIAN
},
3472 { &hf_tn5250_wdsf_ds_mbs_color_sep
, 0, 1, 0, ENC_BIG_ENDIAN
},
3473 { &hf_tn5250_wdsf_ds_mbs_sep_char
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3474 { NULL
, 0, 0, 0, 0 }
3477 static int * const ds_cpda_flag
[] = {
3478 &hf_tn5250_wdsf_ds_cpda_flag1_0
, &hf_tn5250_wdsf_ds_cpda_flag1_1
,
3479 &hf_tn5250_wdsf_ds_cpda_flag1_2
, &hf_tn5250_wdsf_ds_cpda_flag1_reserved
,
3483 hf_items ds_cpda_fields
[] = {
3484 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3485 { &hf_tn5250_wdsf_ds_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3486 { &hf_tn5250_wdsf_ds_cpda_flag1
, ett_tn5250_wdsf_ds_cpda_mask
, 1, ds_cpda_flag
, 0 },
3487 { &hf_tn5250_wdsf_ds_cpda_monochrome_sel_avail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3488 { &hf_tn5250_wdsf_ds_cpda_color_sel_avail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3489 { &hf_tn5250_wdsf_ds_cpda_monochrome_sel_selected
, 0, 1, 0, ENC_BIG_ENDIAN
},
3490 { &hf_tn5250_wdsf_ds_cpda_color_sel_selected
, 0, 1, 0, ENC_BIG_ENDIAN
},
3491 { &hf_tn5250_wdsf_ds_cpda_monochrome_sel_unavail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3492 { &hf_tn5250_wdsf_ds_cpda_color_sel_unavail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3493 { &hf_tn5250_wdsf_ds_cpda_monochrome_avail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3494 { &hf_tn5250_wdsf_ds_cpda_color_avail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3495 { &hf_tn5250_wdsf_ds_cpda_monochrome_selected
, 0, 1, 0, ENC_BIG_ENDIAN
},
3496 { &hf_tn5250_wdsf_ds_cpda_color_selected
, 0, 1, 0, ENC_BIG_ENDIAN
},
3497 { &hf_tn5250_wdsf_ds_cpda_monochrome_unavail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3498 { &hf_tn5250_wdsf_ds_cpda_color_unavail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3499 { &hf_tn5250_wdsf_ds_cpda_monochrome_indicator
, 0, 1, 0, ENC_BIG_ENDIAN
},
3500 { &hf_tn5250_wdsf_ds_cpda_color_indicator
, 0, 1, 0, ENC_BIG_ENDIAN
},
3501 { &hf_tn5250_wdsf_ds_cpda_monochrome_unavail_indicator
, 0, 1, 0, ENC_BIG_ENDIAN
},
3502 { &hf_tn5250_wdsf_ds_cpda_color_unavail_indicator
, 0, 1, 0, ENC_BIG_ENDIAN
},
3503 { NULL
, 0, 0, 0, 0 }
3506 static int * const ds_ci_flag
[] = {
3507 &hf_tn5250_wdsf_ds_ci_flag1_0
, &hf_tn5250_wdsf_ds_ci_flag1_reserved
,
3511 hf_items ds_ci_fields
[] = {
3512 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3513 { &hf_tn5250_wdsf_ds_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3514 { &hf_tn5250_wdsf_ds_ci_flag1
, ett_tn5250_wdsf_ds_ci_mask
, 1, ds_ci_flag
, 0 },
3515 { &hf_tn5250_wdsf_ds_ci_left_push
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3516 { &hf_tn5250_wdsf_ds_ci_right_push
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3517 { &hf_tn5250_wdsf_ds_ci_first_choice
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3518 { NULL
, 0, 0, 0, 0 }
3521 static int * const ds_sbi_flag
[] = {
3522 &hf_tn5250_wdsf_ds_sbi_flag1_0
, &hf_tn5250_wdsf_ds_sbi_flag1_reserved
,
3526 hf_items ds_sbi_fields
[] = {
3527 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3528 { &hf_tn5250_wdsf_ds_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3529 { &hf_tn5250_wdsf_ds_sbi_flag1
, ett_tn5250_wdsf_ds_sbi_mask
, 1, ds_sbi_flag
, 0 },
3530 { &hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight
, 0, 1, 0, ENC_BIG_ENDIAN
},
3531 { &hf_tn5250_wdsf_ds_sbi_color_top_highlight
, 0, 1, 0, ENC_BIG_ENDIAN
},
3532 { &hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight_shaft
, 0, 1, 0, ENC_BIG_ENDIAN
},
3533 { &hf_tn5250_wdsf_ds_sbi_color_top_highlight_shaft
, 0, 1, 0, ENC_BIG_ENDIAN
},
3534 { &hf_tn5250_wdsf_ds_sbi_top_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3535 { &hf_tn5250_wdsf_ds_sbi_bottom_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3536 { &hf_tn5250_wdsf_ds_sbi_empty_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3537 { &hf_tn5250_wdsf_ds_sbi_slider_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3538 { NULL
, 0, 0, 0, 0 }
3541 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_fields
);
3543 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3544 minor_structure
= tvb_get_uint8(tvb
, offset
+1);
3545 switch (minor_structure
) {
3546 case DS_CHOICE_TEXT
:
3547 length
= tvb_get_uint8(tvb
, offset
);
3548 digit_selection
= tvb_get_uint8(tvb
, offset
+2);
3550 * XXX - the document says the AID field is present only if
3551 * the "AID if selected" flag bit is set.
3553 minor_structure_start
= offset
;
3554 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_ct_fields
);
3555 if (digit_selection
& DS_NUMERIC_SELECTION_SINGLE_DIGIT
) {
3556 proto_tree_add_item(tn5250_tree
, hf_tn5250_wdsf_ds_ct_numeric_onebyte
,
3557 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3559 } else if (digit_selection
& DS_NUMERIC_SELECTION_DOUBLE_DIGIT
) {
3560 proto_tree_add_item(tn5250_tree
, hf_tn5250_wdsf_ds_ct_numeric_twobyte
,
3561 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3564 if (length
< (offset
- minor_structure_start
)) {
3565 /* XXX - expert info on the length field */
3568 proto_tree_add_item(tn5250_tree
, hf_tn5250_wdsf_ds_ct_text
, tvb
, offset
,
3569 (length
- (offset
- minor_structure_start
)),
3571 offset
+= (uint32_t)((length
- (offset
- minor_structure_start
)));
3573 case DS_MENU_BAR_SEPARATOR
:
3574 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_mbs_fields
);
3576 case DS_CHOICE_PRESENTATION_DISPLAY
:
3577 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_cpda_fields
);
3579 case DS_CHOICE_INDICATORS
:
3580 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_ci_fields
);
3582 case DS_SCROLLBAR_INDICATORS
:
3583 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_sbi_fields
);
3590 return (offset
- start
);
3594 dissect_define_scrollbar(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3597 int done
= 0, minor_structure
= 0;
3599 static int * const dsb_byte
[] = {
3600 &hf_tn5250_wdsf_dsb_flag1_0
, &hf_tn5250_wdsf_dsb_flag1_1
,
3601 &hf_tn5250_wdsf_dsb_flag1_reserved
, &hf_tn5250_wdsf_dsb_flag1_7
,
3605 hf_items dsb_fields
[] = {
3606 { &hf_tn5250_wdsf_dsb_flag1
, ett_tn5250_wdsf_dsb_mask
, 1, dsb_byte
, 0 },
3607 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3608 { &hf_tn5250_wdsf_sbi_total_scroll
, 0, 4, 0, ENC_BIG_ENDIAN
},
3609 { &hf_tn5250_wdsf_sbi_sliderpos
, 0, 4, 0, ENC_BIG_ENDIAN
},
3610 { &hf_tn5250_wdsf_sbi_rowscols
, 0, 1, 0, ENC_BIG_ENDIAN
},
3611 { NULL
, 0, 0, 0, 0 }
3614 static int * const ds_sbi_flag
[] = {
3615 &hf_tn5250_wdsf_ds_sbi_flag1_0
, &hf_tn5250_wdsf_ds_sbi_flag1_reserved
,
3619 hf_items ds_sbi_fields
[] = {
3620 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3621 { &hf_tn5250_wdsf_ds_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3622 { &hf_tn5250_wdsf_ds_sbi_flag1
, ett_tn5250_wdsf_ds_sbi_mask
, 1, ds_sbi_flag
, 0 },
3623 { &hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight
, 0, 1, 0, ENC_BIG_ENDIAN
},
3624 { &hf_tn5250_wdsf_ds_sbi_color_top_highlight
, 0, 1, 0, ENC_BIG_ENDIAN
},
3625 { &hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight_shaft
, 0, 1, 0, ENC_BIG_ENDIAN
},
3626 { &hf_tn5250_wdsf_ds_sbi_color_top_highlight_shaft
, 0, 1, 0, ENC_BIG_ENDIAN
},
3627 { &hf_tn5250_wdsf_ds_sbi_top_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3628 { &hf_tn5250_wdsf_ds_sbi_bottom_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3629 { &hf_tn5250_wdsf_ds_sbi_empty_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3630 { &hf_tn5250_wdsf_ds_sbi_slider_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3631 { NULL
, 0, 0, 0, 0 }
3635 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, dsb_fields
);
3637 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3638 minor_structure
= tvb_get_uint8(tvb
, offset
+1);
3639 switch (minor_structure
) {
3640 case DS_SCROLLBAR_INDICATORS
:
3641 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_sbi_fields
);
3648 return (offset
- start
);
3652 dissect_draw_erase_gridlines(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3655 int done
= 0, minor_structure
=0;
3657 static int * const deg_byte
[] = {
3658 &hf_tn5250_wdsf_deg_flag1_0
, &hf_tn5250_wdsf_deg_flag1_reserved
,
3662 static int * const deg_byte2
[] = {
3663 &hf_tn5250_wdsf_deg_flag2_0
, &hf_tn5250_wdsf_deg_flag2_reserved
,
3667 hf_items deg_fields
[] = {
3668 { &hf_tn5250_wdsf_deg_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
3669 { &hf_tn5250_wdsf_deg_flag1
, ett_tn5250_wdsf_deg_mask
, 1, deg_byte
, 0 },
3670 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3671 { &hf_tn5250_wdsf_deg_flag2
, ett_tn5250_wdsf_deg_mask
, 1, deg_byte2
, 0 },
3672 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3673 { &hf_tn5250_wdsf_deg_default_color
, 0, 1, 0, ENC_BIG_ENDIAN
},
3674 { &hf_tn5250_wdsf_deg_default_line
, 0, 1, 0, ENC_BIG_ENDIAN
},
3675 { NULL
, 0, 0, 0, 0 }
3679 static int * const deg_ms_byte
[] = {
3680 &hf_tn5250_wdsf_deg_ms_flag1_0
, &hf_tn5250_wdsf_deg_ms_flag1_reserved
,
3684 hf_items deg_ms_fields
[] = {
3685 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3686 { &hf_tn5250_wdsf_deg_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3687 { &hf_tn5250_wdsf_deg_ms_flag1
, ett_tn5250_wdsf_deg_ms_mask
, 1, deg_ms_byte
, 0 },
3688 { &hf_tn5250_wdsf_deg_ms_start_row
, 0, 1, 0, ENC_BIG_ENDIAN
},
3689 { &hf_tn5250_wdsf_deg_ms_start_column
, 0, 1, 0, ENC_BIG_ENDIAN
},
3690 { &hf_tn5250_wdsf_deg_ms_horizontal_dimension
, 0, 1, 0, ENC_BIG_ENDIAN
},
3691 { &hf_tn5250_wdsf_deg_ms_vertical_dimension
, 0, 1, 0, ENC_BIG_ENDIAN
},
3692 { &hf_tn5250_wdsf_deg_ms_default_color
, 0, 1, 0, ENC_BIG_ENDIAN
},
3693 { &hf_tn5250_wdsf_deg_ms_line_repeat
, 0, 1, 0, ENC_BIG_ENDIAN
},
3694 { &hf_tn5250_wdsf_deg_ms_line_interval
, 0, 1, 0, ENC_BIG_ENDIAN
},
3695 { NULL
, 0, 0, 0, 0 }
3698 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, deg_fields
);
3700 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3701 minor_structure
= tvb_get_uint8(tvb
, offset
+1);
3702 switch (minor_structure
) {
3703 case UPPER_HORIZONTAL_LINE
:
3704 case LOWER_HORIZONTAL_LINE
:
3705 case LEFT_VERTICAL_LINE
:
3706 case RIGHT_VERTICAL_LINE
:
3708 case HORIZONTALLY_RULED_BOX
:
3709 case VERTICALLY_RULED_BOX
:
3710 case HORIZONTALLY_AND_VERTICALLY_RULED_BOX
:
3711 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, deg_ms_fields
);
3718 return (offset
- start
);
3722 dissect_wdsf_structured_field(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3725 int minor_structure_start
;
3726 int length
= 0, type
;
3727 int done
= 0, ln_left
= 0, i
= 0;
3729 hf_items standard_fields
[] = {
3730 { &hf_tn5250_sf_length
, 0, 2, 0, ENC_BIG_ENDIAN
},
3731 { &hf_tn5250_sf_class
, 0, 1, 0, ENC_BIG_ENDIAN
},
3732 { &hf_tn5250_sf_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3733 { NULL
, 0, 0, 0, 0 }
3736 static int * const rgw_byte
[] = {
3737 &hf_tn5250_wdsf_rgw_flag1_0
,
3738 &hf_tn5250_wdsf_rgw_flag1_1
,
3739 &hf_tn5250_wdsf_rgw_reserved
,
3743 hf_items rgw_fields
[] = {
3744 { &hf_tn5250_wdsf_rgw_flag1
, ett_tn5250_wdsf_rgw_mask
, 1, rgw_byte
, 0 },
3745 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3746 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3747 { NULL
, 0, 0, 0, 0 }
3750 static int * const ragc_byte
[] = {
3751 &hf_tn5250_wdsf_ragc_flag1_0
,
3752 &hf_tn5250_wdsf_ragc_reserved
,
3756 hf_items ragc_fields
[] = {
3757 { &hf_tn5250_wdsf_ragc_flag1
, ett_tn5250_wdsf_ragc_mask
, 1, ragc_byte
, 0 },
3758 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3759 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3760 { NULL
, 0, 0, 0, 0 }
3763 static int * const wdf_byte
[] = {
3764 &hf_tn5250_wdsf_wdf_flag1_0
,
3765 &hf_tn5250_wdsf_wdf_flag1_reserved
,
3769 hf_items wdf_fields
[] = {
3770 { &hf_tn5250_wdsf_wdf_flag1
, ett_tn5250_wdsf_wdf_mask
, 1, wdf_byte
, 0 },
3771 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3772 { NULL
, 0, 0, 0, 0 }
3775 static int * const pmb_byte
[] = {
3776 &hf_tn5250_wdsf_pmb_flag1_0
, &hf_tn5250_wdsf_pmb_flag1_1
,
3777 &hf_tn5250_wdsf_pmb_flag1_2
, &hf_tn5250_wdsf_pmb_flag1_3
,
3778 &hf_tn5250_wdsf_pmb_flag1_reserved
,
3782 hf_items pmb_fields
[] = {
3783 { &hf_tn5250_wdsf_pmb_flag1
, ett_tn5250_wdsf_pmb_mask
, 1, pmb_byte
, 0 },
3784 { &hf_tn5250_wdsf_pmb_first_mouse_event
, 0, 1, 0, ENC_BIG_ENDIAN
},
3785 { &hf_tn5250_wdsf_pmb_second_mouse_event
, 0, 1, 0, ENC_BIG_ENDIAN
},
3786 { &hf_tn5250_aid
, 0, 1, 0, ENC_BIG_ENDIAN
},
3787 { NULL
, 0, 0, 0, 0 }
3790 hf_items cgl_fields
[] = {
3791 { &hf_tn5250_wdsf_cgl_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
3792 { &hf_tn5250_wdsf_cgl_start_row
, 0, 1, 0, ENC_BIG_ENDIAN
},
3793 { &hf_tn5250_wdsf_cgl_start_column
, 0, 1, 0, ENC_BIG_ENDIAN
},
3794 { &hf_tn5250_wdsf_cgl_rectangle_width
, 0, 1, 0, ENC_BIG_ENDIAN
},
3795 { &hf_tn5250_wdsf_cgl_rectangle_height
, 0, 1, 0, ENC_BIG_ENDIAN
},
3796 { NULL
, 0, 0, 0, 0 }
3799 length
= tvb_get_ntohs(tvb
,offset
);
3800 type
= tvb_get_uint8(tvb
, offset
+3);
3802 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, standard_fields
);
3804 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3807 offset
+= dissect_create_window(tn5250_tree
, tvb
, offset
);
3809 case UNRESTRICTED_WINDOW_CURSOR_MOVEMENT
:
3810 case REMOVE_GUI_SELECTION_FIELD
:
3811 case REMOVE_GUI_SCROLL_BAR_FIELD
:
3812 proto_tree_add_item(tn5250_tree
, hf_tn5250_reserved
, tvb
, offset
,
3814 proto_tree_add_item(tn5250_tree
, hf_tn5250_reserved
, tvb
, offset
,
3818 case REMOVE_GUI_WINDOW
:
3819 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, rgw_fields
);
3821 case REMOVE_ALL_GUI_CONSTRUCTS
:
3822 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ragc_fields
);
3824 case DEFINE_SELECTION_FIELD
:
3825 offset
+= dissect_define_selection(tn5250_tree
, tvb
, offset
);
3827 case DEFINE_SCROLL_BAR_FIELD
:
3828 offset
+= dissect_define_scrollbar(tn5250_tree
, tvb
, offset
);
3831 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, wdf_fields
);
3833 /* XXX - expert info on the length field */
3836 proto_tree_add_item(tn5250_tree
, hf_tn5250_field_data
, tvb
, offset
,
3837 (length
- 6), ENC_EBCDIC
);
3838 offset
+= (uint32_t)((length
- 6));
3840 case PROGRAMMABLE_MOUSE_BUTTONS
:
3841 minor_structure_start
= start
;
3842 proto_tree_add_item(tn5250_tree
, hf_tn5250_reserved
, tvb
, offset
,
3844 proto_tree_add_item(tn5250_tree
, hf_tn5250_reserved
, tvb
, offset
,
3847 if (length
< (offset
- minor_structure_start
)) {
3848 /* XXX - expert info on length field */
3851 ln_left
= length
- (offset
- minor_structure_start
);
3852 for (i
= 0; i
< ln_left
; i
+=4) {
3853 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, pmb_fields
);
3856 case DRAW_ERASE_GRID_LINES
:
3857 offset
+= dissect_draw_erase_gridlines(tn5250_tree
, tvb
, offset
);
3859 case CLEAR_GRID_LINE_BUFFER
:
3860 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, cgl_fields
);
3867 offset
+= dissect_unknown_data(tn5250_tree
, tvb
, offset
, start
, length
);
3869 return (offset
- start
);
3874 /* 15.6 WRITE TO DISPLAY Command - Orders and Data */
3876 dissect_tn5250_ra_data(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3878 int order_code
, done
= 0;
3881 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3882 order_code
= tvb_get_uint8(tvb
, offset
);
3883 switch (order_code
) {
3903 if (offset
> start
) {
3904 proto_tree_add_item(tn5250_tree
, hf_tn5250_repeated_character
,
3905 tvb
, start
, (offset
- start
), ENC_EBCDIC
);
3907 return (offset
- start
);
3912 dissect_tn5250_orders_and_data(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
3914 int start
= offset
, done
= 0;
3916 proto_tree
*cc_tree
;
3921 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3922 order_code
= tvb_get_uint8(tvb
, offset
);
3923 switch (order_code
) {
3927 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3928 offset
, 1, ENC_BIG_ENDIAN
);
3930 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3931 offset
+= dissect_row_column(cc_tree
, tvb
, offset
);
3932 offset
+= dissect_tn5250_ra_data(cc_tree
, tvb
, offset
);
3935 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3936 offset
, 1, ENC_BIG_ENDIAN
);
3938 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3939 offset
+= dissect_row_column(cc_tree
, tvb
, offset
);
3940 offset
+= dissect_tn5250_ra_data(cc_tree
, tvb
, offset
);
3943 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3944 offset
, 1, ENC_BIG_ENDIAN
);
3946 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3947 offset
+= dissect_erase_to_address(cc_tree
, tvb
, offset
);
3950 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3951 offset
, 1, ENC_BIG_ENDIAN
);
3953 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3954 offset
+= dissect_start_of_header(cc_tree
, tvb
, offset
);
3957 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3958 offset
, 1, ENC_BIG_ENDIAN
);
3960 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3961 offset
+= dissect_twobyte_length_and_data(cc_tree
, tvb
, offset
);
3964 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3965 offset
, 1, ENC_BIG_ENDIAN
);
3967 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3968 offset
+= dissect_field_attribute_pair(cc_tree
, tvb
, offset
);
3971 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3972 offset
, 1, ENC_BIG_ENDIAN
);
3974 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3975 offset
+= dissect_start_of_field(cc_tree
, tvb
, offset
);
3976 offset
+= dissect_tn5250_ra_data(cc_tree
, tvb
, offset
);
3979 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3980 offset
, 1, ENC_BIG_ENDIAN
);
3982 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3983 offset
+= dissect_wdsf_structured_field(cc_tree
, tvb
, offset
);
3990 return (offset
- start
);
3993 /* 15.22 SAVE PARTIAL SCREEN Command */
3995 dissect_save_partial_screen(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
4000 static int * const byte
[] = {
4001 &hf_tn5250_sps_flag1_0
,
4002 &hf_tn5250_sps_flag1_reserved
,
4006 hf_items save_partial_screen_fields
[] = {
4007 { &hf_tn5250_soh_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4008 { &hf_tn5250_sps_flag1
, ett_tn5250_sps_mask
, 1, byte
, 0 },
4009 { &hf_tn5250_sps_top_row
, 0, 1, 0, ENC_BIG_ENDIAN
},
4010 { &hf_tn5250_sps_left_column
, 0, 1, 0, ENC_BIG_ENDIAN
},
4011 { &hf_tn5250_sps_window_depth
, 0, 1, 0, ENC_BIG_ENDIAN
},
4012 { &hf_tn5250_sps_window_width
, 0, 1, 0, ENC_BIG_ENDIAN
},
4013 { NULL
, 0, 0, 0, 0 }
4016 length
= tvb_get_uint8(tvb
, offset
);
4018 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4019 save_partial_screen_fields
);
4021 offset
+= dissect_unknown_data(tn5250_tree
, tvb
, offset
, start
, length
);
4023 return (offset
- start
);
4026 /* 15.25 ROLL Command */
4028 dissect_roll(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
4032 static int * const byte
[] = {
4033 &hf_tn5250_roll_flag1_0
,
4034 &hf_tn5250_roll_flag1_reserved
,
4035 &hf_tn5250_roll_flag1_lines
,
4039 hf_items roll_fields
[] = {
4040 { &hf_tn5250_roll_flag1
, ett_tn5250_roll_mask
, 1, byte
, 0 },
4041 { &hf_tn5250_roll_top_line
, 0, 1, 0, ENC_BIG_ENDIAN
},
4042 { &hf_tn5250_roll_bottom_line
, 0, 1, 0, ENC_BIG_ENDIAN
},
4043 { NULL
, 0, 0, 0, 0 }
4047 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, roll_fields
);
4049 return (offset
- start
);
4052 /* 15.26 WRITE SINGLE STRUCTURED FIELD Command */
4054 dissect_write_single_structured_field_minor_fields(proto_tree
*tn5250_tree
,
4055 tvbuff_t
*tvb
, int offset
)
4059 int done
= 0, type
= 0;
4061 static int * const byte_wssf_kbc_flag1
[] = {
4062 &hf_tn5250_wssf_kbc_flag1_reserved
,
4063 &hf_tn5250_wssf_kbc_flag1_5
,
4064 &hf_tn5250_wssf_kbc_flag1_6
,
4065 &hf_tn5250_wssf_kbc_flag1_7
,
4069 static int * const byte_wssf_cc_flag1
[] = {
4070 &hf_tn5250_wssf_cc_flag1_reserved
,
4071 &hf_tn5250_wssf_cc_flag1_7
,
4075 hf_items wsc_customization_kbc_fields
[] = {
4076 { &hf_tn5250_sf_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4077 { &hf_tn5250_wssf_wsc_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
4078 { &hf_tn5250_wssf_kbc_flag1
, ett_tn5250_wssf_kbc_mask
, 1, byte_wssf_kbc_flag1
, 0 },
4079 { NULL
, 0, 0, 0, 0 }
4082 hf_items wsc_customization_cc_fields
[] = {
4083 { &hf_tn5250_sf_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4084 { &hf_tn5250_wssf_wsc_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
4085 { &hf_tn5250_wssf_cc_flag1
, ett_tn5250_wssf_cc_mask
, 1, byte_wssf_cc_flag1
, 0 },
4086 { NULL
, 0, 0, 0, 0 }
4089 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
4090 type
= tvb_get_uint8(tvb
, offset
+1);
4092 case KEYSTROKE_BUFFERING_CONTROL
:
4093 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4094 wsc_customization_kbc_fields
);
4096 case CURSOR_CONTROL
:
4097 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4098 wsc_customization_cc_fields
);
4106 return (offset
- start
);
4111 dissect_write_single_structured_field(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
,
4115 int length
, type
, done
= 0;
4116 uint32_t namelength
;
4118 static int * const byte
[] = {
4119 &hf_tn5250_wssf_flag2_0
,
4120 &hf_tn5250_wssf_flag2_1
,
4121 &hf_tn5250_wssf_flag2_2
,
4122 &hf_tn5250_wssf_flag2_3
,
4123 &hf_tn5250_wssf_flag2_4
,
4124 &hf_tn5250_wssf_flag2_5
,
4125 &hf_tn5250_wssf_flag2_6
,
4126 &hf_tn5250_wssf_flag2_7
,
4130 static int * const ifc_byte
[] = {
4131 &hf_tn5250_wssf_ifc_flag1_0
,
4132 &hf_tn5250_wssf_ifc_flag1_1to3
,
4133 &hf_tn5250_wssf_ifc_flag1_4
,
4134 &hf_tn5250_wssf_ifc_flag1_5
,
4135 &hf_tn5250_wssf_ifc_flag1_6
,
4136 &hf_tn5250_wssf_ifc_flag1_7
,
4140 static int * const ifc_byte2
[] = {
4141 &hf_tn5250_wssf_ifc_flag2_0
,
4142 &hf_tn5250_wssf_ifc_flag2_1
,
4143 &hf_tn5250_wssf_ifc_flag2_reserved
,
4144 &hf_tn5250_wssf_ifc_flag2_7
,
4148 static int * const ifd_byte
[] = {
4149 &hf_tn5250_wssf_ifd_flag1_0
,
4150 &hf_tn5250_wssf_ifd_flag1_reserved
,
4155 hf_items standard_fields
[] = {
4156 { &hf_tn5250_sf_length
, 0, 2, 0, ENC_BIG_ENDIAN
},
4157 { &hf_tn5250_sf_class
, 0, 1, 0, ENC_BIG_ENDIAN
},
4158 { &hf_tn5250_sf_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
4159 { NULL
, 0, 0, 0, 0 }
4162 hf_items wsc_customization_fields
[] = {
4163 { &hf_tn5250_wssf_flag1
, 0, 1, 0, ENC_BIG_ENDIAN
},
4164 { &hf_tn5250_wssf_flag2
, ett_tn5250_wssf_mask
, 1, byte
, 0 },
4165 { NULL
, 0, 0, 0, 0 }
4168 hf_items wsc_image_control_fields
[] = {
4169 { &hf_tn5250_wssf_ifc_flag1
, ett_tn5250_wssf_ifc_mask
, 1, ifc_byte
, 0 },
4170 { &hf_tn5250_wssf_ifc_flag2
, ett_tn5250_wssf_ifc_mask
, 1, ifc_byte2
, 0 },
4171 { &hf_tn5250_wssf_ifc_image_format
, 0, 2, 0, ENC_BIG_ENDIAN
},
4172 { &hf_tn5250_wssf_ifc_viewport_location_row
, 0, 1, 0, ENC_BIG_ENDIAN
},
4173 { &hf_tn5250_wssf_ifc_viewport_location_col
, 0, 1, 0, ENC_BIG_ENDIAN
},
4174 { &hf_tn5250_wssf_ifc_viewport_size_row
, 0, 1, 0, ENC_BIG_ENDIAN
},
4175 { &hf_tn5250_wssf_ifc_viewport_size_col
, 0, 1, 0, ENC_BIG_ENDIAN
},
4176 { &hf_tn5250_wssf_ifc_scaling
, 0, 2, 0, ENC_BIG_ENDIAN
},
4177 { &hf_tn5250_wssf_ifc_viewimage_location_row
, 0, 1, 0, ENC_BIG_ENDIAN
},
4178 { &hf_tn5250_wssf_ifc_viewimage_location_col
, 0, 1, 0, ENC_BIG_ENDIAN
},
4179 { &hf_tn5250_wssf_ifc_rotation
, 0, 2, 0, ENC_BIG_ENDIAN
},
4180 { &hf_tn5250_wssf_ifc_foreground_color
, 0, 1, 0, ENC_BIG_ENDIAN
},
4181 { &hf_tn5250_wssf_ifc_background_color
, 0, 1, 0, ENC_BIG_ENDIAN
},
4182 { NULL
, 0, 0, 0, 0 }
4185 hf_items wsc_image_download_fields
[] = {
4186 { &hf_tn5250_wssf_ifd_flag1
, ett_tn5250_wssf_ifd_mask
, 1, ifd_byte
, 0 },
4187 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4188 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4189 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4190 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4191 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4192 { &hf_tn5250_length
, 0, 2, 0, ENC_BIG_ENDIAN
},
4193 { NULL
, 0, 0, 0, 0 }
4196 length
= tvb_get_ntohs(tvb
,offset
);
4197 type
= tvb_get_uint8(tvb
, offset
+3);
4199 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, standard_fields
);
4202 * XXX - the documentation says "Unlike the WSF command (X'F3'),
4203 * a WSSF command does not have to be the last command in the data stream.",
4204 * so should we be looping here, or what?
4206 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
4208 case WSC_CUSTOMIZATION
:
4209 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4210 wsc_customization_fields
);
4211 offset
+= dissect_write_single_structured_field_minor_fields(tn5250_tree
, tvb
, offset
);
4213 case IMAGE_FAX_CONTROL
:
4214 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4215 wsc_image_control_fields
);
4216 proto_tree_add_item(tn5250_tree
, hf_tn5250_wssf_ifc_imagefax_name
, tvb
, offset
,
4217 (length
- (start
+ offset
)), ENC_EBCDIC
);
4218 if (length
> (start
+ offset
))
4219 offset
+= (uint32_t)(length
- (start
+ offset
));
4221 case IMAGE_FAX_DOWNLOAD
:
4222 namelength
= tvb_get_ntohs(tvb
,offset
+6);
4223 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4224 wsc_image_download_fields
);
4225 proto_tree_add_item(tn5250_tree
, hf_tn5250_wssf_ifd_imagefax_name
, tvb
, offset
,
4226 namelength
, ENC_EBCDIC
);
4227 offset
+= namelength
;
4228 proto_tree_add_item(tn5250_tree
, hf_tn5250_wssf_ifd_imagefax_data
, tvb
, offset
,
4229 (length
- (start
+ offset
)), ENC_NA
);
4230 if (length
> (start
+ offset
))
4231 offset
+= (uint32_t)(length
- (start
+ offset
));
4233 case VIDEO_AUDIO_CONTROLS
:
4234 proto_tree_add_item(tn5250_tree
, hf_tn5250_vac_prefix
, tvb
, offset
,
4237 proto_tree_add_item(tn5250_tree
, hf_tn5250_vac_data
, tvb
, offset
,
4241 case TRUE_TRANSPARENCY_WRITE
:
4242 proto_tree_add_item(tn5250_tree
, hf_tn5250_wssf_ttw_flag
, tvb
, offset
,
4245 proto_tree_add_item(tn5250_tree
, hf_tn5250_wssf_ttw_data
, tvb
, offset
,
4246 (length
- (start
+ offset
)), ENC_NA
);
4247 if (length
> (start
+ offset
))
4248 offset
+= (uint32_t)(length
- (start
+ offset
));
4255 offset
+= dissect_unknown_data(tn5250_tree
, tvb
, offset
, start
, length
);
4257 return (offset
- start
);
4260 /* 15.27 WRITE STRUCTURED FIELD Command */
4262 dissect_write_structured_field(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
4265 uint16_t sf_length
= 0;
4266 int length
, type
, done
= 0, used
= 0;
4268 hf_items standard_fields
[] = {
4269 { &hf_tn5250_sf_length
, 0, 2, 0, ENC_BIG_ENDIAN
},
4270 { &hf_tn5250_sf_class
, 0, 1, 0, ENC_BIG_ENDIAN
},
4271 { &hf_tn5250_sf_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
4272 { NULL
, 0, 0, 0, 0 }
4275 static int * const qss_byte1
[] = {
4276 &hf_tn5250_wsf_qss_flag1_0
,
4277 &hf_tn5250_wsf_qss_flag1_reserved
,
4281 static int * const qss_byte2
[] = {
4282 &hf_tn5250_wsf_qss_flag2_reserved
,
4283 &hf_tn5250_wsf_qss_flag2_7
,
4287 hf_items qss_fields
[] = {
4288 { &hf_tn5250_wsf_qss_flag1
, ett_tn5250_wsf_qss_mask
, 1, qss_byte1
, 0 },
4289 { &hf_tn5250_wsf_qss_flag2
, ett_tn5250_wsf_qss_mask
, 1, qss_byte2
, 0 },
4290 { NULL
, 0, 0, 0, 0 }
4293 hf_items dawt_fields
[] = {
4294 { &hf_tn5250_dawt_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4295 { &hf_tn5250_dawt_char
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
4296 { NULL
, 0, 0, 0, 0 }
4299 hf_items dckf_fields
[] = {
4300 { &hf_tn5250_dckf_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4301 { &hf_tn5250_dckf_key_code
, 0, 1, 0, ENC_BIG_ENDIAN
},
4302 { &hf_tn5250_dckf_function_code
, 0, 1, 0, ENC_BIG_ENDIAN
},
4303 { NULL
, 0, 0, 0, 0 }
4306 static int * const rts_byte1
[] = {
4307 &hf_tn5250_rts_flag1_0
,
4308 &hf_tn5250_rts_flag1_reserved
,
4312 hf_items rts_fields
[] = {
4313 { &hf_tn5250_rts_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4314 { &hf_tn5250_rts_flag1
, ett_tn5250_wsf_rts_mask
, 1, rts_byte1
, 0 },
4315 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4316 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4317 { NULL
, 0, 0, 0, 0 }
4320 static int * const dpo_byte1
[] = {
4321 &hf_tn5250_dpo_flag1_0
,
4322 &hf_tn5250_dpo_flag1_1
,
4323 &hf_tn5250_dpo_flag1_2
,
4324 &hf_tn5250_dpo_flag1_3
,
4325 &hf_tn5250_dpo_flag1_4
,
4326 &hf_tn5250_dpo_flag1_5
,
4327 &hf_tn5250_dpo_flag1_6
,
4328 &hf_tn5250_dpo_flag1_7
,
4332 static int * const dpo_byte2
[] = {
4333 &hf_tn5250_dpo_flag2_0
,
4334 &hf_tn5250_dpo_flag2_reserved
,
4338 hf_items dpo_fields
[] = {
4339 { &hf_tn5250_dpo_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4340 { &hf_tn5250_dpo_flag1
, ett_tn5250_wsf_dpo_mask
, 1, dpo_byte1
, 0 },
4341 { &hf_tn5250_dpo_flag2
, ett_tn5250_wsf_dpo_mask
, 1, dpo_byte2
, 0 },
4342 { &hf_tn5250_dpo_displace_characters
, 0, 3, 0, ENC_EBCDIC
|ENC_NA
},
4343 { &hf_tn5250_dpo_start_location_row
, 0, 2, 0, ENC_BIG_ENDIAN
},
4344 { &hf_tn5250_dpo_start_location_col
, 0, 2, 0, ENC_BIG_ENDIAN
},
4345 { NULL
, 0, 0, 0, 0 }
4348 static int * const dtsf_byte1
[] = {
4349 &hf_tn5250_dtsf_flag1_0
,
4350 &hf_tn5250_dtsf_flag1_1
,
4351 &hf_tn5250_dtsf_flag1_2
,
4352 &hf_tn5250_dtsf_flag1_3
,
4353 &hf_tn5250_dtsf_flag1_4
,
4354 &hf_tn5250_dtsf_flag1_5
,
4355 &hf_tn5250_dtsf_flag1_6
,
4356 &hf_tn5250_dtsf_flag1_7
,
4360 static int * const dtsf_byte2
[] = {
4361 &hf_tn5250_dtsf_flag2_0
,
4362 &hf_tn5250_dtsf_flag2_1
,
4363 &hf_tn5250_dtsf_flag2_2
,
4364 &hf_tn5250_dtsf_flag2_3
,
4365 &hf_tn5250_dtsf_flag2_4to7
,
4369 hf_items dtsf_fields
[] = {
4370 { &hf_tn5250_dtsf_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4371 { &hf_tn5250_dtsf_flag1
, ett_tn5250_wsf_dtsf_mask
, 1, dtsf_byte1
, 0 },
4372 { &hf_tn5250_dtsf_flag2
, ett_tn5250_wsf_dtsf_mask
, 1, dtsf_byte2
, 0 },
4373 { &hf_tn5250_dtsf_text_body_height
, 0, 2, 0, ENC_BIG_ENDIAN
},
4374 { &hf_tn5250_dtsf_text_body_width
, 0, 2, 0, ENC_BIG_ENDIAN
},
4375 { &hf_tn5250_dtsf_line_cmd_field_size
, 0, 1, 0, ENC_BIG_ENDIAN
},
4376 { &hf_tn5250_dtsf_location_of_pitch
, 0, 1, 0, ENC_BIG_ENDIAN
},
4377 { &hf_tn5250_dtsf_first_line
, 0, 1, 0, ENC_BIG_ENDIAN
},
4378 { NULL
, 0, 0, 0, 0 }
4381 static int * const dsl_byte1
[] = {
4382 &hf_tn5250_dsl_flag1_0
,
4383 &hf_tn5250_dsl_flag1_1
,
4384 &hf_tn5250_dsl_flag1_2
,
4385 &hf_tn5250_dsl_flag1_reserved
,
4389 hf_items dsl_fields
[] = {
4390 { &hf_tn5250_dsl_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4391 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4392 { &hf_tn5250_dsl_rtl_offset
, 0, 1, 0, ENC_BIG_ENDIAN
},
4393 { &hf_tn5250_dsl_offset
, 0, 1, 0, ENC_BIG_ENDIAN
},
4394 { NULL
, 0, 0, 0, 0 }
4397 hf_items dsl_fields2
[] = {
4398 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4399 { &hf_tn5250_dsl_flag1
, ett_tn5250_wsf_dsl_mask
, 1, dsl_byte1
, 0 },
4400 { &hf_tn5250_dsl_id
, 0, 1, 0, ENC_BIG_ENDIAN
},
4401 { &hf_tn5250_dsl_location
, 0, 1, 0, ENC_BIG_ENDIAN
},
4402 { &hf_tn5250_dsl_function
, 0, 1, 0, ENC_BIG_ENDIAN
},
4403 { NULL
, 0, 0, 0, 0 }
4406 static int * const wts_byte1
[] = {
4407 &hf_tn5250_wts_flag1_0
,
4408 &hf_tn5250_wts_flag1_1
,
4409 &hf_tn5250_wts_flag1_2
,
4410 &hf_tn5250_wts_flag1_3
,
4411 &hf_tn5250_wts_flag1_reserved
,
4415 static int * const wts_byte2
[] = {
4416 &hf_tn5250_wts_flag2_reserved
,
4417 &hf_tn5250_wts_flag2_6
,
4418 &hf_tn5250_wts_flag2_reserved2
,
4422 static int * const wts_byte3
[] = {
4423 &hf_tn5250_wts_flag3_0
,
4424 &hf_tn5250_wts_flag3_1
,
4425 &hf_tn5250_wts_flag3_2
,
4426 &hf_tn5250_wts_flag3_3
,
4427 &hf_tn5250_wts_flag3_4
,
4428 &hf_tn5250_wts_flag3_5
,
4429 &hf_tn5250_wts_flag3_6
,
4430 &hf_tn5250_wts_flag3_7
,
4434 hf_items wts_fields
[] = {
4435 { &hf_tn5250_wts_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4436 { &hf_tn5250_wts_flag1
, ett_tn5250_wts_mask
, 1, wts_byte1
, 0 },
4437 { &hf_tn5250_wts_flag2
, ett_tn5250_wts_mask
, 1, wts_byte2
, 0 },
4438 { &hf_tn5250_wts_flag3
, ett_tn5250_wts_mask
, 1, wts_byte3
, 0 },
4439 { &hf_tn5250_wts_home_position_row
, 0, 2, 0, ENC_BIG_ENDIAN
},
4440 { &hf_tn5250_wts_home_position_col
, 0, 2, 0, ENC_BIG_ENDIAN
},
4441 { NULL
, 0, 0, 0, 0 }
4444 static int * const wts_cld_byte1
[] = {
4445 &hf_tn5250_wts_cld_flag1_0
,
4446 &hf_tn5250_wts_cld_flag1_1
,
4447 &hf_tn5250_wts_cld_flag1_2
,
4448 &hf_tn5250_wts_cld_flag1_3
,
4449 &hf_tn5250_wts_cld_flag1_4
,
4450 &hf_tn5250_wts_cld_flag1_5
,
4451 &hf_tn5250_wts_cld_flag1_6
,
4452 &hf_tn5250_wts_cld_flag1_7
,
4456 static int * const wts_cld_byte2
[] = {
4457 &hf_tn5250_wts_cld_flag2_0
,
4458 &hf_tn5250_wts_cld_flag2_1
,
4459 &hf_tn5250_wts_cld_flag2_2
,
4460 &hf_tn5250_wts_cld_flag2_3
,
4461 &hf_tn5250_wts_cld_flag2_4
,
4462 &hf_tn5250_wts_cld_flag2_line_spacing
,
4466 static int * const wts_cld_byte3
[] = {
4467 &hf_tn5250_wts_cld_flag3_0
,
4468 &hf_tn5250_wts_cld_flag3_1
,
4469 &hf_tn5250_wts_cld_flag3_2
,
4470 &hf_tn5250_wts_cld_flag3_3
,
4471 &hf_tn5250_wts_cld_flag3_4
,
4472 &hf_tn5250_wts_cld_flag3_5
,
4473 &hf_tn5250_wts_cld_flag3_6
,
4474 &hf_tn5250_wts_cld_flag3_7
,
4478 hf_items wts_line_data_fields
[] = {
4479 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
}, /*FIXME: Could be one or two bytes! */
4480 { &hf_tn5250_wts_cld_flag1
, ett_tn5250_wts_mask
, 1, wts_cld_byte1
, 0 },
4481 { &hf_tn5250_wts_cld_flag2
, ett_tn5250_wts_mask
, 1, wts_cld_byte2
, 0 },
4482 { &hf_tn5250_wts_cld_row
, 0, 2, 0, ENC_BIG_ENDIAN
},
4483 { &hf_tn5250_wts_cld_flag3
, ett_tn5250_wts_mask
, 1, wts_cld_byte3
, 0 },
4484 { &hf_tn5250_wts_cld_page_num
, 0, 2, 0, ENC_BIG_ENDIAN
},
4485 { &hf_tn5250_wts_cld_lmo
, 0, 1, 0, ENC_BIG_ENDIAN
},
4486 { &hf_tn5250_wts_cld_io
, 0, 1, 0, ENC_BIG_ENDIAN
},
4487 { &hf_tn5250_wts_cld_sli
, 0, 1, 0, ENC_BIG_ENDIAN
},
4488 { NULL
, 0, 0, 0, 0 }
4492 hf_items dsc_fields
[] = {
4493 { &hf_tn5250_dsc_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4494 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4495 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4496 { &hf_tn5250_dsc_sk
, 0, 1, 0, ENC_BIG_ENDIAN
},
4497 { &hf_tn5250_dsc_ev
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
4498 { NULL
, 0, 0, 0, 0 }
4501 hf_items dorm_fields
[] = {
4502 { &hf_tn5250_dorm_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4503 { &hf_tn5250_dorm_ec
, 0, 2, 0, ENC_BIG_ENDIAN
},
4504 { NULL
, 0, 0, 0, 0 }
4508 static int * const dfdpck_coreflag
[] = {
4509 &hf_tn5250_dfdpck_coreflag_0
,
4510 &hf_tn5250_dfdpck_coreflag_1
,
4511 &hf_tn5250_dfdpck_coreflag_2
,
4512 &hf_tn5250_dfdpck_coreflag_3
,
4513 &hf_tn5250_dfdpck_coreflag_4
,
4514 &hf_tn5250_dfdpck_coreflag_5
,
4515 &hf_tn5250_dfdpck_coreflag_6
,
4516 &hf_tn5250_dfdpck_coreflag_7
,
4520 static int * const dfdpck_toprowflag1
[] = {
4521 &hf_tn5250_dfdpck_toprowflag1_0
,
4522 &hf_tn5250_dfdpck_toprowflag1_1
,
4523 &hf_tn5250_dfdpck_toprowflag1_2
,
4524 &hf_tn5250_dfdpck_toprowflag1_3
,
4525 &hf_tn5250_dfdpck_toprowflag1_4
,
4526 &hf_tn5250_dfdpck_toprowflag1_5
,
4527 &hf_tn5250_dfdpck_toprowflag1_6
,
4528 &hf_tn5250_dfdpck_toprowflag1_7
,
4532 static int * const dfdpck_toprowflag2
[] = {
4533 &hf_tn5250_dfdpck_toprowflag2_0
,
4534 &hf_tn5250_dfdpck_toprowflag2_1
,
4535 &hf_tn5250_dfdpck_toprowflag2_2
,
4536 &hf_tn5250_dfdpck_toprowflag2_3
,
4537 &hf_tn5250_dfdpck_toprowflag2_4
,
4538 &hf_tn5250_dfdpck_toprowflag2_5
,
4539 &hf_tn5250_dfdpck_toprowflag2_6
,
4540 &hf_tn5250_dfdpck_toprowflag2_7
,
4544 static int * const dfdpck_toprowflag3
[] = {
4545 &hf_tn5250_dfdpck_toprowflag3_0
,
4546 &hf_tn5250_dfdpck_toprowflag3_1
,
4547 &hf_tn5250_dfdpck_toprowflag3_2
,
4548 &hf_tn5250_dfdpck_toprowflag3_3
,
4549 &hf_tn5250_dfdpck_toprowflag3_4
,
4550 &hf_tn5250_dfdpck_toprowflag3_5
,
4551 &hf_tn5250_dfdpck_toprowflag3_6
,
4552 &hf_tn5250_dfdpck_toprowflag3_7
,
4556 hf_items dfdpck_fields
[] = {
4557 { &hf_tn5250_dfdpck_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4558 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4559 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4560 { NULL
, 0, 0, 0, 0 }
4563 hf_items dfdpck_core_area_fields
[] = {
4564 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4565 { &hf_tn5250_dfdpck_data_field
, 0, 1, 0, ENC_BIG_ENDIAN
},
4566 { &hf_tn5250_dfdpck_coreflag
, ett_tn5250_dfdpck_mask
, 1, dfdpck_coreflag
, 0 },
4567 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4568 { NULL
, 0, 0, 0, 0 }
4571 hf_items dfdpck_top_row_fields
[] = {
4572 { &hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4573 { &hf_tn5250_dfdpck_data_field
, 0, 1, 0, ENC_BIG_ENDIAN
},
4574 { &hf_tn5250_dfdpck_toprowflag1
, ett_tn5250_dfdpck_mask
, 1, dfdpck_toprowflag1
, 0 },
4575 { &hf_tn5250_dfdpck_toprowflag2
, ett_tn5250_dfdpck_mask
, 1, dfdpck_toprowflag2
, 0 },
4576 { &hf_tn5250_dfdpck_toprowflag3
, ett_tn5250_dfdpck_mask
, 1, dfdpck_toprowflag3
, 0 },
4577 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4578 { NULL
, 0, 0, 0, 0 }
4581 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
4582 sf_length
= tvb_get_ntohs(tvb
,offset
);
4583 type
= tvb_get_uint8(tvb
, offset
+3);
4585 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, standard_fields
);
4589 proto_tree_add_item(tn5250_tree
, hf_tn5250_field_data
, tvb
, offset
,
4590 (sf_length
- (start
+ offset
)), ENC_EBCDIC
);
4591 offset
+= (uint32_t)(sf_length
- (start
+ offset
));
4594 proto_tree_add_item(tn5250_tree
, hf_tn5250_reserved
, tvb
, offset
,
4598 case TN5250_QUERY_STATION_STATE
:
4599 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, qss_fields
);
4601 case DEFINE_AUDIT_WINDOW__TABLE
:
4602 proto_tree_add_item(tn5250_tree
, hf_tn5250_dawt_id
, tvb
, offset
,
4605 while ((offset
- start
) < sf_length
) {
4606 length
= tvb_get_uint8(tvb
,offset
);
4607 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, dawt_fields
);
4609 /* XXX - expert info on the length field */
4612 proto_tree_add_item(tn5250_tree
, hf_tn5250_dawt_message
, tvb
, offset
,
4613 (length
- 2), ENC_EBCDIC
);
4617 case DEFINE_COMMAND_KEY_FUNCTION
:
4618 proto_tree_add_item(tn5250_tree
, hf_tn5250_dckf_id
, tvb
, offset
,
4621 while ((offset
- start
) < sf_length
) {
4622 length
= tvb_get_uint8(tvb
,offset
);
4623 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4626 /* XXX - expert info on the length field */
4629 proto_tree_add_item(tn5250_tree
, hf_tn5250_dckf_prompt_text
, tvb
,
4630 offset
, (length
- 2), ENC_EBCDIC
);
4634 case READ_TEXT_SCREEN
:
4635 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, rts_fields
);
4637 case DEFINE_PENDING_OPERATIONS
:
4638 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, dpo_fields
);
4640 case DEFINE_TEXT_SCREEN_FORMAT
:
4641 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, dtsf_fields
);
4643 case DEFINE_SCALE_LINE
:
4644 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, dsl_fields
);
4645 while ((offset
- start
) < sf_length
) {
4646 /* XXX length unused
4647 length = tvb_get_uint8(tvb,offset); */
4648 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, dsl_fields2
);
4651 case WRITE_TEXT_SCREEN
:
4652 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4654 length
= tvb_get_uint8(tvb
,offset
);
4655 used
= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4656 wts_line_data_fields
);
4658 if (length
< used
) {
4659 /* XXX - expert info on the length field */
4662 proto_tree_add_item(tn5250_tree
, hf_tn5250_wts_cld_li
, tvb
, offset
,
4663 (length
- used
), ENC_EBCDIC
);
4665 case DEFINE_SPECIAL_CHARACTERS
:
4666 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4669 case DEFINE_OPERATOR_ERROR_MESSAGES
:
4670 proto_tree_add_item(tn5250_tree
, hf_tn5250_dorm_id
, tvb
, offset
,
4673 while ((offset
- start
) < sf_length
) {
4674 length
= tvb_get_uint8(tvb
,offset
);
4675 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4678 /* XXX - expert info on the length field */
4681 proto_tree_add_item(tn5250_tree
, hf_tn5250_dorm_mt
, tvb
, offset
,
4682 (length
- 2), ENC_EBCDIC
);
4686 case DEFINE_PITCH_TABLE
:
4687 proto_tree_add_item(tn5250_tree
, hf_tn5250_dpt_id
, tvb
, offset
,
4690 while ((offset
- start
) < sf_length
) {
4691 proto_tree_add_item(tn5250_tree
, hf_tn5250_length
, tvb
, offset
,
4695 * XXX - the documentation cited above says this is a
4696 * "4-byte EBCDIC code for the value of text pitch that is
4697 * displayed on the status line". Does that mean that
4698 * each of these entries is 5 bytes long?
4700 proto_tree_add_item(tn5250_tree
, hf_tn5250_dpt_ec
, tvb
, offset
,
4705 case DEFINE_FAKE_DP_COMMAND_KEY_FUNCTION
:
4706 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4708 while ((offset
- start
) < sf_length
) {
4709 length
= tvb_get_uint8(tvb
,offset
);
4710 type
= tvb_get_uint8(tvb
,offset
+1);
4711 if (type
== CORE_AREA_COMMAND_KEYS
) {
4712 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4713 dfdpck_core_area_fields
);
4714 } else if (type
== TOP_ROW_COMMAND_KEYS
) {
4715 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4716 dfdpck_top_row_fields
);
4720 step
= dissect_unknown_data(tn5250_tree
, tvb
, offset
, start
, length
);
4733 offset
+= dissect_unknown_data(tn5250_tree
, tvb
, offset
, start
, sf_length
);
4735 return (offset
- start
);
4738 /* 15.27.2 5250 Query Command - Response */
4739 /*TN5250 - RFC1205 - Query Reply Fields */
4741 dissect_query_reply(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
4745 static int * const byte
[] = {
4746 &hf_tn5250_qr_flag_0
,
4747 &hf_tn5250_qr_flag_reserved
,
4751 static int * const byte1
[] = {
4752 &hf_tn5250_qr_flag1_0
,
4753 &hf_tn5250_qr_flag1_1
,
4754 &hf_tn5250_qr_flag1_2
,
4755 &hf_tn5250_qr_flag1_3
,
4756 &hf_tn5250_qr_flag1_4
,
4757 &hf_tn5250_qr_flag1_5
,
4758 &hf_tn5250_qr_flag1_6
,
4759 &hf_tn5250_qr_flag1_7
,
4763 static int * const byte2
[] = {
4764 &hf_tn5250_qr_flag2_0to3
,
4765 &hf_tn5250_qr_flag2_4
,
4766 &hf_tn5250_qr_flag2_5
,
4767 &hf_tn5250_qr_flag2_6to7
,
4771 hf_items qr_fields
[] = {
4772 { &hf_tn5250_sf_length
, 0, 2, 0, ENC_BIG_ENDIAN
},
4773 { &hf_tn5250_sf_class
, 0, 1, 0, ENC_BIG_ENDIAN
},
4774 { &hf_tn5250_sf_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
4775 { &hf_tn5250_qr_flag
, ett_tn5250_qr_mask
, 1, byte
, 0 },
4776 { &hf_tn5250_qr_chc
, 0, 2, 0, ENC_BIG_ENDIAN
},
4777 { &hf_tn5250_qr_ccl
, 0, 3, 0, ENC_BIG_ENDIAN
},
4778 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4779 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4780 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4781 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4782 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4783 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4784 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4785 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4786 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4787 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4788 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4789 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4790 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4791 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4792 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4793 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4794 { &hf_tn5250_qr_dt
, 0, 1, 0, ENC_BIG_ENDIAN
},
4795 { &hf_tn5250_qr_dtc
, 0, 4, 0, ENC_EBCDIC
|ENC_NA
},
4796 { &hf_tn5250_qr_dm
, 0, 3, 0, ENC_EBCDIC
|ENC_NA
},
4797 { &hf_tn5250_qr_ki
, 0, 1, 0, ENC_BIG_ENDIAN
},
4798 { &hf_tn5250_qr_eki
, 0, 1, 0, ENC_BIG_ENDIAN
},
4799 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4800 { &hf_tn5250_qr_dsn
, 0, 4, 0, ENC_BIG_ENDIAN
},
4801 { &hf_tn5250_qr_mni
, 0, 2, 0, ENC_BIG_ENDIAN
},
4802 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4803 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4804 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4805 { &hf_tn5250_qr_flag1
, ett_tn5250_qr_mask
, 1, byte1
, 0 },
4806 { &hf_tn5250_qr_flag2
, ett_tn5250_qr_mask
, 1, byte2
, 0 },
4807 { &hf_tn5250_qr_flag3
, 0, 1, 0, ENC_BIG_ENDIAN
},
4808 { &hf_tn5250_qr_flag4
, 0, 1, 0, ENC_BIG_ENDIAN
},
4809 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4810 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4811 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4812 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4813 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4814 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4815 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4816 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4817 { NULL
, 0, 0, 0, 0 }
4821 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, qr_fields
);
4823 return (offset
- start
);
4826 /* End: Handle WCC, Orders and Data */
4830 dissect_tn5250_header(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
4836 static int * const byte
[] = {
4837 &hf_tn5250_ds_output_error
,
4838 &hf_tn5250_attn_key
,
4839 &hf_tn5250_sys_request_key
,
4840 &hf_tn5250_test_request_key
,
4841 &hf_tn5250_error_state
,
4845 hf_items fields
[] = {
4846 { &hf_tn5250_logical_record_length
, 0, 2, 0, ENC_BIG_ENDIAN
},
4847 { &hf_tn5250_sna_record_type
, 0, 2, 0, ENC_BIG_ENDIAN
},
4848 { &hf_tn5250_reserved
, 0, 2, 0, ENC_BIG_ENDIAN
},
4849 { &hf_tn5250_variable_record_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4850 { &hf_tn5250_header_flags
, ett_tn5250_header_flags
, 1, byte
, 0 },
4851 { &hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4852 { &hf_tn5250_operation_code
, 0, 1, 0, ENC_BIG_ENDIAN
},
4853 { NULL
, 0, 0, 0, 0 }
4856 error_flag
= tvb_get_uint8(tvb
, offset
+8);
4858 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, fields
);
4860 if (error_flag
& 0x02) { /*HLP*/
4861 proto_tree_add_item(tn5250_tree
, hf_tn5250_error_code
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4864 return (offset
- start
);
4869 /* Detect and Handle Direction of Stream */
4871 dissect_tn5250_data_until_next_command(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, int offset
)
4873 int order_code
, done
= 0;
4876 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
4877 order_code
= tvb_get_uint8(tvb
, offset
);
4878 switch (order_code
) {
4880 case CLEAR_FORMAT_TABLE
:
4881 case CLEAR_UNIT_ALTERNATE
:
4882 case WRITE_TO_DISPLAY
:
4883 case WRITE_ERROR_CODE
:
4884 case RESTORE_SCREEN
:
4885 case WRITE_ERROR_CODE_TO_WINDOW
:
4886 case READ_INPUT_FIELDS
:
4887 case READ_MDT_FIELDS
:
4888 case READ_MDT_ALTERNATE
:
4890 case READ_SCREEN_WITH_EXTENDED_ATTRIBUTES
:
4891 case READ_SCREEN_TO_PRINT
:
4892 case READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES
:
4893 case READ_SCREEN_TO_PRINT_WITH_GRIDLINES
:
4894 case READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES_AND_GRIDLINES
:
4895 case READ_IMMEDIATE
:
4896 case READ_MODIFIED_IMMEDIATE_ALTERNATE
:
4898 case SAVE_PARTIAL_SCREEN
:
4899 case RESTORE_PARTIAL_SCREEN
:
4901 case WRITE_SINGLE_STRUCTURED_FIELD
:
4902 case WRITE_STRUCTURED_FIELD
:
4903 case COPY_TO_PRINTER
:
4912 if (offset
> start
) {
4913 proto_tree_add_item(tn5250_tree
, hf_tn5250_field_data
,
4914 tvb
, start
, (offset
- start
), ENC_EBCDIC
);
4917 return (offset
- start
);
4922 // NOLINTNEXTLINE(misc-no-recursion)
4923 dissect_outbound_stream(proto_tree
*tn5250_tree
, packet_info
*pinfo
, tvbuff_t
*tvb
, int offset
)
4926 int start
= offset
, length
= 0;
4927 proto_tree
*cc_tree
;
4928 proto_item
*ti
, *item
;
4931 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_escape_code
, tvb
, offset
, 1,
4934 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
4937 command_code
= tvb_get_uint8(tvb
, offset
);
4938 item
= proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4942 switch (command_code
) {
4944 case CLEAR_FORMAT_TABLE
:
4946 case CLEAR_UNIT_ALTERNATE
:
4947 proto_tree_add_item(cc_tree
, hf_tn5250_cua_parm
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4950 case WRITE_TO_DISPLAY
:
4952 offset
+= dissect_wcc(cc_tree
, tvb
, offset
);
4953 offset
+= dissect_tn5250_orders_and_data(cc_tree
, tvb
, offset
);
4955 case WRITE_ERROR_CODE
:
4956 /* Check for the optional TN5250_IC */
4957 offset
+= dissect_tn5250_orders_and_data(cc_tree
, tvb
, offset
);
4958 /* Add Field Data */
4959 proto_tree_add_item(cc_tree
, hf_tn5250_fa
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4961 proto_tree_add_item(cc_tree
, hf_tn5250_field_data
, tvb
, offset
,
4962 tvb_reported_length_remaining(tvb
, offset
) - 1,
4964 offset
+= (uint32_t)(tvb_reported_length_remaining(tvb
, offset
) - 1);
4965 proto_tree_add_item(cc_tree
, hf_tn5250_fa
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4968 case RESTORE_SCREEN
:
4969 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
4970 increment_dissection_depth(pinfo
);
4971 offset
+= dissect_outbound_stream(cc_tree
, pinfo
, tvb
, offset
);
4972 decrement_dissection_depth(pinfo
);
4975 case WRITE_ERROR_CODE_TO_WINDOW
:
4976 proto_tree_add_item(cc_tree
, hf_tn5250_wectw_start_column
, tvb
, offset
,
4979 proto_tree_add_item(cc_tree
, hf_tn5250_wectw_end_column
, tvb
, offset
, 1,
4983 case READ_INPUT_FIELDS
:
4984 case READ_MDT_FIELDS
:
4985 case READ_MDT_ALTERNATE
:
4986 offset
+= dissect_wcc(cc_tree
, tvb
, offset
);
4989 case READ_SCREEN_WITH_EXTENDED_ATTRIBUTES
:
4990 case READ_SCREEN_TO_PRINT
:
4991 case READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES
:
4992 case READ_SCREEN_TO_PRINT_WITH_GRIDLINES
:
4993 case READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES_AND_GRIDLINES
:
4994 case READ_IMMEDIATE
:
4995 case READ_MODIFIED_IMMEDIATE_ALTERNATE
:
4998 case SAVE_PARTIAL_SCREEN
:
4999 offset
+= dissect_save_partial_screen(cc_tree
, tvb
, offset
);
5001 case RESTORE_PARTIAL_SCREEN
:
5002 length
= tvb_get_ntohs(tvb
, offset
);
5003 proto_tree_add_item(cc_tree
, hf_tn5250_length_twobyte
, tvb
, offset
, 2,
5006 offset
+= dissect_tn5250_orders_and_data(cc_tree
, tvb
, offset
);
5007 proto_tree_add_item(cc_tree
, hf_tn5250_field_data
, tvb
, offset
,
5008 (length
- 2), ENC_EBCDIC
);
5012 offset
+= dissect_roll(cc_tree
, tvb
, offset
);
5014 case WRITE_SINGLE_STRUCTURED_FIELD
:
5015 offset
+= dissect_write_single_structured_field(cc_tree
, tvb
, offset
);
5017 case WRITE_STRUCTURED_FIELD
:
5018 offset
+= dissect_write_structured_field(cc_tree
, tvb
, offset
);
5020 case COPY_TO_PRINTER
:
5021 proto_tree_add_item(cc_tree
, hf_tn5250_ctp_lsid
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5023 proto_tree_add_item(cc_tree
, hf_tn5250_ctp_mlpp
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5027 expert_add_info(pinfo
, item
, &ei_tn5250_command_code
);
5032 return (offset
- start
);
5036 dissect_inbound_stream(proto_tree
*tn5250_tree
, packet_info
*pinfo
, tvbuff_t
*tvb
, int offset
, int sna_flag
)
5038 int start
= offset
, aid
;
5042 if (sna_flag
& 0x01) { /* Stream contains error code */
5043 proto_tree_add_item(tn5250_tree
, hf_tn5250_error_code
, tvb
, offset
, 2,
5046 return (offset
- start
);
5047 } else if (sna_flag
& 0x80) { /* Stream contains negative response */
5048 proto_tree_add_item(tn5250_tree
, hf_tn5250_negative_response
,
5049 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
5051 return (offset
- start
);
5054 aid
= tvb_get_uint8(tvb
,offset
+2);
5055 if (tn5250_is_valid_aid(aid
)) {
5057 case AID_IMAGE_FAX_REQUEST
:
5058 case AID_UNKNOWN_IMAGE_FAX_FORMAT
:
5059 case AID_IMAGE_FAX_ERROR
:
5060 proto_tree_add_item(tn5250_tree
, hf_tn5250_image_fax_error
, tvb
, offset
,
5065 /*Response must be a normal row/col, aid, field data response */
5066 offset
+= dissect_row_column(tn5250_tree
, tvb
, offset
);
5070 proto_tree_add_item(tn5250_tree
, hf_tn5250_aid
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5073 if (aid
== AID_INBOUND_WRITE_STRUCTURED_FIELD
) {
5074 offset
+= dissect_query_reply(tn5250_tree
, tvb
, offset
);
5075 return (offset
- start
);
5077 /* Check for a response containing order codes */
5078 offset
+= dissect_tn5250_orders_and_data(tn5250_tree
, tvb
, offset
);
5080 /* FIXME: need to know when escape/commands are expected. */
5081 /* Check the response data for commands */
5082 if (tvb_get_uint8(tvb
,offset
) == TN5250_ESCAPE
) {
5083 commands
= dissect_outbound_stream(tn5250_tree
, pinfo
, tvb
, offset
);
5084 /* It if contained commands then we're done. Anything else is unexpected data */
5087 if (tvb_reported_length_remaining(tvb
, offset
)) {
5088 proto_tree_add_item(tn5250_tree
, hf_tn5250_unknown_data
, tvb
, offset
,
5089 tvb_reported_length_remaining(tvb
, offset
), ENC_NA
);
5090 offset
+= tvb_reported_length_remaining(tvb
, offset
);
5092 return (offset
- start
);
5097 /* Anything else is unformatted field data */
5098 if (tvb_reported_length_remaining(tvb
, offset
)) {
5099 proto_tree_add_item(tn5250_tree
, hf_tn5250_field_data
, tvb
, offset
,
5100 tvb_reported_length_remaining(tvb
, offset
),
5102 offset
+= tvb_reported_length_remaining(tvb
, offset
);
5105 return (offset
- start
);
5109 dissect_tn5250(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
5111 proto_tree
*tn5250_tree
;
5114 conversation_t
*conversation
;
5115 tn5250_conv_info_t
*tn5250_info
= NULL
;
5118 /* Do we have a conversation for this connection? */
5119 conversation
= find_conversation_pinfo(pinfo
, 0);
5120 if (conversation
!= NULL
) {
5121 /* Do we already have a type and mechanism? */
5122 tn5250_info
= (tn5250_conv_info_t
*)conversation_get_proto_data(conversation
, proto_tn5250
);
5128 pinfo
->fd
->encoding
= PACKET_CHAR_ENC_CHAR_EBCDIC
;
5130 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "TN5250");
5132 ti
= proto_tree_add_item(tree
, proto_tn5250
, tvb
, offset
, -1, ENC_NA
);
5133 tn5250_tree
= proto_item_add_subtree(ti
, ett_tn5250
);
5134 if (pinfo
->srcport
== tn5250_info
->outbound_port
) {
5135 col_set_str(pinfo
->cinfo
, COL_INFO
, "TN5250 Data from Mainframe");
5137 col_set_str(pinfo
->cinfo
, COL_INFO
, "TN5250 Data to Mainframe");
5141 sna_flag
= tvb_get_ntohs(tvb
, offset
+6);
5142 offset
+= dissect_tn5250_header(tn5250_tree
, tvb
, offset
);
5144 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
5145 if (pinfo
->srcport
== tn5250_info
->outbound_port
) {
5146 offset
+= dissect_outbound_stream(tn5250_tree
, pinfo
, tvb
, offset
);
5148 offset
+= dissect_inbound_stream(tn5250_tree
, pinfo
, tvb
, offset
, sna_flag
);
5153 return tvb_captured_length(tvb
);
5157 add_tn5250_conversation(packet_info
*pinfo
, int tn5250e
)
5159 conversation_t
*conversation
;
5160 tn5250_conv_info_t
*tn5250_info
= NULL
;
5162 conversation
= find_or_create_conversation(pinfo
);
5165 * Do we already have a type and mechanism?
5167 tn5250_info
= (tn5250_conv_info_t
*)conversation_get_proto_data(conversation
, proto_tn5250
);
5168 if (tn5250_info
== NULL
) {
5169 /* No. Attach that information to the conversation, and add
5170 * it to the list of information structures.
5172 tn5250_info
= wmem_new(wmem_file_scope(), tn5250_conv_info_t
);
5173 tn5250_info
->outbound_port
= pinfo
->destport
;
5174 conversation_add_proto_data(conversation
, proto_tn5250
, tn5250_info
);
5177 tn5250_info
->extended
= tn5250e
;
5182 find_tn5250_conversation(packet_info
*pinfo
)
5184 conversation_t
*conversation
= NULL
;
5185 tn5250_conv_info_t
*tn5250_info
= NULL
;
5188 * Do we have a conversation for this connection?
5190 conversation
= find_conversation_pinfo(pinfo
, 0);
5192 if (conversation
!= NULL
) {
5193 tn5250_info
= (tn5250_conv_info_t
*)conversation_get_proto_data(conversation
, proto_tn5250
);
5195 if (tn5250_info
!= NULL
) {
5197 * Do we already have a type and mechanism?
5206 proto_register_tn5250(void)
5208 static hf_register_info hf
[] = {
5209 { &hf_tn5250_escape_code
,
5210 { "Escape Code", "tn5250.escape_code",
5211 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_escape_codes
), 0x0,
5213 { &hf_tn5250_command_code
,
5214 { "Command Code", "tn5250.command_code",
5215 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_command_codes
), 0x0,
5217 { &hf_tn5250_sf_length
,
5218 { "Structured Field Length", "tn5250.sf_length",
5219 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5221 { &hf_tn5250_sf_class
,
5222 { "Structured Field Class", "tn5250.class",
5223 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_sf_class
), 0,
5225 { &hf_tn5250_sf_type
,
5226 { "Structured Field Type", "tn5250.type",
5227 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_sf_type
), 0,
5230 /* 15.4 - Clear Unit Alternate Command Code*/
5231 { &hf_tn5250_cua_parm
,
5232 { "TN5250 CUA Parameter", "tn5250.cua_parm",
5233 FT_UINT16
, BASE_HEX
, VALS(vals_tn5250_cua_parms
), 0x0,
5236 /* 15.6 Write To Display Command Code */
5237 /* 15.6.1 WTD Control Code */
5238 { &hf_tn5250_wtd_ccc1
,
5239 {"Write To Display Command Control Character Byte 1", "tn5250.wtd_ccc1",
5241 VALS (vals_tn5250_wtd_cc_byteone
), CCBITS
, NULL
, HFILL
}},
5242 { &hf_tn5250_wtd_ccc2
,
5243 { "Write To Display Command Control Character Byte 2", "tn5250.wtd_ccc2",
5244 FT_UINT8
, BASE_HEX
, NULL
, 0,
5246 { &hf_tn5250_wtd_ccc2_res
,
5248 "tn5250.wtd_ccc_reserved", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
5249 { &hf_tn5250_wtd_ccc2_cursor
,
5250 { "Cursor does not move when keyboard unlocks",
5251 "tn5250.wtd_ccc_cursor", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
5252 { &hf_tn5250_wtd_ccc2_reset
,
5253 { "Reset blinking cursor",
5254 "tn5250.wtd_ccc_reset", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
5255 { &hf_tn5250_wtd_ccc2_set
,
5256 { "Set blinking cursor",
5257 "tn5250.wtd_ccc_set", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
5258 { &hf_tn5250_wtd_ccc2_unlock
,
5259 { "Unlock the keyboard and reset any pending AID bytes",
5260 "tn5250.wtd_ccc_unlock", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
5261 { &hf_tn5250_wtd_ccc2_alarm
,
5263 "tn5250.wtd_ccc_alarm", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
5264 { &hf_tn5250_wtd_ccc2_off
,
5265 { "Set Message Waiting indicator off",
5266 "tn5250.wtd_ccc_off", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
5267 { &hf_tn5250_wtd_ccc2_on
,
5268 { "Set Message Waiting indicator on",
5269 "tn5250.wtd_ccc_on", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
5272 /* 15.6.7 Repeat to Address Order */
5273 { &hf_tn5250_repeated_character
,
5274 { "Repeated Character", "tn5250.repeated_character",
5275 FT_STRING
, BASE_NONE
, NULL
, 0x0,
5278 /* 15.6.9 Start of Header Order */
5279 { &hf_tn5250_soh_length
,
5280 { "Length", "tn5250.soh_length",
5281 FT_UINT8
, BASE_DEC
, NULL
, 0,
5283 { &hf_tn5250_soh_flags
,
5284 { "Start of Header Flags", "tn5250.soh_flags",
5285 FT_UINT8
, BASE_HEX
, NULL
, 0,
5287 { &hf_tn5250_soh_cursor_direction
,
5288 { "Right To Left Screen-Level Cursor Direction", "tn5250.soh_cursor_direction",
5289 FT_BOOLEAN
, 8, NULL
, 0x80,
5291 { &hf_tn5250_soh_screen_reverse
,
5292 { "Automatic local screen reverse", "tn5250.soh_screen_reverse",
5293 FT_BOOLEAN
, 8, NULL
, 0x20,
5295 { &hf_tn5250_soh_input_capable_only
,
5296 { "The cursor is allowed to move only to input-capable positions", "tn5250.soh_input_capable_only",
5297 FT_BOOLEAN
, 8, NULL
, 0x10,
5300 { &hf_tn5250_soh_pf24to17
, { "Command Key Switch 1", "tn5250.soh_pf24to17",
5301 FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
5302 { &hf_tn5250_soh_pf24
, { "PF24", "tn5250.soh_pf24",
5303 FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
5304 { &hf_tn5250_soh_pf23
, { "PF23", "tn5250.soh_pf23",
5305 FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
5306 { &hf_tn5250_soh_pf22
, { "PF22", "tn5250.soh_pf22",
5307 FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
5308 { &hf_tn5250_soh_pf21
, { "PF21", "tn5250.soh_pf21",
5309 FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
5310 { &hf_tn5250_soh_pf20
, { "PF20", "tn5250.soh_pf20",
5311 FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
5312 { &hf_tn5250_soh_pf19
, { "PF19", "tn5250.soh_pf19",
5313 FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
5314 { &hf_tn5250_soh_pf18
, { "PF18", "tn5250.soh_pf18",
5315 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
5316 { &hf_tn5250_soh_pf17
, { "PF17", "tn5250.soh_pf17",
5317 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
5319 { &hf_tn5250_soh_pf16to9
, { "Command Key Switch 2", "tn5250.soh_pf16to9",
5320 FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
5321 { &hf_tn5250_soh_pf16
, { "PF16", "tn5250.soh_pf16",
5322 FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
5323 { &hf_tn5250_soh_pf15
, { "PF15", "tn5250.soh_pf15",
5324 FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
5325 { &hf_tn5250_soh_pf14
, { "PF14", "tn5250.soh_pf14",
5326 FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
5327 { &hf_tn5250_soh_pf13
, { "PF13", "tn5250.soh_pf13",
5328 FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
5329 { &hf_tn5250_soh_pf12
, { "PF12", "tn5250.soh_pf12",
5330 FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
5331 { &hf_tn5250_soh_pf11
, { "PF11", "tn5250.soh_pf11",
5332 FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
5333 { &hf_tn5250_soh_pf10
, { "PF10", "tn5250.soh_pf10",
5334 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
5335 { &hf_tn5250_soh_pf9
, { "PF9", "tn5250.soh_pf9",
5336 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
5338 { &hf_tn5250_soh_pf8to1
, { "Command Key Switch 3", "tn5250.soh_pf8to1",
5339 FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
5340 { &hf_tn5250_soh_pf8
, { "PF8", "tn5250.soh_pf8",
5341 FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
5342 { &hf_tn5250_soh_pf7
, { "PF7", "tn5250.soh_pf7",
5343 FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
5344 { &hf_tn5250_soh_pf6
, { "PF6", "tn5250.soh_pf6",
5345 FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
5346 { &hf_tn5250_soh_pf5
, { "PF5", "tn5250.soh_pf5",
5347 FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
5348 { &hf_tn5250_soh_pf4
, { "PF4", "tn5250.soh_pf4",
5349 FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
5350 { &hf_tn5250_soh_pf3
, { "PF3", "tn5250.soh_pf3",
5351 FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
5352 { &hf_tn5250_soh_pf2
, { "PF2", "tn5250.soh_pf2",
5353 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
5354 { &hf_tn5250_soh_pf1
, { "PF1", "tn5250.soh_pf1",
5355 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
5357 { &hf_tn5250_soh_resq
, { "Resequence to Field", "tn5250.soh_resq",
5358 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5359 { &hf_tn5250_soh_err
, { "Error Row", "tn5250.soh_err",
5360 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5363 /* 15.6.11.1 Write Extended Attribute Order - Extended Primary Attribute*/
5364 /* 15.6.12.3 Start of Field Order - Field Attribute*/
5365 { &hf_tn5250_wea_prim_attr
,
5366 { "Extended Primary Attributes", "tn5250.wea_prim_attr",
5367 FT_UINT8
, BASE_HEX
, NULL
, 0,
5369 { &hf_tn5250_wea_prim_attr_flag
,
5370 { "Attribute Change",
5371 "tn5250.wea_prim_attr_flag", FT_BOOLEAN
, 8, NULL
,
5372 0x80, NULL
, HFILL
}},
5373 { &hf_tn5250_wea_prim_attr_col
,
5374 { "Column Separator",
5375 "tn5250.wea_prim_attr_col", FT_BOOLEAN
, 8,
5376 TFS(&tn5250_field_attr_col
), 0x10, NULL
, HFILL
}},
5377 { &hf_tn5250_wea_prim_attr_blink
,
5379 "tn5250.wea_prim_attr_blink", FT_BOOLEAN
, 8,
5380 TFS(&tn5250_field_attr_blink
), 0x08, NULL
, HFILL
}},
5381 { &hf_tn5250_wea_prim_attr_und
,
5383 "tn5250.wea_prim_attr_und", FT_BOOLEAN
, 8,
5384 TFS(&tn5250_field_attr_und
), 0x04, NULL
, HFILL
}},
5385 { &hf_tn5250_wea_prim_attr_int
,
5387 "tn5250.wea_prim_attr_int", FT_BOOLEAN
, 8,
5388 TFS(&tn5250_field_attr_int
), 0x02, NULL
, HFILL
}},
5389 { &hf_tn5250_wea_prim_attr_rev
,
5391 "tn5250.wea_prim_attr_rev", FT_BOOLEAN
, 8,
5392 TFS(&tn5250_field_attr_rev
), 0x01, NULL
, HFILL
}},
5394 /* 15.6.11.2 Write Extended Attribute Order - Foreground Color Attribute*/
5395 { &hf_tn5250_foreground_color_attr
,
5396 { "Foreground Color Attribute", "tn5250.foreground_color_attr",
5397 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_foreground_color_attributes
), 0x0,
5399 /* 15.6.11.3 Write Extended Attribute Order - Ideographic Attribute*/
5400 { &hf_tn5250_ideographic_attr
,
5401 { "Ideographic Attribute", "tn5250.ideographic_attr",
5402 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_ideographic_attributes
), 0x0,
5405 /* 15.6.12 Start of Field Order - Field Format Word */
5407 { "Field Format Word", "tn5250.ffw",
5408 FT_UINT8
, BASE_HEX
, NULL
, 0,
5410 { &hf_tn5250_ffw_id
,
5411 { "Field Format Word ID", "tn5250.ffw_id", FT_UINT8
, BASE_HEX
,
5412 VALS(vals_tn5250_ffw_id
), FFW_ID_BITS
, NULL
, HFILL
}},
5413 { &hf_tn5250_ffw_bypass
,
5414 { "Bypass", "tn5250.ffw_bypass",
5415 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_bypass
),
5416 0x20, NULL
, HFILL
}},
5417 { &hf_tn5250_ffw_dup
,
5418 { "Dupe or Field Mark Enable", "tn5250.ffw_dup",
5419 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_dup
),
5420 0x10, NULL
, HFILL
}},
5421 { &hf_tn5250_ffw_mdt
,
5422 { "Modified Data Tag", "tn5250.ffw_mdt",
5423 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_mdt
),
5424 0x08, NULL
, HFILL
}},
5425 { &hf_tn5250_ffw_shift
,
5426 { "Field Shift/Edit Specification", "tn5250.ffw_shift", FT_UINT8
, BASE_HEX
,
5427 VALS(vals_tn5250_ffw_shift
), FFW_SHIFT_BITS
, NULL
, HFILL
}},
5428 { &hf_tn5250_ffw_auto
,
5429 { "Auto Enter", "tn5250.ffw_auto",
5430 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_auto
),
5431 0x80, NULL
, HFILL
}},
5432 { &hf_tn5250_ffw_fer
,
5433 { "Field Exit Required", "tn5250.ffw_fer",
5434 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_fer
),
5435 0x40, NULL
, HFILL
}},
5436 { &hf_tn5250_ffw_monocase
,
5437 { "Monocase", "tn5250.ffw_monocase",
5438 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_monocase
),
5439 0x20, NULL
, HFILL
}},
5440 { &hf_tn5250_ffw_res
,
5441 { "Reserved", "tn5250.ffw_res",
5442 FT_BOOLEAN
, 8, NULL
,
5443 0x10, NULL
, HFILL
}},
5444 { &hf_tn5250_ffw_me
,
5445 { "Mandatory Enter", "tn5250.ffw_me",
5446 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_me
),
5447 0x08, NULL
, HFILL
}},
5448 { &hf_tn5250_ffw_adjust
,
5449 { "Right Adjust/Mandatory Fill", "tn5250.ffw_adjust", FT_UINT8
, BASE_HEX
,
5450 VALS(vals_tn5250_ffw_adjust
), FFW_ADJUST_BITS
, NULL
, HFILL
}},
5453 { "Field Control Word", "tn5250.fcw",
5454 FT_UINT16
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_fcw
), 0,
5457 { &hf_tn5250_fa_color
,
5458 { "Field Attribute (Color)", "tn5250.fa_color",
5459 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5462 { "Field Attributes", "tn5250.sf_fa",
5463 FT_UINT8
, BASE_HEX
, NULL
, 0,
5465 { &hf_tn5250_sf_attr_flag
,
5467 "tn5250.sf_attr_flag", FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_id
), FA_ID_BITS
, NULL
, HFILL
}},
5468 /* Use Attribute Field fields from 14.6.11.1 for rest of attribute fields */
5470 /* 15.6.13 Write to Display Structured Field Order */
5472 /* 15.6.13.1 Write to Display Structured Field Order - Create Window */
5473 { &hf_tn5250_wdsf_cw_flag1
,
5474 { "Flags", "tn5250.wdsf_cw_flag1",
5475 FT_UINT8
, BASE_HEX
, NULL
, 0,
5477 { &hf_tn5250_wdsf_cw_flag1_1
,
5478 { "Flag 1", "tn5250.wdsf_cw_flag1_1",
5479 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_cw_flag1_1
),
5480 0x80, NULL
, HFILL
}},
5481 { &hf_tn5250_wdsf_cw_flag1_2
,
5482 { "Flag 2", "tn5250.wdsf_cw_flag1_2",
5483 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_cw_flag1_2
),
5484 0x40, NULL
, HFILL
}},
5485 { &hf_tn5250_wdsf_cw_flag1_reserved
,
5486 { "Reserved", "tn5250.wdsf_cw_flag1_reserved", FT_UINT8
, BASE_HEX
,
5487 NULL
, 0x3F, NULL
, HFILL
}},
5488 { &hf_tn5250_wdsf_cw_wd
,
5489 { "Window Depth", "tn5250.wdsf_cw_wd",
5490 FT_UINT8
, BASE_DEC
, NULL
, 0,
5492 { &hf_tn5250_wdsf_cw_ww
,
5493 { "Window Width", "tn5250.wdsf_cw_ww",
5494 FT_UINT8
, BASE_DEC
, NULL
, 0,
5497 { &hf_tn5250_wdsf_cw_minor_type
,
5498 { "Minor Structured Field Type", "tn5250.wdsf_cw_minor_type",
5499 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_wdsf_cw_minor_type
), 0,
5502 /* 15.6.13.1 Write to Display Structured Field Order - Create Window - Border Presentation Minor Structure */
5503 { &hf_tn5250_wdsf_cw_bp_flag1
,
5504 { "Flags", "tn5250.wdsf_cw_bp_flag1",
5505 FT_UINT8
, BASE_HEX
, NULL
, 0,
5507 { &hf_tn5250_wdsf_cw_bp_flag1_1
,
5508 { "Flag 1", "tn5250.wdsf_cw_bp_flag1_1",
5509 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_cw_bp_flag1_1
),
5510 0x80, NULL
, HFILL
}},
5511 { &hf_tn5250_wdsf_cw_bp_flag1_reserved
,
5512 { "Reserved", "tn5250.wdsf_cw_bp_flag1_reserved", FT_UINT8
, BASE_HEX
,
5513 NULL
, 0x7F, NULL
, HFILL
}},
5514 { &hf_tn5250_wdsf_cw_bp_mba
,
5515 { "Monochrome Border Attribute", "tn5250.wdsf_cw_bp_mba",
5516 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5518 { &hf_tn5250_wdsf_cw_bp_cba
,
5519 { "Color Border Attribute", "tn5250.wdsf_cw_bp_cba",
5520 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5522 { &hf_tn5250_wdsf_cw_bp_ulbc
,
5523 { "Upper Left Border Character", "tn5250.wdsf_cw_bp_ulbc",
5524 FT_STRING
, BASE_NONE
, NULL
, 0,
5526 { &hf_tn5250_wdsf_cw_bp_tbc
,
5527 { "Top Border Character", "tn5250.wdsf_cw_bp_tbc",
5528 FT_STRING
, BASE_NONE
, NULL
, 0,
5530 { &hf_tn5250_wdsf_cw_bp_urbc
,
5531 { "Upper Right Border Character", "tn5250.wdsf_cw_bp_urbc",
5532 FT_STRING
, BASE_NONE
, NULL
, 0,
5534 { &hf_tn5250_wdsf_cw_bp_lbc
,
5535 { "Left Border Character", "tn5250.wdsf_cw_bp_lbc",
5536 FT_STRING
, BASE_NONE
, NULL
, 0,
5538 { &hf_tn5250_wdsf_cw_bp_rbc
,
5539 { "Right Border Character", "tn5250.wdsf_cw_bp_rbc",
5540 FT_STRING
, BASE_NONE
, NULL
, 0,
5542 { &hf_tn5250_wdsf_cw_bp_llbc
,
5543 { "Lower Left Border Character", "tn5250.wdsf_cw_bp_llbc",
5544 FT_STRING
, BASE_NONE
, NULL
, 0,
5546 { &hf_tn5250_wdsf_cw_bp_bbc
,
5547 { "Bottom Border Character", "tn5250.wdsf_cw_bp_bbc",
5548 FT_STRING
, BASE_NONE
, NULL
, 0,
5550 { &hf_tn5250_wdsf_cw_bp_lrbc
,
5551 { "Lower Right Border Character", "tn5250.wdsf_cw_bp_lrbc",
5552 FT_STRING
, BASE_NONE
, NULL
, 0,
5555 /* 15.6.13.1 Write to Display Structured Field Order - Create Window - Window/Title Footer Minor Structure */
5556 { &hf_tn5250_wdsf_cw_tf_flag
,
5557 { "Flags", "tn5250.wdsf_cw_tf_flag",
5558 FT_UINT8
, BASE_HEX
, NULL
, 0,
5560 { &hf_tn5250_wdsf_cw_tf_flag_orientation
,
5561 { "Orientation", "tn5250.wdsf_cw_tf_flag_orientation", FT_UINT8
, BASE_HEX
,
5562 VALS(vals_tn5250_wdsf_cw_tf_flag_orientation
), WTF_BITS
, NULL
, HFILL
}},
5563 { &hf_tn5250_wdsf_cw_tf_flag_1
,
5564 { "Title/Footer Defined", "tn5250.wdsf_cw_tf_flag_1",
5565 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_cw_tf_flag_1
),
5566 0x20, NULL
, HFILL
}},
5567 { &hf_tn5250_wdsf_cw_tf_flag_reserved
,
5568 { "Reserved", "tn5250.wdsf_cw_tf_flag_reserved", FT_UINT8
, BASE_HEX
,
5569 NULL
, 0xF8, NULL
, HFILL
}},
5570 { &hf_tn5250_wdsf_cw_tf_mba
,
5571 { "Monochrome Title/Footer Attribute", "tn5250.wdsf_cw_tf_mba",
5572 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5574 { &hf_tn5250_wdsf_cw_tf_cba
,
5575 { "Color Title/Footer Attribute", "tn5250.wdsf_cw_tf_cba",
5576 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5578 { &hf_tn5250_wdsf_cw_tf_text
,
5579 { "Title Text", "tn5250.wdsf_cw_tf_text",
5580 FT_STRING
, BASE_NONE
, NULL
, 0,
5583 /* 15.6.13.2 Write to Display Structured Field Order - Unrestricted Window Cursor Movement */
5584 /* Consists of reserved fields only */
5586 /* 15.6.13.3 Write to Display Structured Field Order - Remove GUI Window */
5587 { &hf_tn5250_wdsf_rgw_flag1
,
5588 { "Flags", "tn5250.wdsf_rgw_flag",
5589 FT_UINT8
, BASE_HEX
, NULL
, 0,
5591 { &hf_tn5250_wdsf_rgw_flag1_0
,
5592 { "Reserved", "tn5250.wdsf_rgw_flag1_0",
5593 FT_BOOLEAN
, 8, NULL
,
5594 0x80, NULL
, HFILL
}},
5595 { &hf_tn5250_wdsf_rgw_flag1_1
,
5596 { "Window Pull-Down", "tn5250.wdsf_rgw_flag1_1",
5597 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_cw_flag1_2
),
5598 0x40, NULL
, HFILL
}},
5599 { &hf_tn5250_wdsf_rgw_reserved
,
5600 { "Reserved", "tn5250.wdsf_rgw_flag_reserved", FT_UINT8
, BASE_HEX
,
5601 NULL
, 0x3F, NULL
, HFILL
}},
5603 /* 15.6.13.4 Write to Display Structured Field Order - Remove All GUI Constructs*/
5604 { &hf_tn5250_wdsf_ragc_flag1
,
5605 { "Flags", "tn5250.wdsf_ragc_flag",
5606 FT_UINT8
, BASE_HEX
, NULL
, 0,
5608 { &hf_tn5250_wdsf_ragc_flag1_0
,
5609 { "GUI-Like Characters", "tn5250.wdsf_ragc_flag1_0",
5610 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ragc_flag1_0
),
5611 0x80, NULL
, HFILL
}},
5612 { &hf_tn5250_wdsf_ragc_reserved
,
5613 { "Reserved", "tn5250.wdsf_ragc_flag_reserved", FT_UINT8
, BASE_HEX
,
5614 NULL
, 0x7F, NULL
, HFILL
}},
5616 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field*/
5617 { &hf_tn5250_wdsf_ds_flag1
,
5618 { "Flags", "tn5250.wdsf_ds_flag1",
5619 FT_UINT8
, BASE_HEX
, NULL
, 0,
5621 { &hf_tn5250_wdsf_ds_flag1_mouse_characteristics
,
5622 { "Mouse Characteristics", "tn5250.wdsf_ds_flag1_mouse_characteristics", FT_UINT8
, BASE_HEX
,
5623 VALS(vals_tn5250_wdsf_ds_flag1_mouse_characteristics
), MOUSE_CHARACTERISTICS_BITS
, NULL
, HFILL
}},
5624 { &hf_tn5250_wdsf_ds_flag1_reserved
,
5625 { "Reserved", "tn5250.wdsf_ds_flag1_reserved", FT_UINT8
, BASE_HEX
,
5626 NULL
, 0x0C, NULL
, HFILL
}},
5627 { &hf_tn5250_wdsf_ds_flag1_auto_enter
,
5628 { "Mouse Characteristics", "tn5250.wdsf_ds_flag1_auto_enter", FT_UINT8
, BASE_HEX
,
5629 VALS(vals_tn5250_wdsf_ds_flag1_auto_enter
), DS_AUTO_ENTER_BITS
, NULL
, HFILL
}},
5630 { &hf_tn5250_wdsf_ds_flag1_1
,
5631 { "Auto Select", "tn5250.wdsf_ds_flag1_1",
5632 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag1_1
),
5633 0x40, NULL
, HFILL
}},
5634 { &hf_tn5250_wdsf_ds_flag1_2
,
5635 { "Field MDT", "tn5250.wdsf_ds_flag1_2",
5636 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag1_2
),
5637 0x80, NULL
, HFILL
}},
5639 { &hf_tn5250_wdsf_ds_flag2
,
5640 { "Flags", "tn5250.wdsf_ds_flag2",
5641 FT_UINT8
, BASE_HEX
, NULL
, 0,
5643 { &hf_tn5250_wdsf_ds_flag2_1
,
5644 { "Bit 0", "tn5250.wdsf_ds_flag2_1",
5645 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag2_1
),
5646 0x01, NULL
, HFILL
}},
5647 { &hf_tn5250_wdsf_ds_flag2_2
,
5648 { "Bit 1", "tn5250.wdsf_ds_flag2_2",
5649 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag2_2
),
5650 0x02, NULL
, HFILL
}},
5651 { &hf_tn5250_wdsf_ds_flag2_3
,
5652 { "Bit 2", "tn5250.wdsf_ds_flag2_3",
5653 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag2_3
),
5654 0x04, NULL
, HFILL
}},
5655 { &hf_tn5250_wdsf_ds_flag2_4
,
5656 { "Bit 3", "tn5250.wdsf_ds_flag2_4",
5657 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag2_4
),
5658 0x08, NULL
, HFILL
}},
5659 { &hf_tn5250_wdsf_ds_flag2_5
,
5660 { "Bit 4", "tn5250.wdsf_ds_flag2_5",
5661 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag2_5
),
5662 0x10, NULL
, HFILL
}},
5663 { &hf_tn5250_wdsf_ds_flag2_6
,
5664 { "Bit 5", "tn5250.wdsf_ds_flag2_6",
5665 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag2_6
),
5666 0x20, NULL
, HFILL
}},
5667 { &hf_tn5250_wdsf_ds_flag2_reserved
,
5668 { "Reserved", "tn5250.wdsf_ds_flag2_reserved", FT_UINT8
, BASE_HEX
,
5669 NULL
, 0xC0, NULL
, HFILL
}},
5671 { &hf_tn5250_wdsf_ds_flag3
,
5672 { "Flags", "tn5250.wdsf_ds_flag3",
5673 FT_UINT8
, BASE_HEX
, NULL
, 0,
5675 { &hf_tn5250_wdsf_ds_flag3_1
,
5676 { "Bit 0", "tn5250.wdsf_ds_flag3_1",
5677 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag3_1
),
5678 0x01, NULL
, HFILL
}},
5679 { &hf_tn5250_wdsf_ds_flag3_reserved
,
5680 { "Reserved", "tn5250.wdsf_ds_flag3_reserved", FT_UINT8
, BASE_HEX
,
5681 NULL
, 0xFE, NULL
, HFILL
}},
5683 { &hf_tn5250_wdsf_ds_type
,
5684 { "Type of Selection Field", "tn5250.wdsf_ds_type",
5685 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_wdsf_ds_type
), 0,
5688 { &hf_tn5250_wdsf_ds_gdc
,
5689 { "GUI Device Characteristics", "tn5250.wdsf_ds_gdc",
5690 FT_UINT8
, BASE_HEX
, NULL
, 0,
5692 { &hf_tn5250_wdsf_ds_gdc_indicators
,
5693 { "Indicators", "tn5250.wdsf_ds_gdc_indicators", FT_UINT8
, BASE_HEX
,
5694 VALS(vals_tn5250_wdsf_ds_gdc_indicators
), DS_INDICATORS_BITS
, NULL
, HFILL
}},
5695 { &hf_tn5250_wdsf_ds_gdc_reserved
,
5696 { "Reserved", "tn5250.wdsf_ds_gdc_reserved", FT_BOOLEAN
, 8,
5697 NULL
, 0x10, NULL
, HFILL
}},
5698 { &hf_tn5250_wdsf_ds_gdc_selection_techniques
,
5699 { "Selection Techniques", "tn5250.wdsf_ds_gdc_selection_techniques", FT_UINT8
, BASE_HEX
,
5700 VALS(vals_tn5250_wdsf_ds_gdc_selection_techniques
), DS_SELECTION_TECHNIQUES_BITS
, NULL
, HFILL
}},
5702 { &hf_tn5250_wdsf_ds_nws
,
5703 { "NWS With Mnemonic Underscore Characteristics", "tn5250.wdsf_ds_nws",
5704 FT_UINT8
, BASE_HEX
, NULL
, 0,
5706 { &hf_tn5250_wdsf_ds_nws_indicators
,
5707 { "Indicators", "tn5250.wdsf_ds_nws_indicators", FT_UINT8
, BASE_HEX
,
5708 VALS(vals_tn5250_wdsf_ds_nws_indicators
), DS_NWS_INDICATORS_BITS
, NULL
, HFILL
}},
5709 { &hf_tn5250_wdsf_ds_nws_reserved
,
5710 { "Reserved", "tn5250.wdsf_ds_nws_reserved", FT_BOOLEAN
, 8,
5711 NULL
, 0x10, NULL
, HFILL
}},
5712 { &hf_tn5250_wdsf_ds_nws_selection_techniques
,
5713 { "Selection Techniques", "tn5250.wdsf_ds_nws_selection_techniques", FT_UINT8
, BASE_HEX
,
5714 VALS(vals_tn5250_wdsf_ds_nws_selection_techniques
), DS_NWS_SELECTION_TECHNIQUES_BITS
, NULL
, HFILL
}},
5716 { &hf_tn5250_wdsf_ds_nws_wout
,
5717 { "NWS Without Mnemonic Underscore Characteristics", "tn5250.wdsf_ds_nws_wout",
5718 FT_UINT8
, BASE_HEX
, NULL
, 0,
5720 /* hf_tn5250_wdsf_ds_nws_wout uses same bitfields as hf_tn5250_wdsf_ds_nws */
5722 { &hf_tn5250_wdsf_ds_textsize
,
5723 { "Text Size", "tn5250.wdsf_ds_textsize",
5724 FT_UINT8
, BASE_DEC
, NULL
, 0,
5726 { &hf_tn5250_wdsf_ds_rows
,
5727 { "Rows", "tn5250.wdsf_ds_rows",
5728 FT_UINT8
, BASE_DEC
, NULL
, 0,
5730 { &hf_tn5250_wdsf_ds_columns
,
5731 { "Columns/Menu Bar Choices", "tn5250.wdsf_ds_columns",
5732 FT_UINT8
, BASE_DEC
, NULL
, 0,
5734 { &hf_tn5250_wdsf_ds_padding
,
5735 { "Padding Between Choices", "tn5250.wdsf_ds_padding",
5736 FT_UINT8
, BASE_DEC
, NULL
, 0,
5738 { &hf_tn5250_wdsf_ds_numeric_sep
,
5739 { "Numeric Separator Character", "tn5250.wdsf_ds_numeric_sep",
5740 FT_STRING
, BASE_NONE
, NULL
, 0,
5742 { &hf_tn5250_wdsf_ds_country_sel
,
5743 { "Country Specific Selection Character", "tn5250.wdsf_ds_country_sel",
5744 FT_STRING
, BASE_NONE
, NULL
, 0,
5746 { &hf_tn5250_wdsf_ds_cancel_aid
,
5747 { "Mouse Pull-Down Cancel AID", "tn5250.wdsf_ds_cancel_aid",
5748 FT_UINT8
, BASE_HEX
, NULL
, 0,
5750 { &hf_tn5250_wdsf_ds_totalrows
,
5751 { "Total Rows or Minor Structures That Can Be Scrolled", "tn5250.wdsf_ds_totalrows",
5752 FT_UINT32
, BASE_DEC
, NULL
, 0,
5754 { &hf_tn5250_wdsf_ds_sliderpos
,
5755 { "Slider Positions That Can Be Scrolled", "tn5250.wdsf_ds_sliderpos",
5756 FT_UINT32
, BASE_DEC
, NULL
, 0,
5759 { &hf_tn5250_wdsf_ds_minor_type
,
5760 { "Minor Structured Field Type", "tn5250.wdsf_ds_minor_type",
5761 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_wdsf_ds_minor_type
), 0,
5764 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Choice Text Minor Structure*/
5765 { &hf_tn5250_wdsf_ds_ct_flag1
,
5766 { "Flag Byte 1", "tn5250.wdsf_ds_ct_flag1",
5767 FT_UINT8
, BASE_HEX
, NULL
, 0,
5769 { &hf_tn5250_wdsf_ds_ct_flag1_choice_state
,
5770 { "Choice State", "tn5250.wdsf_ds_ct_flag1_choice_state", FT_UINT8
, BASE_HEX
,
5771 VALS(vals_tn5250_wdsf_ds_ct_flag1_choice_state
), DS_CHOICE_STATE_BITS
, NULL
, HFILL
}},
5772 { &hf_tn5250_wdsf_ds_ct_flag1_2
,
5773 { "Bit 2", "tn5250.wdsf_ds_ct_flag1_2",
5774 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag1_2
),
5775 0x04, NULL
, HFILL
}},
5776 { &hf_tn5250_wdsf_ds_ct_flag1_3
,
5777 { "Bit 3", "tn5250.wdsf_ds_ct_flag1_3",
5778 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag1_3
),
5779 0x08, NULL
, HFILL
}},
5780 { &hf_tn5250_wdsf_ds_ct_flag1_4
,
5781 { "Bit 4", "tn5250.wdsf_ds_ct_flag1_4",
5782 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag1_4
),
5783 0x10, NULL
, HFILL
}},
5784 { &hf_tn5250_wdsf_ds_ct_flag1_5
,
5785 { "Bit 5", "tn5250.wdsf_ds_ct_flag1_5",
5786 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag1_5
),
5787 0x20, NULL
, HFILL
}},
5788 { &hf_tn5250_wdsf_ds_ct_flag1_numeric_selection
,
5789 { "Numeric Selection Characters", "tn5250.wdsf_ds_ct_flag1_numeric_selection", FT_UINT8
, BASE_HEX
,
5790 VALS(vals_tn5250_wdsf_ds_ct_flag1_numeric_selection
), DS_NUMERIC_SELECTION_BITS
, NULL
, HFILL
}},
5792 { &hf_tn5250_wdsf_ds_ct_flag2
,
5793 { "Flag Byte 2", "tn5250.wdsf_ds_ct_flag2",
5794 FT_UINT8
, BASE_HEX
, NULL
, 0,
5796 { &hf_tn5250_wdsf_ds_ct_flag2_0
,
5797 { "Bit 0", "tn5250.wdsf_ds_ct_flag2_0",
5798 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_0
),
5799 0x01, NULL
, HFILL
}},
5800 { &hf_tn5250_wdsf_ds_ct_flag2_1
,
5801 { "Bit 1", "tn5250.wdsf_ds_ct_flag2_1",
5802 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_1
),
5803 0x02, NULL
, HFILL
}},
5804 { &hf_tn5250_wdsf_ds_ct_flag2_2
,
5805 { "Bit 2", "tn5250.wdsf_ds_ct_flag2_2",
5806 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_2
),
5807 0x04, NULL
, HFILL
}},
5808 { &hf_tn5250_wdsf_ds_ct_flag2_3
,
5809 { "Bit 3", "tn5250.wdsf_ds_ct_flag2_3",
5810 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_3
),
5811 0x08, NULL
, HFILL
}},
5812 { &hf_tn5250_wdsf_ds_ct_flag2_4
,
5813 { "Bit 4", "tn5250.wdsf_ds_ct_flag2_4",
5814 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_4
),
5815 0x10, NULL
, HFILL
}},
5816 { &hf_tn5250_wdsf_ds_ct_flag2_5
,
5817 { "Bit 5", "tn5250.wdsf_ds_ct_flag2_5",
5818 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_5
),
5819 0x20, NULL
, HFILL
}},
5820 { &hf_tn5250_wdsf_ds_ct_flag2_6
,
5821 { "Bit 6", "tn5250.wdsf_ds_ct_flag2_6",
5822 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_6
),
5823 0x40, NULL
, HFILL
}},
5824 { &hf_tn5250_wdsf_ds_ct_flag2_7
,
5825 { "Bit 7", "tn5250.wdsf_ds_ct_flag2_7",
5826 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_7
),
5827 0x80, NULL
, HFILL
}},
5829 { &hf_tn5250_wdsf_ds_ct_flag3
,
5830 { "Flag Byte 3", "tn5250.wdsf_ds_ct_flag3",
5831 FT_UINT8
, BASE_HEX
, NULL
, 0,
5833 { &hf_tn5250_wdsf_ds_ct_flag3_0
,
5834 { "Bit 0", "tn5250.wdsf_ds_ct_flag3_0",
5835 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag3_0
),
5836 0x01, NULL
, HFILL
}},
5837 { &hf_tn5250_wdsf_ds_ct_flag3_1
,
5838 { "Bit 1", "tn5250.wdsf_ds_ct_flag3_1",
5839 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag3_1
),
5840 0x02, NULL
, HFILL
}},
5841 { &hf_tn5250_wdsf_ds_ct_flag3_2
,
5842 { "Bit 2", "tn5250.wdsf_ds_ct_flag3_2",
5843 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag3_2
),
5844 0x04, NULL
, HFILL
}},
5845 { &hf_tn5250_wdsf_ds_ct_flag3_reserved
,
5846 { "Reserved", "tn5250.wdsf_ds_ct_flag3_reserved", FT_UINT8
, BASE_HEX
,
5847 NULL
, 0xF8, NULL
, HFILL
}},
5849 { &hf_tn5250_wdsf_ds_ct_mnemonic_offset
,
5850 { "Mnemonic Offset", "tn5250.wdsf_ds_ct_mnemonic_offset",
5851 FT_UINT8
, BASE_DEC
, NULL
, 0,
5853 { &hf_tn5250_wdsf_ds_ct_aid
,
5854 { "AID", "tn5250.wdsf_ds_ct_aid",
5855 FT_UINT8
, BASE_HEX
, NULL
, 0,
5857 { &hf_tn5250_wdsf_ds_ct_numeric_onebyte
,
5858 { "Numeric Characters", "tn5250.wdsf_ds_ct_numeric",
5859 FT_UINT8
, BASE_HEX
, NULL
, 0,
5861 { &hf_tn5250_wdsf_ds_ct_numeric_twobyte
,
5862 { "Numeric Characters", "tn5250.wdsf_ds_ct_numeric",
5863 FT_UINT16
, BASE_HEX
, NULL
, 0,
5865 { &hf_tn5250_wdsf_ds_ct_text
,
5866 { "Choice Text", "tn5250.wdsf_ds_ct_text",
5867 FT_STRING
, BASE_NONE
, NULL
, 0,
5870 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Menu Bar Separator Minor Structure*/
5872 { &hf_tn5250_wdsf_ds_mbs_flag
,
5873 { "Flags", "tn5250.wdsf_ds_mbs_flag",
5874 FT_UINT8
, BASE_HEX
, NULL
, 0,
5876 { &hf_tn5250_wdsf_ds_mbs_flag_0
,
5877 { "Bit 0", "tn5250.wdsf_ds_mbs_flag_0",
5878 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_mbs_flag_0
),
5879 0x01, NULL
, HFILL
}},
5880 { &hf_tn5250_wdsf_ds_mbs_flag_1
,
5881 { "Bit 1", "tn5250.wdsf_ds_mbs_flag_1",
5882 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_mbs_flag_1
),
5883 0x02, NULL
, HFILL
}},
5884 { &hf_tn5250_wdsf_ds_mbs_flag_reserved
,
5885 { "Reserved", "tn5250.wdsf_ds_mbs_flag_reserved", FT_UINT8
, BASE_HEX
,
5886 NULL
, 0xF8, NULL
, HFILL
}},
5887 { &hf_tn5250_wdsf_ds_mbs_start_column
,
5888 { "Start Column", "tn5250.wdsf_ds_mbs_start_column",
5889 FT_UINT8
, BASE_DEC
, NULL
, 0,
5891 { &hf_tn5250_wdsf_ds_mbs_end_column
,
5892 { "End Column", "tn5250.wdsf_ds_mbs_end_column",
5893 FT_UINT8
, BASE_DEC
, NULL
, 0,
5895 { &hf_tn5250_wdsf_ds_mbs_monochrome_sep
,
5896 { "Monochrome Separator Emphasis", "tn5250.wdsf_ds_mbs_monochrome_sep",
5897 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5899 { &hf_tn5250_wdsf_ds_mbs_color_sep
,
5900 { "Color Separator Emphasis", "tn5250.wdsf_ds_mbs_color_sep",
5901 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5903 { &hf_tn5250_wdsf_ds_mbs_sep_char
,
5904 { "Separator Character", "tn5250.wdsf_ds_mbs_sep_char",
5905 FT_STRING
, BASE_NONE
, NULL
, 0,
5908 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Choice Presentation Display Attributes Minor Structure*/
5909 { &hf_tn5250_wdsf_ds_cpda_flag1
,
5910 { "Flags", "tn5250.wdsf_ds_cpda_flag1",
5911 FT_UINT8
, BASE_HEX
, NULL
, 0,
5913 { &hf_tn5250_wdsf_ds_cpda_flag1_0
,
5914 { "Bit 0", "tn5250.wdsf_ds_cpda_flag1_0",
5915 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_cpda_flag1_0
),
5916 0x01, NULL
, HFILL
}},
5917 { &hf_tn5250_wdsf_ds_cpda_flag1_1
,
5918 { "Bit 1", "tn5250.wdsf_ds_cpda_flag1_1",
5919 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_cpda_flag1_1
),
5920 0x02, NULL
, HFILL
}},
5921 { &hf_tn5250_wdsf_ds_cpda_flag1_2
,
5922 { "Bit 2", "tn5250.wdsf_ds_cpda_flag1_2",
5923 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_cpda_flag1_2
),
5924 0x04, NULL
, HFILL
}},
5925 { &hf_tn5250_wdsf_ds_cpda_flag1_reserved
,
5926 { "Reserved", "tn5250.wdsf_ds_cpda_flag1_reserved", FT_UINT8
, BASE_HEX
,
5927 NULL
, 0xF8, NULL
, HFILL
}},
5929 { &hf_tn5250_wdsf_ds_cpda_monochrome_sel_avail
,
5930 { "Monochrome Selection Cursor Available Emphasis", "tn5250.wdsf_ds_cpda_monochrome_sel_avail",
5931 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5933 { &hf_tn5250_wdsf_ds_cpda_color_sel_avail
,
5934 { "Color Selection Cursor Available Emphasis", "tn5250.wdsf_ds_cpda_color_sel_avail",
5935 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5937 { &hf_tn5250_wdsf_ds_cpda_monochrome_sel_selected
,
5938 { "Monochrome Selection Cursor Selected Emphasis", "tn5250.wdsf_ds_cpda_monochrome_sel_selected",
5939 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5941 { &hf_tn5250_wdsf_ds_cpda_color_sel_selected
,
5942 { "Color Selection Cursor Selected Emphasis", "tn5250.wdsf_ds_cpda_color_sel_selected",
5943 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5946 { &hf_tn5250_wdsf_ds_cpda_monochrome_sel_unavail
,
5947 { "Monochrome Selection Cursor Unavailable Emphasis", "tn5250.wdsf_ds_cpda_monochrome_sel_unavail",
5948 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5950 { &hf_tn5250_wdsf_ds_cpda_color_sel_unavail
,
5951 { "Color Selection Cursor Unavailable Emphasis", "tn5250.wdsf_ds_cpda_color_sel_unavail",
5952 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5955 { &hf_tn5250_wdsf_ds_cpda_monochrome_avail
,
5956 { "Monochrome Available Emphasis", "tn5250.wdsf_ds_cpda_monochrome_avail",
5957 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5959 { &hf_tn5250_wdsf_ds_cpda_color_avail
,
5960 { "Color Available Emphasis", "tn5250.wdsf_ds_cpda_color_avail",
5961 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5964 { &hf_tn5250_wdsf_ds_cpda_monochrome_selected
,
5965 { "Monochrome Selected Emphasis", "tn5250.wdsf_ds_cpda_monochrome_selected",
5966 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5968 { &hf_tn5250_wdsf_ds_cpda_color_selected
,
5969 { "Color Selected Emphasis", "tn5250.wdsf_ds_cpda_color_selected",
5970 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5973 { &hf_tn5250_wdsf_ds_cpda_monochrome_unavail
,
5974 { "Monochrome Unavailable Emphasis", "tn5250.wdsf_ds_cpda_monochrome_unavail",
5975 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5977 { &hf_tn5250_wdsf_ds_cpda_color_unavail
,
5978 { "Color Unavailable Emphasis", "tn5250.wdsf_ds_cpda_color_unavail",
5979 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5982 { &hf_tn5250_wdsf_ds_cpda_monochrome_indicator
,
5983 { "Monochrome Indicator Emphasis", "tn5250.wdsf_ds_cpda_monochrome_indicator",
5984 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5986 { &hf_tn5250_wdsf_ds_cpda_color_indicator
,
5987 { "Color Indicator Emphasis", "tn5250.wdsf_ds_cpda_color_indicator",
5988 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5991 { &hf_tn5250_wdsf_ds_cpda_monochrome_unavail_indicator
,
5992 { "Monochrome Unavailable Indicator Emphasis", "tn5250.wdsf_ds_cpda_monochrome_unavail_indicator",
5993 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5995 { &hf_tn5250_wdsf_ds_cpda_color_unavail_indicator
,
5996 { "Color Unavailable Indicator Emphasis", "tn5250.wdsf_ds_cpda_color_unavail_indicator",
5997 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6002 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Choice Indicators Minor Structure*/
6003 { &hf_tn5250_wdsf_ds_ci_flag1
,
6004 { "Flags", "tn5250.wdsf_ds_ci_flag1",
6005 FT_UINT8
, BASE_HEX
, NULL
, 0,
6007 { &hf_tn5250_wdsf_ds_ci_flag1_0
,
6008 { "Bit 0", "tn5250.wdsf_ds_ci_flag1_0",
6009 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ci_flag1_0
),
6010 0x01, NULL
, HFILL
}},
6011 { &hf_tn5250_wdsf_ds_ci_flag1_reserved
,
6012 { "Reserved", "tn5250.wdsf_ds_ci_flag1_reserved", FT_UINT8
, BASE_HEX
,
6013 NULL
, 0xFE, NULL
, HFILL
}},
6015 { &hf_tn5250_wdsf_ds_ci_left_push
,
6016 { "Empty Indicator or Left Push Button", "tn5250.wdsf_ds_ci_left_push",
6017 FT_STRING
, BASE_NONE
, NULL
, 0,
6019 { &hf_tn5250_wdsf_ds_ci_right_push
,
6020 { "Selected Indicator or Right Push Button", "tn5250.wdsf_ds_ci_right_push",
6021 FT_STRING
, BASE_NONE
, NULL
, 0,
6023 { &hf_tn5250_wdsf_ds_ci_first_choice
,
6024 { "Character That Replaces the First Choice Text Character for Unavailable Choices On a Monochrome Display", "tn5250.wdsf_ds_ci_first_choice",
6025 FT_STRING
, BASE_NONE
, NULL
, 0,
6028 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Scroll Bar Indicators Minor Structure*/
6029 { &hf_tn5250_wdsf_ds_sbi_flag1
,
6030 { "Flags", "tn5250.wdsf_ds_sbi_flag1",
6031 FT_UINT8
, BASE_HEX
, NULL
, 0,
6033 { &hf_tn5250_wdsf_ds_sbi_flag1_0
,
6034 { "Bit 0", "tn5250.wdsf_ds_sbi_flag1_0",
6035 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_sbi_flag1_0
),
6036 0x01, NULL
, HFILL
}},
6037 { &hf_tn5250_wdsf_ds_sbi_flag1_reserved
,
6038 { "Reserved", "tn5250.wdsf_ds_sbi_flag1_reserved", FT_UINT8
, BASE_HEX
,
6039 NULL
, 0xFE, NULL
, HFILL
}},
6041 { &hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight
,
6042 { "Monochrome Top of ScrollBar Highlighting", "tn5250.wdsf_ds_sbi_monochrome_top_highlight",
6043 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6045 { &hf_tn5250_wdsf_ds_sbi_color_top_highlight
,
6046 { "Color Top of ScrollBar Highlighting", "tn5250.wdsf_ds_sbi_color_top_highlightl",
6047 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6050 { &hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight_shaft
,
6051 { "Monochrome Shaft ScrollBar Highlighting", "tn5250.wdsf_ds_sbi_monochrome_top_highlight_shaft",
6052 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6054 { &hf_tn5250_wdsf_ds_sbi_color_top_highlight_shaft
,
6055 { "Color Shaft ScrollBar Highlighting", "tn5250.wdsf_ds_sbi_color_top_highlight_shaft",
6056 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6059 { &hf_tn5250_wdsf_ds_sbi_top_character
,
6060 { "Top Scroll Bar Character", "tn5250.wdsf_ds_sbi_top_character",
6061 FT_STRING
, BASE_NONE
, NULL
, 0,
6063 { &hf_tn5250_wdsf_ds_sbi_bottom_character
,
6064 { "Bottom Scroll Bar Character", "tn5250.wdsf_ds_sbi_bottom_character",
6065 FT_STRING
, BASE_NONE
, NULL
, 0,
6067 { &hf_tn5250_wdsf_ds_sbi_empty_character
,
6068 { "Empty Scroll Bar Character", "tn5250.wdsf_ds_sbi_empty_character",
6069 FT_STRING
, BASE_NONE
, NULL
, 0,
6071 { &hf_tn5250_wdsf_ds_sbi_slider_character
,
6072 { "Slider Scroll Bar Character", "tn5250.wdsf_ds_sbi_slider_character",
6073 FT_STRING
, BASE_NONE
, NULL
, 0,
6076 /* 15.6.13.6 Write to Display Structured Field Order - Remove GUI Selection Field */
6077 /* Consists of reserved fields only */
6079 /* 15.6.13.7 Write to Display Structured Field Order - Define Scroll Bar Field */
6080 { &hf_tn5250_wdsf_dsb_flag1
,
6081 { "Flags", "tn5250.wdsf_dsb_flag1",
6082 FT_UINT8
, BASE_HEX
, NULL
, 0,
6084 { &hf_tn5250_wdsf_dsb_flag1_0
,
6085 { "Bit 0", "tn5250.wdsf_dsb_flag1_0",
6086 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_dsb_flag1_0
),
6087 0x01, NULL
, HFILL
}},
6088 { &hf_tn5250_wdsf_dsb_flag1_1
,
6089 { "Bit 1", "tn5250.wdsf_dsb_flag1_1",
6090 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_dsb_flag1_0
),
6091 0x02, NULL
, HFILL
}},
6092 { &hf_tn5250_wdsf_dsb_flag1_reserved
,
6093 { "Reserved", "tn5250.wdsf_dsb_flag1_reserved", FT_UINT8
, BASE_HEX
,
6094 NULL
, 0x7C, NULL
, HFILL
}},
6095 { &hf_tn5250_wdsf_dsb_flag1_7
,
6096 { "Bit 7", "tn5250.wdsf_dsb_flag1_7",
6097 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_dsb_flag1_7
),
6098 0x80, NULL
, HFILL
}},
6100 { &hf_tn5250_wdsf_sbi_total_scroll
,
6101 { "TotalRows or TotalCols That Can Be Scrolled", "tn5250.wdsf_sbi_total_scroll",
6102 FT_UINT32
, BASE_DEC
, NULL
, 0,
6104 { &hf_tn5250_wdsf_sbi_sliderpos
,
6105 { "SliderPos", "tn5250.wdsf_sbi_sliderpos",
6106 FT_UINT32
, BASE_DEC
, NULL
, 0,
6108 { &hf_tn5250_wdsf_sbi_rowscols
,
6109 { "Rows or Columns", "tn5250.wdsf_sbi_rowscols",
6110 FT_UINT8
, BASE_DEC
, NULL
, 0,
6113 /* 15.6.13.8 Write to Display Structured Field Order - Remove GUI Scroll Bar Field */
6114 /* Consists of reserved fields only */
6116 /* 15.6.13.9 Write to Display Structured Field Order - Write Data Field */
6117 { &hf_tn5250_wdsf_wdf_flag1
,
6118 { "Flags", "tn5250.wdsf_wdf_flag1",
6119 FT_UINT8
, BASE_HEX
, NULL
, 0,
6121 { &hf_tn5250_wdsf_wdf_flag1_0
,
6122 { "Bit 0", "tn5250.wdsf_wdf_flag1_0",
6123 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_wdf_flag1_0
),
6124 0x01, NULL
, HFILL
}},
6125 { &hf_tn5250_wdsf_wdf_flag1_reserved
,
6126 { "Reserved", "tn5250.wdsf_wdf_flag1_reserved", FT_UINT8
, BASE_HEX
,
6127 NULL
, 0xFE, NULL
, HFILL
}},
6129 /* 15.6.13.10 Write to Display Structured Field Order - Programmable Mouse Buttons */
6130 { &hf_tn5250_wdsf_pmb_flag1
,
6131 { "Flags", "tn5250.wdsf_pmb_flag1",
6132 FT_UINT8
, BASE_HEX
, NULL
, 0,
6134 { &hf_tn5250_wdsf_pmb_flag1_0
,
6135 { "Bit 0", "tn5250.wdsf_pmb_flag1_0",
6136 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_pmb_flag1_0
),
6137 0x01, NULL
, HFILL
}},
6138 { &hf_tn5250_wdsf_pmb_flag1_1
,
6139 { "Bit 1", "tn5250.wdsf_pmb_flag1_1",
6140 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_pmb_flag1_1
),
6141 0x02, NULL
, HFILL
}},
6142 { &hf_tn5250_wdsf_pmb_flag1_2
,
6143 { "Bit 2", "tn5250.wdsf_pmb_flag1_2",
6144 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_pmb_flag1_2
),
6145 0x04, NULL
, HFILL
}},
6146 { &hf_tn5250_wdsf_pmb_flag1_3
,
6147 { "Bit 3", "tn5250.wdsf_pmb_flag1_3",
6148 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_pmb_flag1_3
),
6149 0x08, NULL
, HFILL
}},
6150 { &hf_tn5250_wdsf_pmb_flag1_reserved
,
6151 { "Reserved", "tn5250.wdsf_pmb_flag1_reserved", FT_UINT8
, BASE_HEX
,
6152 NULL
, 0xF0, NULL
, HFILL
}},
6153 { &hf_tn5250_wdsf_pmb_first_mouse_event
,
6154 { "First Mouse Event (Leading Edge Event)", "tn5250.wdsf_pmb_first_mouse_event",
6155 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_mouse_events
), 0,
6157 { &hf_tn5250_wdsf_pmb_second_mouse_event
,
6158 { "Second Mouse Event (Trailing Edge Event)", "tn5250.wdsf_pmb_second_mouse_event",
6159 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_mouse_events
), 0,
6162 /* 15.7 Draw/Erase Grid Lines Structured Field */
6163 { &hf_tn5250_wdsf_deg_partition
,
6164 { "Partition", "tn5250.wdsf_deg_partition",
6165 FT_UINT8
, BASE_HEX
, NULL
, 0,
6167 { &hf_tn5250_wdsf_deg_flag1
,
6168 { "Flags", "tn5250.wdsf_deg_flag1",
6169 FT_UINT8
, BASE_HEX
, NULL
, 0,
6171 { &hf_tn5250_wdsf_deg_flag1_0
,
6172 { "Bit 0", "tn5250.wdsf_deg_flag1_0",
6173 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_deg_flag1_0
),
6174 0x01, NULL
, HFILL
}},
6175 { &hf_tn5250_wdsf_deg_flag1_reserved
,
6176 { "Reserved", "tn5250.wdsf_deg_flag1_reserved", FT_UINT8
, BASE_HEX
,
6177 NULL
, 0xFE, NULL
, HFILL
}},
6178 { &hf_tn5250_wdsf_deg_flag2
,
6179 { "Flags", "tn5250.wdsf_deg_flag2",
6180 FT_UINT8
, BASE_HEX
, NULL
, 0,
6182 { &hf_tn5250_wdsf_deg_flag2_0
,
6183 { "Bit 0", "tn5250.wdsf_deg_flag2_0",
6184 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_deg_flag1_0
),
6185 0x01, NULL
, HFILL
}},
6186 { &hf_tn5250_wdsf_deg_flag2_reserved
,
6187 { "Reserved", "tn5250.wdsf_deg_flag2_reserved", FT_UINT8
, BASE_HEX
,
6188 NULL
, 0xFE, NULL
, HFILL
}},
6189 { &hf_tn5250_wdsf_deg_default_color
,
6190 { "Default Color for Grid Lines", "tn5250.wdsf_deg_default_color",
6191 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6193 { &hf_tn5250_wdsf_deg_default_line
,
6194 { "Default Line Style", "tn5250.wdsf_deg_default_line",
6195 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_deg_lines
), 0,
6198 /* 15.7.1 Draw/Erase Grid Lines Structured Field - Minor Structure*/
6199 { &hf_tn5250_wdsf_deg_minor_type
,
6200 { "Construct", "tn5250.wdsf_deg_minor_type",
6201 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_wdsf_deg_minor_type
), 0,
6203 { &hf_tn5250_wdsf_deg_ms_flag1
,
6204 { "Flags", "tn5250.wdsf_deg_ms_flag1",
6205 FT_UINT8
, BASE_HEX
, NULL
, 0,
6207 { &hf_tn5250_wdsf_deg_ms_flag1_0
,
6208 { "Bit 0", "tn5250.wdsf_deg_ms_flag1_0",
6209 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_deg_ms_flag1_0
),
6210 0x01, NULL
, HFILL
}},
6211 { &hf_tn5250_wdsf_deg_ms_flag1_reserved
,
6212 { "Reserved", "tn5250.wdsf_deg_ms_flag1_reserved", FT_UINT8
, BASE_HEX
,
6213 NULL
, 0xFE, NULL
, HFILL
}},
6214 { &hf_tn5250_wdsf_deg_ms_start_row
,
6215 { "Start Row", "tn5250.wdsf_deg_ms_start_row",
6216 FT_UINT8
, BASE_DEC
, NULL
, 0,
6218 { &hf_tn5250_wdsf_deg_ms_start_column
,
6219 { "Start Column", "tn5250.wdsf_deg_ms_start_column",
6220 FT_UINT8
, BASE_DEC
, NULL
, 0,
6222 { &hf_tn5250_wdsf_deg_ms_horizontal_dimension
,
6223 { "Horizontal Dimension", "tn5250.wdsf_deg_ms_horizontal_dimension",
6224 FT_UINT8
, BASE_DEC
, NULL
, 0,
6226 { &hf_tn5250_wdsf_deg_ms_vertical_dimension
,
6227 { "Vertical Dimension", "tn5250.wdsf_deg_ms_vertical_dimension",
6228 FT_UINT8
, BASE_DEC
, NULL
, 0,
6230 { &hf_tn5250_wdsf_deg_ms_default_color
,
6231 { "Color", "tn5250.wdsf_deg_ms_default_color",
6232 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6234 { &hf_tn5250_wdsf_deg_ms_line_repeat
,
6235 { "Line Repeat", "tn5250.wdsf_deg_ms_line_repeat",
6236 FT_UINT8
, BASE_DEC
, NULL
, 0,
6238 { &hf_tn5250_wdsf_deg_ms_line_interval
,
6239 { "Line Interval", "tn5250.wdsf_deg_ms_line_interval",
6240 FT_UINT8
, BASE_DEC
, NULL
, 0,
6243 /* 15.7.2 Clear Grid Lines Structured Field */
6244 { &hf_tn5250_wdsf_cgl_partition
,
6245 { "Partition", "tn5250.wdsf_cgl_partition",
6246 FT_UINT8
, BASE_HEX
, NULL
, 0,
6248 { &hf_tn5250_wdsf_cgl_start_row
,
6249 { "Start Row", "tn5250.wdsf_cgl_start_row",
6250 FT_UINT8
, BASE_DEC
, NULL
, 0,
6252 { &hf_tn5250_wdsf_cgl_start_column
,
6253 { "Start Column", "tn5250.wdsf_cgl_start_column",
6254 FT_UINT8
, BASE_DEC
, NULL
, 0,
6256 { &hf_tn5250_wdsf_cgl_rectangle_width
,
6257 { "Width of Rectangle", "tn5250.wdsf_cgl_rectangle_width",
6258 FT_UINT8
, BASE_DEC
, NULL
, 0,
6260 { &hf_tn5250_wdsf_cgl_rectangle_height
,
6261 { "Height of Rectangle", "tn5250.wdsf_cgl_rectangle_height",
6262 FT_UINT8
, BASE_DEC
, NULL
, 0,
6265 /* 15.8 WRITE ERROR CODE Command */
6266 /* 15.9 WRITE ERROR CODE TO WINDOW Command */
6267 { &hf_tn5250_wectw_start_column
,
6268 { "Start Column", "tn5250.wectw_start_column",
6269 FT_UINT8
, BASE_DEC
, NULL
, 0,
6271 { &hf_tn5250_wectw_end_column
,
6272 { "End Column", "tn5250.wectw_end_column",
6273 FT_UINT8
, BASE_DEC
, NULL
, 0,
6276 /* 15.22 SAVE PARTIAL SCREEN Command */
6277 { &hf_tn5250_sps_flag1
,
6278 { "Flags", "tn5250.sps_flag1",
6279 FT_UINT8
, BASE_HEX
, NULL
, 0,
6281 { &hf_tn5250_sps_flag1_0
,
6282 { "Bit 0", "tn5250.sps_flag1_0",
6283 FT_BOOLEAN
, 8, TFS(&tn5250_field_sps_flag1_0
),
6284 0x01, NULL
, HFILL
}},
6285 { &hf_tn5250_sps_flag1_reserved
,
6286 { "Reserved", "tn5250.sps_flag1_reserved", FT_UINT8
, BASE_HEX
,
6287 NULL
, 0xFE, NULL
, HFILL
}},
6288 { &hf_tn5250_sps_top_row
,
6289 { "Top Row", "tn5250.sps_top_row",
6290 FT_UINT8
, BASE_DEC
, NULL
, 0,
6292 { &hf_tn5250_sps_left_column
,
6293 { "Left Column", "tn5250.sps_left_column",
6294 FT_UINT8
, BASE_DEC
, NULL
, 0,
6296 { &hf_tn5250_sps_window_depth
,
6297 { "Window Depth", "tn5250.sps_window_depth",
6298 FT_UINT8
, BASE_DEC
, NULL
, 0,
6300 { &hf_tn5250_sps_window_width
,
6301 { "Window Width", "tn5250.sps_window_width",
6302 FT_UINT8
, BASE_DEC
, NULL
, 0,
6305 /* 15.25 ROLL Command */
6306 { &hf_tn5250_roll_flag1
,
6307 { "Byte 1", "tn5250.roll_flag1",
6308 FT_UINT8
, BASE_HEX
, NULL
, 0,
6310 { &hf_tn5250_roll_flag1_0
,
6311 { "Bit 0", "tn5250.roll_flag1_0",
6312 FT_BOOLEAN
, 8, TFS(&tn5250_field_roll_flag1_0
),
6313 0x01, NULL
, HFILL
}},
6314 { &hf_tn5250_roll_flag1_reserved
,
6315 { "Reserved", "tn5250.roll_flag1_reserved", FT_UINT8
, BASE_HEX
,
6316 NULL
, 0x06, NULL
, HFILL
}},
6317 { &hf_tn5250_roll_flag1_lines
,
6318 { "Number of lines that the designated area is to be rolled", "tn5250.roll_flag1_lines", FT_UINT8
, BASE_DEC
,
6319 NULL
, 0xF8, NULL
, HFILL
}},
6320 { &hf_tn5250_roll_top_line
,
6321 { "Line number defining the top line of the area that will participate in the roll", "tn5250.roll_top_line",
6322 FT_UINT8
, BASE_DEC
, NULL
, 0,
6324 { &hf_tn5250_roll_bottom_line
,
6325 { "Line number defining the bottom line of the area that will participate in the roll", "tn5250.roll_bottom_line",
6326 FT_UINT8
, BASE_DEC
, NULL
, 0,
6329 /* 15.26.1 WRITE SINGLE STRUCTURED FIELD Command - 5250 WSC CUSTOMIZATION Command*/
6330 { &hf_tn5250_wssf_wsc_minor_type
,
6331 { "Minor Structured Field Type", "tn5250.wssf_wsc_minor_type",
6332 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_wssf_minor_type
), 0,
6335 { &hf_tn5250_wssf_flag1
,
6336 { "Byte 1", "tn5250.wssf_flag1",
6337 FT_UINT8
, BASE_HEX
, NULL
, 0,
6339 { &hf_tn5250_wssf_flag2
,
6340 { "Byte 2", "tn5250.wssf_flag2",
6341 FT_UINT8
, BASE_HEX
, NULL
, 0,
6343 { &hf_tn5250_wssf_flag2_0
,
6344 { "Bit 0", "tn5250.wssf_flag2_0",
6345 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_0
),
6346 0x01, NULL
, HFILL
}},
6347 { &hf_tn5250_wssf_flag2_1
,
6348 { "Bit 1", "tn5250.wssf_flag2_1",
6349 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_1
),
6350 0x02, NULL
, HFILL
}},
6351 { &hf_tn5250_wssf_flag2_2
,
6352 { "Bit 2", "tn5250.wssf_flag2_2",
6353 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_2
),
6354 0x04, NULL
, HFILL
}},
6355 { &hf_tn5250_wssf_flag2_3
,
6356 { "Bit 3", "tn5250.wssf_flag2_3",
6357 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_3
),
6358 0x08, NULL
, HFILL
}},
6359 { &hf_tn5250_wssf_flag2_4
,
6360 { "Bit 4", "tn5250.wssf_flag2_4",
6361 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_4
),
6362 0x10, NULL
, HFILL
}},
6363 { &hf_tn5250_wssf_flag2_5
,
6364 { "Bit 5", "tn5250.wssf_flag2_5",
6365 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_5
),
6366 0x20, NULL
, HFILL
}},
6367 { &hf_tn5250_wssf_flag2_6
,
6368 { "Bit 6", "tn5250.wssf_flag2_6",
6369 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_6
),
6370 0x40, NULL
, HFILL
}},
6371 { &hf_tn5250_wssf_flag2_7
,
6372 { "Bit 7", "tn5250.wssf_flag2_7",
6373 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_7
),
6374 0x80, NULL
, HFILL
}},
6376 /* 15.26.1 WRITE SINGLE STRUCTURED FIELD Command - 5250 WSC CUSTOMIZATION Command
6377 - Keystroke Buffering Control Minor Structure*/
6378 { &hf_tn5250_wssf_kbc_flag1
,
6379 { "Byte 1", "tn5250.wssf_kbc_flag1",
6380 FT_UINT8
, BASE_HEX
, NULL
, 0,
6382 { &hf_tn5250_wssf_kbc_flag1_reserved
,
6383 { "Reserved", "tn5250.wssf_kbc_flag1_reserved", FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
,
6384 RVALS(vals_tn5250_reserved
), 0x1F, NULL
, HFILL
}},
6385 { &hf_tn5250_wssf_kbc_flag1_5
,
6386 { "Bit 5", "tn5250.wssf_kbc_flag1_5",
6387 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_kbc_flag1_5
),
6388 0x20, NULL
, HFILL
}},
6389 { &hf_tn5250_wssf_kbc_flag1_6
,
6390 { "Bit 6", "tn5250.wssf_kbc_flag1_6",
6391 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_kbc_flag1_6
),
6392 0x40, NULL
, HFILL
}},
6393 { &hf_tn5250_wssf_kbc_flag1_7
,
6394 { "Bit 7", "tn5250.wssf_kbc_flag1_7",
6395 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_kbc_flag1_7
),
6396 0x80, NULL
, HFILL
}},
6398 /* 15.26.1 WRITE SINGLE STRUCTURED FIELD Command - 5250 WSC CUSTOMIZATION Command
6399 - Cursor Control Minor Structure*/
6400 { &hf_tn5250_wssf_cc_flag1
,
6401 { "Byte 1", "tn5250.wssf_cc_flag1",
6402 FT_UINT8
, BASE_HEX
, NULL
, 0,
6404 { &hf_tn5250_wssf_cc_flag1_reserved
,
6405 { "Reserved", "tn5250.wssf_cc_flag1_reserved", FT_UINT8
, BASE_HEX
,
6406 NULL
, 0x7F, NULL
, HFILL
}},
6407 { &hf_tn5250_wssf_cc_flag1_7
,
6408 { "Bit 7", "tn5250.wssf_cc_flag1_7",
6409 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_cc_flag1_7
),
6410 0x80, NULL
, HFILL
}},
6412 /* 15.26.2 WRITE SINGLE STRUCTURED FIELD Command - IMAGE/FAX CONTROL Command */
6413 { &hf_tn5250_wssf_ifc_flag1
,
6414 { "Byte 1", "tn5250.wssf_ifc_flag1",
6415 FT_UINT8
, BASE_HEX
, NULL
, 0,
6417 { &hf_tn5250_wssf_ifc_flag1_0
,
6418 { "Bit 0 (Cache allowed flag)", "tn5250.wssf_ifc_flag1_0",
6419 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag1_0
),
6420 0x01, NULL
, HFILL
}},
6421 { &hf_tn5250_wssf_ifc_flag1_1to3
,
6422 { "Bits 1-3 (Type of image/fax display)", "tn5250.wssf_ifc_flag1_1to3", FT_UINT8
, BASE_HEX
,
6423 VALS(tn5250_vals_tn5250_wssf_ifc_vals
), 0x0E, NULL
, HFILL
}},
6424 { &hf_tn5250_wssf_ifc_flag1_4
,
6425 { "Bit 4 (Color importance during scaling)", "tn5250.wssf_ifc_flag1_4",
6426 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag1_4
),
6427 0x10, NULL
, HFILL
}},
6428 { &hf_tn5250_wssf_ifc_flag1_5
,
6429 { "Bit 5 (Allow display to control scaling)", "tn5250.wssf_ifc_flag1_5",
6430 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag1_5
),
6431 0x20, NULL
, HFILL
}},
6432 { &hf_tn5250_wssf_ifc_flag1_6
,
6433 { "Bit 6 (Reverse image)", "tn5250.wssf_ifc_flag1_6",
6434 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag1_6
),
6435 0x40, NULL
, HFILL
}},
6436 { &hf_tn5250_wssf_ifc_flag1_7
,
6437 { "Bit 7 (Allow/Inhibit EasyScroll with a mouse)", "tn5250.wssf_ifc_flag1_7",
6438 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag1_7
),
6439 0x80, NULL
, HFILL
}},
6441 { &hf_tn5250_wssf_ifc_flag2
,
6442 { "Byte 2", "tn5250.wssf_ifc_flag2",
6443 FT_UINT8
, BASE_HEX
, NULL
, 0,
6445 { &hf_tn5250_wssf_ifc_flag2_0
,
6446 { "Bit 0 (Duplicate Scan Lines)", "tn5250.wssf_ifc_flag2_0",
6447 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag2_0
),
6448 0x01, NULL
, HFILL
}},
6449 { &hf_tn5250_wssf_ifc_flag2_1
,
6450 { "Bit 1 (Allow/Inhibit Trim Magnify Scaling)", "tn5250.wssf_ifc_flag2_1",
6451 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag2_1
),
6452 0x02, NULL
, HFILL
}},
6453 { &hf_tn5250_wssf_ifc_flag2_reserved
,
6454 { "Reserved", "tn5250.wssf_ifc_flag2_reserved", FT_UINT8
, BASE_HEX
,
6455 NULL
, 0x7C, NULL
, HFILL
}},
6456 { &hf_tn5250_wssf_ifc_flag2_7
,
6457 { "Bit 7", "tn5250.wssf_ifc_flag2_7",
6458 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag2_7
),
6459 0x80, NULL
, HFILL
}},
6461 { &hf_tn5250_wssf_ifc_image_format
,
6462 { "Image Format", "tn5250.wssf_ifc_image_format",
6463 FT_UINT16
, BASE_DEC
, VALS(vals_tn5250_image_format
), 0,
6466 { &hf_tn5250_wssf_ifc_viewport_location_row
,
6467 { "Viewport Location (Row)", "tn5250.wssf_ifc_viewport_location_row",
6468 FT_UINT8
, BASE_DEC
, NULL
, 0,
6470 { &hf_tn5250_wssf_ifc_viewport_location_col
,
6471 { "Viewport Location (Column)", "tn5250.wssf_ifc_viewport_location_col",
6472 FT_UINT8
, BASE_DEC
, NULL
, 0,
6474 { &hf_tn5250_wssf_ifc_viewport_size_row
,
6475 { "Viewport Size (Row)", "tn5250.wssf_ifc_viewport_size_row",
6476 FT_UINT8
, BASE_DEC
, NULL
, 0,
6478 { &hf_tn5250_wssf_ifc_viewport_size_col
,
6479 { "Viewport Size (Column)", "tn5250.wssf_ifc_viewport_size_col",
6480 FT_UINT8
, BASE_DEC
, NULL
, 0,
6483 { &hf_tn5250_wssf_ifc_scaling
,
6484 { "Scaling", "tn5250.wssf_ifc_scaling",
6485 FT_UINT16
, BASE_HEX
, VALS(vals_tn5250_wssf_ifc_scaling
), 0,
6488 { &hf_tn5250_wssf_ifc_viewimage_location_row
,
6489 { "View Image Location (Vertical Percentage)", "tn5250.wssf_ifc_viewimage_location_row",
6490 FT_UINT8
, BASE_DEC
, NULL
, 0,
6492 { &hf_tn5250_wssf_ifc_viewimage_location_col
,
6493 { "View Image Location (Horizontal Position)", "tn5250.wssf_ifc_viewimage_location_col",
6494 FT_UINT8
, BASE_DEC
, NULL
, 0,
6497 { &hf_tn5250_wssf_ifc_rotation
,
6498 { "Rotation (Degrees)", "tn5250.wssf_ifc_rotation",
6499 FT_UINT16
, BASE_DEC
, NULL
, 0,
6502 { &hf_tn5250_wssf_ifc_foreground_color
,
6503 { "Foreground Color", "tn5250.wssf_ifc_foreground_color",
6504 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_foreground_color_attributes
), 0,
6507 { &hf_tn5250_wssf_ifc_background_color
,
6508 { "Background Color", "tn5250.wssf_ifc_background_color",
6509 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_foreground_color_attributes
), 0,
6512 { &hf_tn5250_wssf_ifc_imagefax_name
,
6513 { "Image/Fax Name", "tn5250.wssf_ifc_imagefax_name",
6514 FT_STRING
, BASE_NONE
, NULL
, 0,
6517 /* 15.26.3 WRITE SINGLE STRUCTURED FIELD Command - IMAGE/FAX DOWNLOAD Command */
6518 { &hf_tn5250_wssf_ifd_flag1
,
6519 { "Byte 1", "tn5250.wssf_ifd_flag1",
6520 FT_UINT8
, BASE_HEX
, NULL
, 0,
6522 { &hf_tn5250_wssf_ifd_flag1_0
,
6523 { "Bit 0 (Last Data Stream flag)", "tn5250.wssf_ifd_flag1_0",
6524 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifd_flag1_0
),
6525 0x01, NULL
, HFILL
}},
6526 { &hf_tn5250_wssf_ifd_flag1_reserved
,
6527 { "Reserved", "tn5250.wssf_ifd_flag1_reserved", FT_UINT8
, BASE_HEX
,
6528 NULL
, 0xFE, NULL
, HFILL
}},
6530 { &hf_tn5250_wssf_ifd_imagefax_name
,
6531 { "Image/Fax Name", "tn5250.wssf_ifd_imagefax_name",
6532 FT_STRING
, BASE_NONE
, NULL
, 0,
6534 { &hf_tn5250_wssf_ifd_imagefax_data
,
6535 { "Image/Fax Data", "tn5250.wssf_ifd_imagefax_data",
6536 FT_BYTES
, BASE_NONE
, NULL
, 0,
6539 { &hf_tn5250_image_fax_error
,
6540 { "Image/Fax Error", "tn5250.image_fax_error",
6541 FT_UINT16
, BASE_HEX
, VALS(vals_tn5250_image_fax_error
), 0,
6544 /* 15.26.4 WRITE SINGLE STRUCTURED FIELD Command - Video/Audio Controls Command Major Structure */
6545 { &hf_tn5250_vac_prefix
,
6546 { "Video/Audio Control Data Prefix", "tn5250.vac_data_prefix",
6547 FT_UINT16
, BASE_HEX
, NULL
, 0,
6549 { &hf_tn5250_vac_data
,
6550 { "Video/Audio Control Data", "tn5250.vac_data",
6551 FT_UINT32
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_vac_data
), 0,
6554 /* Appendix B.1 WRITE SINGLE STRUCTURED FIELD Command - True Transparency Write Command Major Structure */
6555 { &hf_tn5250_wssf_ttw_flag
,
6556 { "Flag", "tn5250.wssf_ttw_flag",
6557 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_wssf_ttw_flag
), 0,
6559 /* XXX - the document says "Currently, this command is designed
6560 only to pass ASCII data to some type of ASCII device."; should it
6561 be treated as an ASCII string? */
6562 { &hf_tn5250_wssf_ttw_data
,
6563 { "Transparent Data", "tn5250.wssf_ttw_data",
6564 FT_BYTES
, BASE_NONE
, NULL
, 0,
6567 /* 15.27 WRITE STRUCTURED FIELD (WSF) Command */
6568 /* 15.27.3 WRITE STRUCTURED FIELD (WSF) Command - 5250 QUERY STATION STATE Command*/
6569 { &hf_tn5250_wsf_qss_flag1
,
6570 { "Byte 1", "tn5250.wsf_qss_flag1",
6571 FT_UINT8
, BASE_HEX
, NULL
, 0,
6573 { &hf_tn5250_wsf_qss_flag1_0
,
6574 { "Bit 0", "tn5250.wsf_qss_flag1_0",
6575 FT_BOOLEAN
, 8, TFS(&tn5250_field_wsf_qss_flag1_0
),
6576 0x01, NULL
, HFILL
}},
6577 { &hf_tn5250_wsf_qss_flag1_reserved
,
6578 { "Reserved", "tn5250.wsf_qss_flag1_reserved", FT_UINT8
, BASE_HEX
,
6579 NULL
, 0xFE, NULL
, HFILL
}},
6580 { &hf_tn5250_wsf_qss_flag2
,
6581 { "Byte 2", "tn5250.wsf_qss_flag2",
6582 FT_UINT8
, BASE_HEX
, NULL
, 0,
6584 { &hf_tn5250_wsf_qss_flag2_reserved
,
6585 { "Reserved", "tn5250.wsf_qss_flag2_reserved", FT_UINT8
, BASE_HEX
,
6586 NULL
, 0x7F, NULL
, HFILL
}},
6587 { &hf_tn5250_wsf_qss_flag2_7
,
6588 { "Bit 7", "tn5250.wsf_qss_flag2_7",
6589 FT_BOOLEAN
, 8, TFS(&tn5250_field_wsf_qss_flag2_7
),
6590 0x80, NULL
, HFILL
}},
6592 /* 15.27.4.1 DEFINE AUDIT WINDOW TABLE Command */
6593 { &hf_tn5250_dawt_id
,
6594 { "ID", "tn5250.dawt_id",
6595 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dawt_id
), 0,
6597 { &hf_tn5250_dawt_length
,
6598 { "Length", "tn5250.dawt_length",
6599 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dawt_length
), 0,
6602 { &hf_tn5250_dawt_char
,
6603 { "Character", "tn5250.dawt_char",
6604 FT_STRING
, BASE_NONE
, NULL
, 0,
6606 { &hf_tn5250_dawt_message
,
6607 { "Message", "tn5250.dawt_message",
6608 FT_STRING
, BASE_NONE
, NULL
, 0,
6611 /* 15.27.4.2 DEFINE COMMAND KEY FUNCTION Command */
6612 { &hf_tn5250_dckf_id
,
6613 { "ID", "tn5250.dckf_id",
6614 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dckf_id
), 0,
6616 { &hf_tn5250_dckf_length
,
6617 { "Length", "tn5250.dckf_length",
6618 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dckf_length
), 0,
6620 { &hf_tn5250_dckf_key_code
,
6621 { "Key Code", "tn5250.dckf_key_code",
6622 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dckf_key_code
), 0,
6624 { &hf_tn5250_dckf_function_code
,
6625 { "Function Code", "tn5250.dckf_function_code",
6626 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_dckf_function_code
), 0,
6628 { &hf_tn5250_dckf_prompt_text
,
6629 { "Prompt Text", "tn5250.dckf_prompt_text",
6630 FT_STRING
, BASE_NONE
, NULL
, 0,
6633 /* 15.27.4.3 READ TEXT SCREEN Command */
6634 { &hf_tn5250_rts_partition
,
6635 { "Partition", "tn5250.rts_partition",
6636 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
6638 { &hf_tn5250_rts_flag1
,
6639 { "Byte 1", "tn5250.rts_flag1",
6640 FT_UINT8
, BASE_HEX
, NULL
, 0,
6642 { &hf_tn5250_rts_flag1_0
,
6643 { "Bit 0 (Last Data Stream flag)", "tn5250.rts_flag1_0",
6644 FT_BOOLEAN
, 8, TFS(&tn5250_field_rts_flag1_0
),
6645 0x01, NULL
, HFILL
}},
6646 { &hf_tn5250_rts_flag1_reserved
,
6647 { "Reserved", "tn5250.rts_flag1_reserved", FT_UINT8
, BASE_HEX
,
6648 NULL
, 0xFE, NULL
, HFILL
}},
6650 /* 15.27.4.4 DEFINE PENDING OPERATIONS Command */
6651 { &hf_tn5250_dpo_partition
,
6652 { "Partition", "tn5250.dpo_partition",
6653 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
6655 { &hf_tn5250_dpo_flag1
,
6656 { "Byte 1", "tn5250.dpo_flag1",
6657 FT_UINT8
, BASE_HEX
, NULL
, 0,
6659 { &hf_tn5250_dpo_flag1_0
,
6660 { "Bit 0", "tn5250.dpo_flag1_0",
6661 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_0
),
6662 0x01, NULL
, HFILL
}},
6663 { &hf_tn5250_dpo_flag1_1
,
6664 { "Bit 1", "tn5250.dpo_flag1_1",
6665 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_1
),
6666 0x02, NULL
, HFILL
}},
6667 { &hf_tn5250_dpo_flag1_2
,
6668 { "Bit 2", "tn5250.dpo_flag1_2",
6669 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_2
),
6670 0x04, NULL
, HFILL
}},
6671 { &hf_tn5250_dpo_flag1_3
,
6672 { "Bit 3", "tn5250.dpo_flag1_3",
6673 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_3
),
6674 0x08, NULL
, HFILL
}},
6675 { &hf_tn5250_dpo_flag1_4
,
6676 { "Bit 4", "tn5250.dpo_flag1_4",
6677 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_4
),
6678 0x10, NULL
, HFILL
}},
6679 { &hf_tn5250_dpo_flag1_5
,
6680 { "Bit 5", "tn5250.dpo_flag1_5",
6681 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_5
),
6682 0x20, NULL
, HFILL
}},
6683 { &hf_tn5250_dpo_flag1_6
,
6684 { "Bit 6", "tn5250.dpo_flag1_6",
6685 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_6
),
6686 0x40, NULL
, HFILL
}},
6687 { &hf_tn5250_dpo_flag1_7
,
6688 { "Bit 7", "tn5250.dpo_flag1_7",
6689 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_7
),
6690 0x80, NULL
, HFILL
}},
6692 { &hf_tn5250_dpo_flag2
,
6693 { "Byte 1", "tn5250.dpo_flag2",
6694 FT_UINT8
, BASE_HEX
, NULL
, 0,
6696 { &hf_tn5250_dpo_flag2_0
,
6697 { "Bit 0", "tn5250.dpo_flag2_0",
6698 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag2_0
),
6699 0x01, NULL
, HFILL
}},
6700 { &hf_tn5250_dpo_flag2_reserved
,
6701 { "Reserved", "tn5250.dpo_flag2_reserved", FT_UINT8
, BASE_HEX
,
6702 NULL
, 0xFE, NULL
, HFILL
}},
6704 { &hf_tn5250_dpo_displace_characters
,
6705 { "Displaced Characters", "tn5250.dpo_displace_characters",
6706 FT_STRING
, BASE_NONE
, NULL
, 0,
6709 { &hf_tn5250_dpo_start_location_row
,
6710 { "Start Location (Row)", "tn5250.dpo_start_location_row",
6711 FT_UINT16
, BASE_DEC
, NULL
, 0,
6713 { &hf_tn5250_dpo_start_location_col
,
6714 { "Start Location (Column)", "tn5250.dpo_start_location_col",
6715 FT_UINT16
, BASE_DEC
, NULL
, 0,
6718 /* 15.27.4.5 DEFINE TEXT SCREEN FORMAT Command */
6719 { &hf_tn5250_dtsf_partition
,
6720 { "Partition", "tn5250.dtsf_partition",
6721 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
6723 { &hf_tn5250_dtsf_flag1
,
6724 { "Byte 1", "tn5250.dtsf_flag1",
6725 FT_UINT8
, BASE_HEX
, NULL
, 0,
6727 { &hf_tn5250_dtsf_flag1_0
,
6728 { "Bit 0", "tn5250.dtsf_flag1_0",
6729 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_0
),
6730 0x01, NULL
, HFILL
}},
6731 { &hf_tn5250_dtsf_flag1_1
,
6732 { "Bit 1", "tn5250.dtsf_flag1_1",
6733 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_1
),
6734 0x02, NULL
, HFILL
}},
6735 { &hf_tn5250_dtsf_flag1_2
,
6736 { "Bit 2", "tn5250.dtsf_flag1_2",
6737 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_2
),
6738 0x04, NULL
, HFILL
}},
6739 { &hf_tn5250_dtsf_flag1_3
,
6740 { "Bit 3", "tn5250.dtsf_flag1_3",
6741 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_3
),
6742 0x08, NULL
, HFILL
}},
6743 { &hf_tn5250_dtsf_flag1_4
,
6744 { "Bit 4", "tn5250.dtsf_flag1_4",
6745 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_4
),
6746 0x10, NULL
, HFILL
}},
6747 { &hf_tn5250_dtsf_flag1_5
,
6748 { "Bit 5", "tn5250.dtsf_flag1_5",
6749 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_5
),
6750 0x20, NULL
, HFILL
}},
6751 { &hf_tn5250_dtsf_flag1_6
,
6752 { "Bit 6", "tn5250.dtsf_flag1_6",
6753 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_6
),
6754 0x40, NULL
, HFILL
}},
6755 { &hf_tn5250_dtsf_flag1_7
,
6756 { "Bit 7", "tn5250.dtsf_flag1_7",
6757 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_7
),
6758 0x80, NULL
, HFILL
}},
6760 { &hf_tn5250_dtsf_flag2
,
6761 { "Byte 1", "tn5250.dtsf_flag2",
6762 FT_UINT8
, BASE_HEX
, NULL
, 0,
6764 { &hf_tn5250_dtsf_flag2_0
,
6765 { "Bit 0", "tn5250.dtsf_flag2_0",
6766 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag2_0
),
6767 0x01, NULL
, HFILL
}},
6768 { &hf_tn5250_dtsf_flag2_1
,
6769 { "Bit 1", "tn5250.dtsf_flag2_1",
6770 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag2_1
),
6771 0x02, NULL
, HFILL
}},
6772 { &hf_tn5250_dtsf_flag2_2
,
6773 { "Bit 2", "tn5250.dtsf_flag2_2",
6774 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag2_2
),
6775 0x04, NULL
, HFILL
}},
6776 { &hf_tn5250_dtsf_flag2_3
,
6777 { "Bit 3", "tn5250.dtsf_flag2_3",
6778 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag2_3
),
6779 0x08, NULL
, HFILL
}},
6780 { &hf_tn5250_dtsf_flag2_4to7
,
6781 { "Bits 4 to 7", "tn5250.dtsf_flag2_4to7",
6782 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dtsf_flag2_vals
), 0xF0,
6785 { &hf_tn5250_dtsf_text_body_height
,
6786 { "Text Body Height", "tn5250.dtsf_text_body_height",
6787 FT_UINT16
, BASE_DEC
, NULL
, 0,
6789 { &hf_tn5250_dtsf_text_body_width
,
6790 { "Text Body Width", "tn5250.dtsf_text_body_width",
6791 FT_UINT16
, BASE_DEC
, NULL
, 0,
6794 { &hf_tn5250_dtsf_line_cmd_field_size
,
6795 { "Line Cmd Field Size", "tn5250.dtsf_line_cmd_field_size",
6796 FT_UINT8
, BASE_DEC
, NULL
, 0,
6798 { &hf_tn5250_dtsf_location_of_pitch
,
6799 { "Location of Pitch", "tn5250.dtsf_location_of_pitch",
6800 FT_UINT8
, BASE_DEC
, NULL
, 0,
6802 { &hf_tn5250_dtsf_first_line
,
6803 { "First Line in Text Body", "tn5250.dtsf_first_line",
6804 FT_UINT8
, BASE_DEC
, NULL
, 0,
6807 /* 15.27.4.6 DEFINE SCALE LINE Command */
6808 { &hf_tn5250_dsl_partition
,
6809 { "Partition", "tn5250.dsl_partition",
6810 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
6812 { &hf_tn5250_dsl_rtl_offset
,
6813 { "RTL Offset", "tn5250.dsl_rtl_offset",
6814 FT_UINT8
, BASE_DEC
, NULL
, 0,
6816 { &hf_tn5250_dsl_offset
,
6817 { "Offset", "tn5250.dsl_offset",
6818 FT_UINT8
, BASE_DEC
, NULL
, 0,
6821 { &hf_tn5250_dsl_flag1
,
6822 { "Byte 1", "tn5250.dsl_flag1",
6823 FT_UINT8
, BASE_HEX
, NULL
, 0,
6825 { &hf_tn5250_dsl_flag1_0
,
6826 { "Bit 0", "tn5250.dsl_flag1_0",
6827 FT_BOOLEAN
, 8, TFS(&tn5250_field_dsl_flag1_0
),
6828 0x01, NULL
, HFILL
}},
6829 { &hf_tn5250_dsl_flag1_1
,
6830 { "Bit 1", "tn5250.dsl_flag1_1",
6831 FT_BOOLEAN
, 8, TFS(&tn5250_field_dsl_flag1_1
),
6832 0x02, NULL
, HFILL
}},
6833 { &hf_tn5250_dsl_flag1_2
,
6834 { "Bit 2", "tn5250.dsl_flag1_2",
6835 FT_BOOLEAN
, 8, TFS(&tn5250_field_dsl_flag1_2
),
6836 0x04, NULL
, HFILL
}},
6837 { &hf_tn5250_dsl_flag1_reserved
,
6838 { "Reserved", "tn5250.dsl_flag1_reserved", FT_UINT8
, BASE_HEX
,
6839 NULL
, 0xF8, NULL
, HFILL
}},
6841 { &hf_tn5250_dsl_id
,
6842 { "ID", "tn5250.dsl_id",
6843 FT_UINT8
, BASE_HEX
, NULL
, 0,
6845 { &hf_tn5250_dsl_location
,
6846 { "Location", "tn5250.dsl_location",
6847 FT_UINT8
, BASE_DEC
, NULL
, 0,
6849 { &hf_tn5250_dsl_function
,
6850 { "Function", "tn5250.dsl_function",
6851 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dsl_function
), 0x00,
6854 /* 15.27.4.7 WRITE TEXT SCREEN Command */
6855 { &hf_tn5250_wts_partition
,
6856 { "Partition", "tn5250.wts_partition",
6857 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
6860 { &hf_tn5250_wts_flag1
,
6861 { "Byte 1", "tn5250.wts_flag1",
6862 FT_UINT8
, BASE_HEX
, NULL
, 0,
6864 { &hf_tn5250_wts_flag1_0
,
6865 { "Bit 0", "tn5250.wts_flag1_0",
6866 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag1_0
),
6867 0x01, NULL
, HFILL
}},
6868 { &hf_tn5250_wts_flag1_1
,
6869 { "Bit 1", "tn5250.wts_flag1_1",
6870 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag1_1
),
6871 0x02, NULL
, HFILL
}},
6872 { &hf_tn5250_wts_flag1_2
,
6873 { "Bit 2", "tn5250.wts_flag1_2",
6874 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag1_2
),
6875 0x04, NULL
, HFILL
}},
6876 { &hf_tn5250_wts_flag1_3
,
6877 { "Bit 3", "tn5250.wts_flag1_3",
6878 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag1_3
),
6879 0x08, NULL
, HFILL
}},
6880 { &hf_tn5250_wts_flag1_reserved
,
6881 { "Reserved", "tn5250.wts_flag1_reserved", FT_UINT8
, BASE_HEX
,
6882 NULL
, 0xF0, NULL
, HFILL
}},
6884 { &hf_tn5250_wts_flag2
,
6885 { "Byte 2", "tn5250.wts_flag2",
6886 FT_UINT8
, BASE_HEX
, NULL
, 0,
6888 { &hf_tn5250_wts_flag2_reserved
,
6889 { "Reserved", "tn5250.wts_flag2_reserved", FT_UINT8
, BASE_HEX
,
6890 NULL
, 0x1F, NULL
, HFILL
}},
6891 { &hf_tn5250_wts_flag2_6
,
6892 { "Bit 6", "tn5250.wts_flag2_6",
6893 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag2_6
),
6894 0x20, NULL
, HFILL
}},
6895 { &hf_tn5250_wts_flag2_reserved2
,
6896 { "Reserved", "tn5250.wts_flag2_reserved2", FT_UINT8
, BASE_HEX
,
6897 NULL
, 0xC0, NULL
, HFILL
}},
6899 { &hf_tn5250_wts_flag3
,
6900 { "Byte 3", "tn5250.wts_flag3",
6901 FT_UINT8
, BASE_HEX
, NULL
, 0,
6903 { &hf_tn5250_wts_flag3_0
,
6904 { "Bit 0", "tn5250.wts_flag3_0",
6905 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_0
),
6906 0x01, NULL
, HFILL
}},
6907 { &hf_tn5250_wts_flag3_1
,
6908 { "Bit 1", "tn5250.wts_flag3_1",
6909 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_1
),
6910 0x02, NULL
, HFILL
}},
6911 { &hf_tn5250_wts_flag3_2
,
6912 { "Bit 2", "tn5250.wts_flag3_2",
6913 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_2
),
6914 0x04, NULL
, HFILL
}},
6915 { &hf_tn5250_wts_flag3_3
,
6916 { "Bit 3", "tn5250.wts_flag3_3",
6917 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_3
),
6918 0x08, NULL
, HFILL
}},
6919 { &hf_tn5250_wts_flag3_4
,
6920 { "Bit 4", "tn5250.wts_flag3_4",
6921 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_4
),
6922 0x10, NULL
, HFILL
}},
6923 { &hf_tn5250_wts_flag3_5
,
6924 { "Bit 5", "tn5250.wts_flag3_5",
6925 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_5
),
6926 0x20, NULL
, HFILL
}},
6927 { &hf_tn5250_wts_flag3_6
,
6928 { "Bit 6", "tn5250.wts_flag3_6",
6929 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_6
),
6930 0x40, NULL
, HFILL
}},
6931 { &hf_tn5250_wts_flag3_7
,
6932 { "Bit 7", "tn5250.wts_flag3_7",
6933 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_7
),
6934 0x80, NULL
, HFILL
}},
6936 { &hf_tn5250_wts_home_position_row
,
6937 { "Home Position (Row)", "tn5250.wts_home_position_row",
6938 FT_UINT16
, BASE_DEC
, NULL
, 0,
6940 { &hf_tn5250_wts_home_position_col
,
6941 { "Home Position (Column)", "tn5250.wts_home_position_col",
6942 FT_UINT16
, BASE_DEC
, NULL
, 0,
6945 /* Structure of the WRITE TEXT SCREEN Command Line Data */
6946 { &hf_tn5250_wts_cld_flag1
,
6947 { "Byte 1", "tn5250.wts_cld_flag1",
6948 FT_UINT8
, BASE_HEX
, NULL
, 0,
6950 { &hf_tn5250_wts_cld_flag1_0
,
6951 { "Bit 0", "tn5250.wts_cld_flag1_0",
6952 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_0
),
6953 0x01, NULL
, HFILL
}},
6954 { &hf_tn5250_wts_cld_flag1_1
,
6955 { "Bit 1", "tn5250.wts_cld_flag1_1",
6956 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_1
),
6957 0x02, NULL
, HFILL
}},
6958 { &hf_tn5250_wts_cld_flag1_2
,
6959 { "Bit 2", "tn5250.wts_cld_flag1_2",
6960 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_2
),
6961 0x04, NULL
, HFILL
}},
6962 { &hf_tn5250_wts_cld_flag1_3
,
6963 { "Bit 3", "tn5250.wts_cld_flag1_3",
6964 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_3
),
6965 0x08, NULL
, HFILL
}},
6966 { &hf_tn5250_wts_cld_flag1_4
,
6967 { "Bit 4", "tn5250.wts_cld_flag1_4",
6968 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_4
),
6969 0x10, NULL
, HFILL
}},
6970 { &hf_tn5250_wts_cld_flag1_5
,
6971 { "Bit 5", "tn5250.wts_cld_flag1_5",
6972 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_5
),
6973 0x20, NULL
, HFILL
}},
6974 { &hf_tn5250_wts_cld_flag1_6
,
6975 { "Bit 6", "tn5250.wts_cld_flag1_6",
6976 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_6
),
6977 0x40, NULL
, HFILL
}},
6978 { &hf_tn5250_wts_cld_flag1_7
,
6979 { "Bit 7", "tn5250.wts_cld_flag1_7",
6980 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_7
),
6981 0x80, NULL
, HFILL
}},
6983 { &hf_tn5250_wts_cld_flag2
,
6984 { "Byte 2", "tn5250.wts_cld_flag2",
6985 FT_UINT8
, BASE_HEX
, NULL
, 0,
6987 { &hf_tn5250_wts_cld_flag2_0
,
6988 { "Bit 0", "tn5250.wts_cld_flag2_0",
6989 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag2_0
),
6990 0x01, NULL
, HFILL
}},
6991 { &hf_tn5250_wts_cld_flag2_1
,
6992 { "Bit 1", "tn5250.wts_cld_flag2_1",
6993 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag2_1
),
6994 0x02, NULL
, HFILL
}},
6995 { &hf_tn5250_wts_cld_flag2_2
,
6996 { "Bit 2", "tn5250.wts_cld_flag2_2",
6997 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag2_2
),
6998 0x04, NULL
, HFILL
}},
6999 { &hf_tn5250_wts_cld_flag2_3
,
7000 { "Bit 3", "tn5250.wts_cld_flag2_3",
7001 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag2_3
),
7002 0x08, NULL
, HFILL
}},
7003 { &hf_tn5250_wts_cld_flag2_4
,
7004 { "Bit 4", "tn5250.wts_cld_flag2_4",
7005 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag2_4
),
7006 0x10, NULL
, HFILL
}},
7007 { &hf_tn5250_wts_cld_flag2_line_spacing
,
7008 { "Line Spacing in Half-Units", "tn5250.wts_cld_flag2_line_spacing", FT_UINT8
, BASE_DEC
,
7009 NULL
, 0xE0, NULL
, HFILL
}},
7011 { &hf_tn5250_wts_cld_row
,
7012 { "Row", "tn5250.wts_cld_row",
7013 FT_UINT16
, BASE_DEC
, NULL
, 0,
7016 { &hf_tn5250_wts_cld_flag3
,
7017 { "Byte 3", "tn5250.wts_cld_flag3",
7018 FT_UINT8
, BASE_HEX
, NULL
, 0,
7020 { &hf_tn5250_wts_cld_flag3_0
,
7021 { "Bit 0", "tn5250.wts_cld_flag3_0",
7022 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_0
),
7023 0x01, NULL
, HFILL
}},
7024 { &hf_tn5250_wts_cld_flag3_1
,
7025 { "Bit 1", "tn5250.wts_cld_flag3_1",
7026 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_1
),
7027 0x02, NULL
, HFILL
}},
7028 { &hf_tn5250_wts_cld_flag3_2
,
7029 { "Bit 2", "tn5250.wts_cld_flag3_2",
7030 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_2
),
7031 0x04, NULL
, HFILL
}},
7032 { &hf_tn5250_wts_cld_flag3_3
,
7033 { "Bit 3", "tn5250.wts_cld_flag3_3",
7034 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_3
),
7035 0x08, NULL
, HFILL
}},
7036 { &hf_tn5250_wts_cld_flag3_4
,
7037 { "Bit 4", "tn5250.wts_cld_flag3_4",
7038 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_4
),
7039 0x10, NULL
, HFILL
}},
7040 { &hf_tn5250_wts_cld_flag3_5
,
7041 { "Bit 5", "tn5250.wts_cld_flag3_5",
7042 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_5
),
7043 0x20, NULL
, HFILL
}},
7044 { &hf_tn5250_wts_cld_flag3_6
,
7045 { "Bit 6", "tn5250.wts_cld_flag3_6",
7046 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_6
),
7047 0x40, NULL
, HFILL
}},
7048 { &hf_tn5250_wts_cld_flag3_7
,
7049 { "Bit 7", "tn5250.wts_cld_flag3_7",
7050 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_7
),
7051 0x80, NULL
, HFILL
}},
7053 { &hf_tn5250_wts_cld_page_num
,
7054 { "Page Number", "tn5250.wts_cld_page_num",
7055 FT_UINT16
, BASE_DEC
, NULL
, 0,
7058 { &hf_tn5250_wts_cld_lmo
,
7059 { "Left Margin Offset", "tn5250.wts_cld_lmo",
7060 FT_UINT8
, BASE_DEC
, NULL
, 0,
7062 { &hf_tn5250_wts_cld_io
,
7063 { "Indent Offset", "tn5250.wts_cld_io",
7064 FT_UINT8
, BASE_DEC
, NULL
, 0,
7066 { &hf_tn5250_wts_cld_sli
,
7067 { "Scale Line ID", "tn5250.wts_cld_sli",
7068 FT_UINT8
, BASE_DEC
, NULL
, 0,
7070 { &hf_tn5250_wts_cld_li
,
7071 { "Line Image", "tn5250.wts_cld_li",
7072 FT_STRING
, BASE_NONE
, NULL
, 0,
7075 /* 15.27.4.8 DEFINE SPECIAL CHARACTERS Command */
7076 { &hf_tn5250_dsc_partition
,
7077 { "Partition", "tn5250.dsc_partition",
7078 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
7080 { &hf_tn5250_dsc_sk
,
7081 { "Symbol Key", "tn5250.dsc_sk",
7082 FT_UINT8
, BASE_HEX
, NULL
, 0,
7084 { &hf_tn5250_dsc_ev
,
7085 { "EBCDIC Value", "tn5250.dsc_ev",
7086 FT_STRING
, BASE_NONE
, NULL
, 0,
7089 /* 15.27.4.10 DEFINE OPERATOR ERROR MESSAGES Command */
7090 { &hf_tn5250_dorm_id
,
7091 { "ID", "tn5250.dorm_id",
7092 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dorm_id
), 0x00,
7094 { &hf_tn5250_dorm_length
,
7095 { "Length", "tn5250.dorm_length",
7096 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dorm_length
), 0,
7099 { &hf_tn5250_dorm_ec
,
7100 { "Error Code", "tn5250.dorm_ec",
7101 FT_UINT16
, BASE_HEX
, NULL
, 0,
7103 { &hf_tn5250_dorm_mt
,
7104 { "Message Text", "tn5250.dorm_mt",
7105 FT_STRING
, BASE_NONE
, NULL
, 0,
7108 /* 15.27.4.11 DEFINE PITCH TABLE Command */
7109 { &hf_tn5250_dpt_id
,
7110 { "ID", "tn5250.dpt_id",
7111 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dpt_id
), 0x00,
7113 { &hf_tn5250_dpt_ec
,
7114 { "EBCDIC Code", "tn5250.dpt_ec",
7115 FT_STRING
, BASE_NONE
, NULL
, 0,
7118 /* 15.27.4.12 DEFINE FAKE DP COMMAND KEY FUNCTION Command */
7119 { &hf_tn5250_dfdpck_partition
,
7120 { "Partition", "tn5250.dfdpck_partition",
7121 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
7124 { &hf_tn5250_dfdpck_data_field
,
7125 { "Data Field", "tn5250.dfdpck_data_field",
7126 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dfdpck_data_field
), 0,
7129 /* Structure of the DEFINE FAKE DP COMMAND KEY FUNCTION Core Area Command Keys */
7130 { &hf_tn5250_dfdpck_coreflag
,
7131 { "Core Area Flag", "tn5250.dfdpck_coreflag",
7132 FT_UINT8
, BASE_HEX
, NULL
, 0,
7134 { &hf_tn5250_dfdpck_coreflag_0
,
7135 { "Bit 0", "tn5250.dfdpck_coreflag_0",
7136 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_0
),
7137 0x01, NULL
, HFILL
}},
7138 { &hf_tn5250_dfdpck_coreflag_1
,
7139 { "Bit 1", "tn5250.dfdpck_coreflag_1",
7140 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_1
),
7141 0x02, NULL
, HFILL
}},
7142 { &hf_tn5250_dfdpck_coreflag_2
,
7143 { "Bit 2", "tn5250.dfdpck_coreflag_2",
7144 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_2
),
7145 0x04, NULL
, HFILL
}},
7146 { &hf_tn5250_dfdpck_coreflag_3
,
7147 { "Bit 3", "tn5250.dfdpck_coreflag_3",
7148 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_3
),
7149 0x08, NULL
, HFILL
}},
7150 { &hf_tn5250_dfdpck_coreflag_4
,
7151 { "Bit 4", "tn5250.dfdpck_coreflag_4",
7152 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_4
),
7153 0x10, NULL
, HFILL
}},
7154 { &hf_tn5250_dfdpck_coreflag_5
,
7155 { "Bit 5", "tn5250.dfdpck_coreflag_5",
7156 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_5
),
7157 0x20, NULL
, HFILL
}},
7158 { &hf_tn5250_dfdpck_coreflag_6
,
7159 { "Bit 6", "tn5250.dfdpck_coreflag_6",
7160 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_6
),
7161 0x40, NULL
, HFILL
}},
7162 { &hf_tn5250_dfdpck_coreflag_7
,
7163 { "Bit 7", "tn5250.dfdpck_coreflag_7",
7164 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_7
),
7165 0x80, NULL
, HFILL
}},
7167 /* Structure of the DEFINE FAKE DP COMMAND KEY FUNCTION Top Row Command Keys */
7169 { &hf_tn5250_dfdpck_toprowflag1
,
7170 { "Top Row Flags", "tn5250.dfdpck_toprowflag1",
7171 FT_UINT8
, BASE_HEX
, NULL
, 0,
7173 { &hf_tn5250_dfdpck_toprowflag1_0
,
7174 { "Bit 0", "tn5250.dfdpck_toprowflag1_0",
7175 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_0
),
7176 0x01, NULL
, HFILL
}},
7177 { &hf_tn5250_dfdpck_toprowflag1_1
,
7178 { "Bit 1", "tn5250.dfdpck_toprowflag1_1",
7179 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_1
),
7180 0x02, NULL
, HFILL
}},
7181 { &hf_tn5250_dfdpck_toprowflag1_2
,
7182 { "Bit 2", "tn5250.dfdpck_toprowflag1_2",
7183 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_2
),
7184 0x04, NULL
, HFILL
}},
7185 { &hf_tn5250_dfdpck_toprowflag1_3
,
7186 { "Bit 3", "tn5250.dfdpck_toprowflag1_3",
7187 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_3
),
7188 0x08, NULL
, HFILL
}},
7189 { &hf_tn5250_dfdpck_toprowflag1_4
,
7190 { "Bit 4", "tn5250.dfdpck_toprowflag1_4",
7191 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_4
),
7192 0x10, NULL
, HFILL
}},
7193 { &hf_tn5250_dfdpck_toprowflag1_5
,
7194 { "Bit 5", "tn5250.dfdpck_toprowflag1_5",
7195 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_5
),
7196 0x20, NULL
, HFILL
}},
7197 { &hf_tn5250_dfdpck_toprowflag1_6
,
7198 { "Bit 6", "tn5250.dfdpck_toprowflag1_6",
7199 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_6
),
7200 0x40, NULL
, HFILL
}},
7201 { &hf_tn5250_dfdpck_toprowflag1_7
,
7202 { "Bit 7", "tn5250.dfdpck_toprowflag1_7",
7203 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_7
),
7204 0x80, NULL
, HFILL
}},
7206 { &hf_tn5250_dfdpck_toprowflag2
,
7207 { "Top Row Flags", "tn5250.dfdpck_toprowflag2",
7208 FT_UINT8
, BASE_HEX
, NULL
, 0,
7210 { &hf_tn5250_dfdpck_toprowflag2_0
,
7211 { "Bit 0", "tn5250.dfdpck_toprowflag2_0",
7212 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_0
),
7213 0x01, NULL
, HFILL
}},
7214 { &hf_tn5250_dfdpck_toprowflag2_1
,
7215 { "Bit 1", "tn5250.dfdpck_toprowflag2_1",
7216 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_1
),
7217 0x02, NULL
, HFILL
}},
7218 { &hf_tn5250_dfdpck_toprowflag2_2
,
7219 { "Bit 2", "tn5250.dfdpck_toprowflag2_2",
7220 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_2
),
7221 0x04, NULL
, HFILL
}},
7222 { &hf_tn5250_dfdpck_toprowflag2_3
,
7223 { "Bit 3", "tn5250.dfdpck_toprowflag2_3",
7224 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_3
),
7225 0x08, NULL
, HFILL
}},
7226 { &hf_tn5250_dfdpck_toprowflag2_4
,
7227 { "Bit 4", "tn5250.dfdpck_toprowflag2_4",
7228 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_4
),
7229 0x10, NULL
, HFILL
}},
7230 { &hf_tn5250_dfdpck_toprowflag2_5
,
7231 { "Bit 5", "tn5250.dfdpck_toprowflag2_5",
7232 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_5
),
7233 0x20, NULL
, HFILL
}},
7234 { &hf_tn5250_dfdpck_toprowflag2_6
,
7235 { "Bit 6", "tn5250.dfdpck_toprowflag2_6",
7236 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_6
),
7237 0x40, NULL
, HFILL
}},
7238 { &hf_tn5250_dfdpck_toprowflag2_7
,
7239 { "Bit 7", "tn5250.dfdpck_toprowflag2_7",
7240 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_7
),
7241 0x80, NULL
, HFILL
}},
7243 { &hf_tn5250_dfdpck_toprowflag3
,
7244 { "Top Row Flags", "tn5250.dfdpck_toprowflag3",
7245 FT_UINT8
, BASE_HEX
, NULL
, 0,
7247 { &hf_tn5250_dfdpck_toprowflag3_0
,
7248 { "Bit 0", "tn5250.dfdpck_toprowflag3_0",
7249 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_0
),
7250 0x01, NULL
, HFILL
}},
7251 { &hf_tn5250_dfdpck_toprowflag3_1
,
7252 { "Bit 1", "tn5250.dfdpck_toprowflag3_1",
7253 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_1
),
7254 0x02, NULL
, HFILL
}},
7255 { &hf_tn5250_dfdpck_toprowflag3_2
,
7256 { "Bit 2", "tn5250.dfdpck_toprowflag3_2",
7257 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_2
),
7258 0x04, NULL
, HFILL
}},
7259 { &hf_tn5250_dfdpck_toprowflag3_3
,
7260 { "Bit 3", "tn5250.dfdpck_toprowflag3_3",
7261 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_3
),
7262 0x08, NULL
, HFILL
}},
7263 { &hf_tn5250_dfdpck_toprowflag3_4
,
7264 { "Bit 4", "tn5250.dfdpck_toprowflag3_4",
7265 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_4
),
7266 0x10, NULL
, HFILL
}},
7267 { &hf_tn5250_dfdpck_toprowflag3_5
,
7268 { "Bit 5", "tn5250.dfdpck_toprowflag3_5",
7269 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_5
),
7270 0x20, NULL
, HFILL
}},
7271 { &hf_tn5250_dfdpck_toprowflag3_6
,
7272 { "Bit 6", "tn5250.dfdpck_toprowflag3_6",
7273 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_6
),
7274 0x40, NULL
, HFILL
}},
7275 { &hf_tn5250_dfdpck_toprowflag3_7
,
7276 { "Bit 7", "tn5250.dfdpck_toprowflag3_7",
7277 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_7
),
7278 0x80, NULL
, HFILL
}},
7280 /* 15.28 COPY-TO-PRINTER Command */
7281 { &hf_tn5250_ctp_lsid
,
7282 { "Printer LSID", "tn5250.ctp_lsid",
7283 FT_UINT8
, BASE_HEX
, NULL
, 0,
7285 { &hf_tn5250_ctp_mlpp
,
7286 { "Max Lines Per Page", "tn5250.ctp_mlpp",
7287 FT_UINT8
, BASE_DEC
, NULL
, 0,
7290 /*TN5250 - RFC1205 - Query Reply Fields */
7291 { &hf_tn5250_qr_flag
,
7292 { "Flag", "tn5250.qr_flag",
7293 FT_UINT8
, BASE_HEX
, NULL
, 0,
7295 { &hf_tn5250_qr_flag_0
,
7296 { "Bit 1", "tn5250.qr_flag_0",
7297 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag_0
),
7298 0x80, NULL
, HFILL
}},
7299 { &hf_tn5250_qr_flag_reserved
,
7300 { "Reserved", "tn5250.qr_flag_reserved", FT_UINT8
, BASE_HEX
,
7301 NULL
, 0x7F, NULL
, HFILL
}},
7302 { &hf_tn5250_qr_chc
,
7303 { "Controller Hardware Class", "tn5250.qr_chc",
7304 FT_UINT16
, BASE_HEX
, VALS(vals_tn5250_chc
), 0x0,
7306 { &hf_tn5250_qr_ccl
,
7307 { "Controller Code Level", "tn5250.qr_ccl",
7308 FT_UINT24
, BASE_HEX
, NULL
, 0x0,
7311 { "Device Type", "tn5250.qr_dt",
7312 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_dt
), 0x0,
7314 { &hf_tn5250_qr_dtc
,
7315 { "Device Type", "tn5250.qr_dtc",
7316 FT_STRING
, BASE_NONE
, NULL
, 0x0,
7319 { "Device Model", "tn5250.qr_dm",
7320 FT_STRING
, BASE_NONE
, NULL
, 0x0,
7323 { "Keyboard ID", "tn5250.qr_ki",
7324 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_qr_ki
), 0x0,
7326 { &hf_tn5250_qr_eki
,
7327 { "Extended Keyboard ID", "tn5250.qr_eki",
7328 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
7330 { &hf_tn5250_qr_dsn
,
7331 { "Display Serial Number", "tn5250.qr_dsn",
7332 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
7334 { &hf_tn5250_qr_mni
,
7335 { "Maximum number of input fields", "tn5250.qr_mni",
7336 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
7339 { &hf_tn5250_qr_flag1
,
7340 { "Flags", "tn5250.qr_flag1",
7341 FT_UINT8
, BASE_HEX
, NULL
, 0,
7343 { &hf_tn5250_qr_flag1_0
,
7344 { "Bit 0 (Reserved)", "tn5250.qr_flag1_0",
7345 FT_BOOLEAN
, 8, NULL
,
7346 0x80, NULL
, HFILL
}},
7347 { &hf_tn5250_qr_flag1_1
,
7348 { "Bit 1", "tn5250.qr_flag1_1",
7349 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_1
),
7350 0x40, NULL
, HFILL
}},
7351 { &hf_tn5250_qr_flag1_2
,
7352 { "Bit 2", "tn5250.qr_flag1_2",
7353 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_2
),
7354 0x20, NULL
, HFILL
}},
7355 { &hf_tn5250_qr_flag1_3
,
7356 { "Bit 3", "tn5250.qr_flag1_3",
7357 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_3
),
7358 0x10, NULL
, HFILL
}},
7359 { &hf_tn5250_qr_flag1_4
,
7360 { "Bit 4", "tn5250.qr_flag1_4",
7361 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_4
),
7362 0x08, NULL
, HFILL
}},
7363 { &hf_tn5250_qr_flag1_5
,
7364 { "Bit 5", "tn5250.qr_flag1_5",
7365 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_5
),
7366 0x04, NULL
, HFILL
}},
7367 { &hf_tn5250_qr_flag1_6
,
7368 { "Bit 6", "tn5250.qr_flag1_6",
7369 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_6
),
7370 0x02, NULL
, HFILL
}},
7371 { &hf_tn5250_qr_flag1_7
,
7372 { "Bit 7", "tn5250.qr_flag1_7",
7373 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_7
),
7374 0x01, NULL
, HFILL
}},
7376 { &hf_tn5250_qr_flag2
,
7377 { "Flags", "tn5250.qr_flag2",
7378 FT_UINT8
, BASE_HEX
, NULL
, 0,
7380 { &hf_tn5250_qr_flag2_0to3
,
7381 { "Bits 0 to 3", "tn5250.qr_flag2_0to3", FT_UINT8
, BASE_HEX
,
7382 VALS(vals_tn5250_qr_flag2_0to3
), 0xF0, NULL
, HFILL
}},
7383 { &hf_tn5250_qr_flag2_4
,
7384 { "Bit 4", "tn5250.qr_flag2_4",
7385 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag2_4
),
7386 0x08, NULL
, HFILL
}},
7387 { &hf_tn5250_qr_flag2_5
,
7388 { "Bit 5", "tn5250.qr_flag2_5",
7389 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag2_5
),
7390 0x04, NULL
, HFILL
}},
7391 { &hf_tn5250_qr_flag2_6to7
,
7392 { "Bits 6 to 7", "tn5250.qr_flag2_6to7", FT_UINT8
, BASE_HEX
,
7393 VALS(vals_tn5250_qr_flag2_6to7
), 0x03, NULL
, HFILL
}},
7395 { &hf_tn5250_qr_flag3
,
7396 { "Flags", "tn5250.qr_flag3",
7397 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_qr_flag3
), 0,
7399 { &hf_tn5250_qr_flag4
,
7400 { "Flags", "tn5250.qr_flag4",
7401 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_qr_flag4
), 0,
7406 { &hf_tn5250_order_code
, { "Order Code", "tn5250.order_code",
7407 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_order_codes
), 0x0, NULL
, HFILL
}},
7408 { &hf_tn5250_attribute_type
, { "Attribute Type", "tn5250.attribute",
7409 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_attributes
), 0x0, NULL
, HFILL
}},
7410 { &hf_tn5250_aid
, { "Attention Identification", "tn5250.aid",
7411 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
,
7412 RVALS(vals_tn5250_attention_identification_bytes
), 0x0, NULL
, HFILL
}},
7414 /* Miscellaneous Fields */
7415 { &hf_tn5250_buffer_x
, { "Row Address", "tn5250.buffer_x",
7416 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7417 { &hf_tn5250_buffer_y
, { "Column Address", "tn5250.buffer_y",
7418 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7419 { &hf_tn5250_length
, { "Length", "tn5250.length",
7420 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7421 { &hf_tn5250_length_twobyte
, { "Length", "tn5250.length",
7422 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7423 { &hf_tn5250_field_data
,
7424 { "Field Data", "tn5250.field_data", FT_STRING
, BASE_NONE
, NULL
, 0x0,
7426 { &hf_tn5250_reserved
, { "Flags (Reserved)", "tn5250.reserved",
7427 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_reserved
), 0,
7429 { &hf_tn5250_unknown_data
,
7430 { "Unknown Data (Possible Mainframe/Emulator Bug)", "tn5250.unknown_data",
7431 FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
7433 /*TN5250 - RFC1205 - SNA Header Fields */
7434 { &hf_tn5250_logical_record_length
,
7435 { "TN5250 Logical Record Length", "tn5250.logical_record_length",
7436 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7437 { &hf_tn5250_sna_record_type
,
7438 { "TN5250 SNA Record Type", "tn5250.sna_record_type",
7439 FT_UINT16
, BASE_HEX
, VALS(vals_tn5250_sna_record_type
), 0x0,
7441 { &hf_tn5250_variable_record_length
,
7442 { "TN5250 Variable Record Length", "tn5250.variable_record_length",
7443 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7444 { &hf_tn5250_header_flags
, { "TN5250 SNA Flags", "tn5250.header_flags",
7445 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7446 { &hf_tn5250_ds_output_error
,
7447 { "Data Stream Output Error",
7448 "tn5250.ds_output_error", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7449 { &hf_tn5250_attn_key
,
7450 { "5250 attention key was pressed.",
7451 "tn5250.attn_key", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7452 { &hf_tn5250_sys_request_key
,
7453 { "5250 System Request key was pressed",
7454 "tn5250.sys_request_key", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7455 { &hf_tn5250_test_request_key
,
7456 { "5250 Test Request key was pressed",
7457 "tn5250.test_request_key", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7458 { &hf_tn5250_error_state
,
7460 "tn5250.error_state", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7461 { &hf_tn5250_operation_code
,
7462 { "TN5250 Operation Code", "tn5250.operation_code",
7463 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_header_operation_code
), 0x0,
7465 { &hf_tn5250_error_code
,
7466 { "TN5250 Error Code", "tn5250.error_code",
7467 FT_UINT16
, BASE_HEX
, VALS(vals_tn5250_header_error_codes
), 0x0,
7470 /* 13.4 SNA LU 4 and LU 7 Negative Responses */
7471 { &hf_tn5250_negative_response
,
7472 { "Negative Response", "tn5250.negative_response",
7473 FT_UINT32
, BASE_HEX
, VALS(vals_tn5250_negative_responses
), 0x0,
7478 static int *ett
[] = {
7482 &ett_tn5250_field_attribute
,
7483 &ett_tn5250_dfdpck_mask
,
7484 &ett_tn5250_field_validation
,
7485 &ett_tn5250_header_flags
,
7486 &ett_tn5250_roll_mask
,
7487 &ett_tn5250_soh_mask
,
7488 &ett_tn5250_soh_pf16to9_mask
,
7489 &ett_tn5250_soh_pf24to17_mask
,
7490 &ett_tn5250_soh_pf8to1_mask
,
7491 &ett_tn5250_sps_mask
,
7492 &ett_tn5250_wdsf_cw_bp_mask
,
7493 &ett_tn5250_wdsf_cw_mask
,
7494 &ett_tn5250_wdsf_cw_tf_mask
,
7495 &ett_tn5250_wdsf_deg_mask
,
7496 &ett_tn5250_wdsf_deg_ms_mask
,
7497 &ett_tn5250_wdsf_ds_ci_mask
,
7498 &ett_tn5250_wdsf_ds_cpda_mask
,
7499 &ett_tn5250_wdsf_ds_ct_mask
,
7500 &ett_tn5250_wdsf_ds_mask
,
7501 &ett_tn5250_wdsf_ds_mbs_mask
,
7502 &ett_tn5250_wdsf_ds_sbi_mask
,
7503 &ett_tn5250_wdsf_dsb_mask
,
7504 &ett_tn5250_wdsf_pmb_mask
,
7505 &ett_tn5250_wdsf_ragc_mask
,
7506 &ett_tn5250_wdsf_rgw_mask
,
7507 &ett_tn5250_wdsf_wdf_mask
,
7508 &ett_tn5250_wsf_dpo_mask
,
7509 &ett_tn5250_wsf_dsl_mask
,
7510 &ett_tn5250_wsf_dtsf_mask
,
7511 &ett_tn5250_wsf_qss_mask
,
7512 &ett_tn5250_wsf_rts_mask
,
7513 &ett_tn5250_wssf_cc_mask
,
7514 &ett_tn5250_wssf_ifc_mask
,
7515 &ett_tn5250_wssf_ifd_mask
,
7516 &ett_tn5250_wssf_kbc_mask
,
7517 &ett_tn5250_wssf_mask
,
7518 &ett_tn5250_wts_mask
,
7519 &ett_tn5250_wea_prim_attr
,
7520 &ett_tn5250_qr_mask
,
7524 static ei_register_info ei
[] = {
7525 { &ei_tn5250_command_code
, { "tn5250.command_code.bogus", PI_PROTOCOL
, PI_WARN
, "Bogus value", EXPFILL
}},
7528 expert_module_t
* expert_tn5250
;
7530 proto_tn5250
= proto_register_protocol("TN5250 Protocol", "TN5250", "tn5250");
7531 register_dissector("tn5250", dissect_tn5250
, proto_tn5250
);
7532 proto_register_field_array(proto_tn5250
, hf
, array_length(hf
));
7533 proto_register_subtree_array(ett
, array_length(ett
));
7534 expert_tn5250
= expert_register_protocol(proto_tn5250
);
7535 expert_register_field_array(expert_tn5250
, ei
, array_length(ei
));
7540 * Editor modelines - https://www.wireshark.org/tools/modelines.html
7545 * indent-tabs-mode: nil
7548 * ex: set shiftwidth=2 tabstop=8 expandtab:
7549 * :indentSize=2:tabSize=8:noTabs=true: