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
10 * Copyright 2009, Robert Hogan <robert@roberthogan.net>
14 * Wireshark - Network traffic analyzer
15 * By Gerald Combs <gerald@wireshark.org>
16 * Copyright 1998 Gerald Combs
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License
20 * as published by the Free Software Foundation; either version 2
21 * of the License, or (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
37 #include <epan/packet.h>
38 #include <epan/address.h>
39 #include <wmem/wmem.h>
40 #include <epan/conversation.h>
41 #include "packet-tn5250.h"
43 typedef struct tn5250_conv_info_t
{
44 struct tn5250_conv_info_t
*next
;
45 address outbound_addr
;
46 guint32 outbound_port
;
52 /* 13.4 SNA LU 4 and LU 7 Negative Responses */
54 #define NEGATIVE_RESPONSE1 0x081102
55 #define NEGATIVE_RESPONSE2 0x100301
56 #define NEGATIVE_RESPONSE3 0x100501
57 #define NEGATIVE_RESPONSE4 0x100502
59 static const value_string vals_tn5250_negative_responses
[] = {
60 { 0x08110200, "The Cancel key of a printer was pressed when it was not in an error state"},
61 { 0x08110201, "The Cancel key of a printer was pressed when it was in an error state"},
62 { 0x10030101, "Command that is not valid encountered in data stream"},
63 { 0x10030105, "Clear unit alternate command not valid"},
64 { 0x10030123, "Command to enter text mode not valid for the keyboard or country language code used"},
65 { 0x10050103, "Format table resequencing error on display data stream"},
66 { 0x10050110, "Structured field length is not valid"},
67 { 0x10050111, "Structured field class or type is not valid"},
68 { 0x10050112, "Parameter is not valid in structured field"},
69 { 0x10050113, "Structured field minor structure length is not valid"},
70 { 0x10050114, "Parameter is not valid in structured field minor structure"},
71 { 0x1005011B, "Data stream command is not valid in WP mode"},
72 { 0x1005011C, "Data stream command is not valid in data processing (DP) mode"},
73 { 0x1005011D, "Command not allowed on display with unlocked keyboard"},
74 { 0x10050121, "Premature data stream termination"},
75 { 0x10050122, "Write to display order row/col address is not valid"},
76 { 0x10050123, "The address in the Repeat to Address is less than the current workstation screen address"},
77 { 0x10050125, "Start-of-field order length not valid"},
78 { 0x10050126, "Start-of-field order address not valid"},
79 { 0x10050127, "Data in restore not valid"},
80 { 0x10050128, "Field extends past the end of the display"},
81 { 0x10050129, "Format table overflow"},
82 { 0x1005012A, "An attempt was made to write past the end of display"},
83 { 0x1005012B, "Start-of-header length not valid"},
84 { 0x1005012C, "Parameter that is not valid is on the ROLL command"},
85 { 0x1005012D, "Extended attribute type not valid"},
86 { 0x1005012E, "RAM load parameter not valid"},
87 { 0x1005012F, "Extended attribute not valid"},
88 { 0x10050130, "Start-of-field attribute not valid"},
89 { 0x10050131, "No escape code was found where it was expected"},
90 { 0x10050132, "WRITE ERROR CODE TO WINDOW command row/col address is not valid"},
91 { 0x10050133, "WRITE ERROR CODE TO WINDOW command is not valid with the message error line that is in use"},
92 { 0x10050134, "SAVE PARTIAL SCREEN command was followed by an immediate read or another SAVE type command"},
93 { 0x10050135, "Continued entry field segment is not valid"},
94 { 0x10050136, "Word wrap not allowed for this type of entry field"},
95 { 0x10050138, "An attempt was made to write a scroll bar beyond the last display column"},
96 { 0x10050139, "The total row/col, slider position (sliderpos), or display row/col on a scroll bar is not valid"},
97 { 0x1005013A, "At least one selection field choice must be allowed to accept the cursor"},
98 { 0x1005013B, "An attempt was made to write a selection field choice before column 1 or beyond the last display column"},
99 { 0x1005013C, "An attempt was made to define too many selection field choices"},
100 { 0x1005013D, "An attempt was made to define more than one default selected choice in a single choice selection field"},
101 { 0x1005013E, "Too many windows defined. 128 windows are allowed."},
102 { 0x10050140, "Write Data command to non-entry field"},
103 { 0x10050141, "Too much data or too little data in a Write Data command"},
104 { 0x10050142, "An attempt was made to write a X'FF' character to the display screen."},
105 { 0x10050148, "The Fax and Image feature is not supported on this device."},
106 { 0x10050149, "Data follows an image/fax download command in the data stream and the image/fax download command does"
107 " not contain the last of the image data. No other commands are accepted until all the image/fax data has been received."},
108 { 0x1005014C, "The display is not capable of video delivery."},
109 { 0x1005014D, "The first 2 bytes of the PC/TV command were not X'E201' or X'E301'."},
110 { 0x1005014F, "Data stream longer than 16,368 bytes."},
111 { 0x10050180, "The printer LSID sent in the copy-to-printer data stream from the AS/400 system was not in the SNA session table"},
112 { 0x10050181, "The LSID sent in the copy-to-printer data stream from the AS/400 system was not a printer LSID"},
113 { 0x10050187, "Self-check field length (self-check field > 33 bytes) not valid"},
114 { 0x10050188, "Self-check field control word not valid"},
115 { 0x10050228, "SCS command not valid"},
116 { 0x10050229, "SCS parameter not valid"},
117 { 0x1005022A, "Intelligent Printer Data Stream (IPDS parameter error)"},
118 { 0x10050260, "IPDS printer's multistatus functions are available"},
122 #define TN5250_ESCAPE 0x04
123 static const value_string vals_tn5250_escape_codes
[] = {
128 /* 15.1 Workstation Data Stream Commands*/
129 #define CLEAR_UNIT 0x40
130 #define CLEAR_UNIT_ALTERNATE 0x20
131 #define CLEAR_FORMAT_TABLE 0x50
132 #define WRITE_TO_DISPLAY 0x11
133 #define WRITE_ERROR_CODE 0x21
134 #define WRITE_ERROR_CODE_TO_WINDOW 0x22
135 #define READ_INPUT_FIELDS 0x42
136 #define READ_MDT_FIELDS 0x52
137 #define READ_MDT_ALTERNATE 0x82
138 #define READ_SCREEN 0x62
139 #define READ_SCREEN_WITH_EXTENDED_ATTRIBUTES 0x64
140 #define READ_SCREEN_TO_PRINT 0x66
141 #define READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES 0x68
142 #define READ_SCREEN_TO_PRINT_WITH_GRIDLINES 0x6A
143 #define READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES_AND_GRIDLINES 0x6C
144 #define READ_IMMEDIATE 0x72
145 #define READ_MODIFIED_IMMEDIATE_ALTERNATE 0x83
146 #define SAVE_SCREEN 0x02
147 #define SAVE_PARTIAL_SCREEN 0x03
148 #define RESTORE_SCREEN 0x12
149 #define RESTORE_PARTIAL_SCREEN 0x13
151 #define WRITE_STRUCTURED_FIELD 0xF3
152 #define WRITE_SINGLE_STRUCTURED_FIELD 0xF4
153 #define COPY_TO_PRINTER 0x16
155 static const value_string vals_tn5250_command_codes
[] = {
156 { CLEAR_UNIT
, "Clear Unit"},
157 { CLEAR_UNIT_ALTERNATE
, "Clear Unit Alternate"},
158 { CLEAR_FORMAT_TABLE
, "Clear Format Table"},
159 { WRITE_TO_DISPLAY
, "Write To Display"},
160 { WRITE_ERROR_CODE
, "Write Error Code"},
161 { WRITE_ERROR_CODE_TO_WINDOW
, "Write Error Code To Window"},
162 { READ_INPUT_FIELDS
, "Read Input Fields"},
163 { READ_MDT_FIELDS
, "Read Mdt Fields"},
164 { READ_MDT_ALTERNATE
, "Read Mdt Alternate"},
165 { READ_SCREEN
, "Read Screen"},
166 { READ_SCREEN_WITH_EXTENDED_ATTRIBUTES
, "Read Screen With Extended Attributes"},
167 { READ_SCREEN_TO_PRINT
, "Read Screen To Print"},
168 { READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES
, "Read Screen To Print With Extended Attributes"},
169 { READ_SCREEN_TO_PRINT_WITH_GRIDLINES
, "Read Screen To Print With Gridlines"},
170 { READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES_AND_GRIDLINES
, "Read Screen To Print With Extended Attributes And Gridlines"},
171 { READ_IMMEDIATE
, "Read Immediate"},
172 { READ_MODIFIED_IMMEDIATE_ALTERNATE
, "Read Modified Immediate Alternate"},
173 { SAVE_SCREEN
, "Save Screen"},
174 { SAVE_PARTIAL_SCREEN
, "Save Partial Screen"},
175 { RESTORE_SCREEN
, "Restore Screen"},
176 { RESTORE_PARTIAL_SCREEN
, "Restore Partial Screen"},
178 { WRITE_STRUCTURED_FIELD
, "Write Structured Field"},
179 { WRITE_SINGLE_STRUCTURED_FIELD
, "Write Single Structured Field"},
180 { COPY_TO_PRINTER
, "Copy-To-Printer"},
184 /* 15.4 Clear Unit Alternate*/
185 static const value_string vals_tn5250_cua_parms
[] = {
186 { 0x00 , "Set screen size to 27 rows by 132 columns"},
187 { 0x80 , "Leave the screen size unchanged and do not erase image/fax data from the display memory."},
192 /* 15.6 Order Codes */
193 #define TN5250_SBA 0x11
194 #define TN5250_IC 0x13
195 #define TN5250_MC 0x14
196 #define TN5250_RA 0x02
197 #define TN5250_EA 0x03
198 #define TN5250_SOH 0x01
199 #define TN5250_TD 0x10
200 #define TN5250_WEA 0x12
201 #define TN5250_SF 0x1D
202 #define TN5250_WDSF 0x15
204 static const value_string vals_tn5250_order_codes
[] = {
205 { TN5250_SBA
, "Set Buffer Address (SBA)"},
206 { TN5250_IC
, "Insert Cursor (IC)"},
207 { TN5250_MC
, "Move Cursor (MC)"},
208 { TN5250_RA
, "Repeat to Address (RA)"},
209 { TN5250_EA
, "Erase to Address (EA)"},
210 { TN5250_SOH
, "Start of Header (SOH)"},
211 { TN5250_TD
, "Transparent Data (TD)"},
212 { TN5250_WEA
, "Write Extended Attribute Order"},
213 { TN5250_SF
, "Start Field (SF)"},
214 { TN5250_WDSF
, "Write to Display Structured Field (WDSF)"},
218 /* 15.6.1 WTD Control Code */
221 static const value_string vals_tn5250_wtd_cc_byteone
[] = {
223 { 0x20 , "Reset pending AID, lock keyboard"},
224 { 0x40 , "Reset pending AID, lock keyboard, Reset MDT flags in non-bypass fields"},
225 { 0x60 , "Reset pending AID, lock keyboard, Reset MDT flags in all fields"},
226 { 0x80 , "Reset pending AID, lock keyboard, Null all non-bypass fields with MDT on"},
227 { 0xA0 , "Reset pending AID, lock keyboard, Reset MDT flags in non-bypass fields, Null all non-bypass fields"},
228 { 0xC0 , "Reset pending AID, lock keyboard, Reset MDT flags in non-bypass fields, Null all non-bypass fields with MDT on"},
229 { 0xE0 , "Reset pending AID, lock keyboard, Reset MDT flags in all fields, Null all non-bypass fields"},
233 /* 15.6.8 Erase to Address Order */
234 /* 15.6.11 Write Extended Attribute Order */
235 #define EXTENDED_IDEOGRAPHIC_ATTRIBUTES 0x05
236 #define EXTENDED_FOREGROUND_COLOR_ATTRIBUTES 0x03
237 #define EXTENDED_PRIMARY_ATTRIBUTES 0x01
239 static const value_string vals_tn5250_attributes
[] = {
240 { 0x00, "Display screen"},
241 { 0x01, "Extended primary attributes"},
242 { 0x02, "Extended text attributes (use in WP mode only)"},
243 { 0x03, "Extended foreground color attributes"},
244 { 0x05, "Extended ideographic attributes"},
245 { 0xFF, "Display screen and all extended attribute types supported by this "
246 "workstation. Use X'FF' to clear all extended attribute types for "
247 "optimum performance, even if all types are not used."},
252 /* 15.6.11.1 Write Extended Attribute Order - Extended Primary Attribute*/
253 /* 15.6.12.3 Start of Field Order - Field Attribute*/
255 #define FA_ID_BITS 0xE0
256 static const value_string vals_tn5250_fa_id
[] = {
257 { 0x01 , "Identifies Field as Field Format Word"},
261 static const struct true_false_string tn5250_field_attr_col
= {
262 "Column Separator On",
263 "Column Separator Off"
266 static const struct true_false_string tn5250_field_attr_blink
= {
271 static const struct true_false_string tn5250_field_attr_und
= {
273 "Do Not Underscore Field"
276 static const struct true_false_string tn5250_field_attr_int
= {
281 static const struct true_false_string tn5250_field_attr_rev
= {
287 /* 15.6.11.2 Write Extended Attribute Order - Valid Extended Foreground Color Attributes*/
289 static const value_string vals_tn5250_foreground_color_attributes
[] = {
290 { 0x00, "Null - continue currently defined attribute"},
291 { 0x80, "Color of the display background medium; black on most models"},
292 { 0x81 , "Color of the display background medium; black on most models"},
294 { 0x83, "blue; different shade of blue than X'82' on some displays"},
296 { 0x85, "green; different shade of green than X'84' on some displays"},
297 { 0x86, "turquoise"},
298 { 0x87, "turquoise; different shade of turquoise than X'86' on some displays"},
300 { 0x89, "red; different shade of red than X'88' on some displays"},
302 { 0x8B, "pink; different shade of pink than X'8A' on some displays"},
304 { 0x8D, "yellow; different shade of pink than X'8C' on some displays"},
306 { 0x8F, "white; different shade of white than X'8E' on some displays"},
311 /* 15.6.11.3 Write Extended Attribute Order - Valid Extended Ideographic Attributes*/
312 static const value_string vals_tn5250_ideographic_attributes
[] = {
313 { 0x00, "Null - continue currently defined attribute"},
314 { 0x80, "Normal display attribute - end double byte mode (SI)"},
315 { 0x81, "Begin double byte mode (SO)"},
319 /* 15.6.12.1 Start of Field Order - Field Format Word */
321 #define FFW_ID_BITS 0xC0
322 static const value_string vals_tn5250_ffw_id
[] = {
323 { 0x01 , "Identifies Field as Field Format Word"},
327 static const struct true_false_string tn5250_field_ffw_bypass
= {
328 "This is a bypass field",
329 "This is not a bypass field"
332 static const struct true_false_string tn5250_field_ffw_dup
= {
333 "Duplication or Field Mark is allowed in this field",
334 "Duplication or Field Mark is not allowed in this field"
337 static const struct true_false_string tn5250_field_ffw_mdt
= {
338 "This field has been modified",
339 "This field has not been modified"
342 #define FFW_SHIFT_BITS 0x07
344 static const value_string vals_tn5250_ffw_shift
[] = {
345 { 0x00, "Alpha shift"},
346 { 0x01, "Alpha only"},
347 { 0x02, "Numeric shift"},
348 { 0x03, "Numeric only"},
349 { 0x04, "Katakana shift"},
350 { 0x05, "Digits only"},
351 { 0x06, "I/O-(feature input field)"},
352 { 0x07, "Signed numeric"},
356 static const struct true_false_string tn5250_field_ffw_auto
= {
357 "Auto Enter When Field is Exited",
361 static const struct true_false_string tn5250_field_ffw_fer
= {
362 "Field Exit key is required",
363 "Field Exit key is not required"
366 static const struct true_false_string tn5250_field_ffw_monocase
= {
367 "Translate operator keyed letters to uppercase",
368 "Accept lower case letters"
371 static const struct true_false_string tn5250_field_ffw_me
= {
372 "Mandatory Enter Field",
373 "Not A Mandatory Enter Field"
376 #define FFW_ADJUST_BITS 0x07
378 static const value_string vals_tn5250_ffw_adjust
[] = {
379 { 0x00, "No adjust specified"},
384 { 0x05, "Right adjust, zero fill"},
385 { 0x06, "Right adjust, blank fill"},
386 { 0x07, "Mandatory fill"},
390 /* 15.6.12.2 Start of Field Order - Field Control Word */
392 #define SELECTOR 0x81
393 #define IDEOGRAPHIC 0x82
394 #define FORWARD_EDGE 0x85
395 #define CONTINUED_ENTRY 0x86
396 #define SELF_CHECK 0xB1
397 #define ENTRY_FIELD_RESEQUENCING 0x80
398 #define CURSOR_PROGRESSION_ENTRY_FIELD 0x88
399 #define HIGHLIGHTED_ENTRY_FIELD 0x89
400 #define POINTER_DEVICE_SELECTION_ENTRY_FIELD 0x8A
401 #define TRANSPARENCY_ENTRY_FIELD 0x84
403 static const range_string vals_tn5250_fcw
[] = {
404 { 0x8000, 0x8080, "Entry field resequencing. The nn specifies the next entry field in the sequence (X'00' to X'80')."},
405 { 0x8101, 0x8101, "Magnetic stripe reader entry field"},
406 { 0x8102, 0x8102, "Selector light pen or cursor select field"},
407 { 0x8103, 0x8103, "Magnetic stripe reader and selector light pen entry field"},
408 { 0x8106, 0x8106, "Selector light pen and selectable attention entry field"},
409 { 0x8200, 0x8200, "Ideographic-only entry field"},
410 { 0x8220, 0x8220, "Ideographic data type entry field"},
411 { 0x8240, 0x8240, "Ideographic-either entry field"},
412 { 0x8280, 0x8280, "Ideographic-open entry field"},
413 { 0x82C0, 0x82C0, "Ideographic-open entry field"},
414 { 0x8400, 0x84FF, "Transparency entry field. The nn can be any two digits."},
415 { 0x8501, 0x8501, "Forward edge trigger entry field"},
416 { 0x8601, 0x8603, "Continued entry field"},
417 { 0x8680, 0x8680, "Word Wrap entry field"},
418 { 0x8800, 0x88FF, "Cursor progression entry field. The nn is the next entry field in the specified application cursor progression sequence."},
419 { 0x8900, 0x89FF, "Highlighted entry field. The nn specifies the field attribute"},
420 { 0x8A00, 0x8AFF, "Pointer device selection entry field. If a user selects the entry field, the nn specifies the AID to be returned."},
421 { 0xB140, 0xB140, "Self-check modulus 11 entry field"},
422 { 0xB1A0, 0xB1A0, "Self-check modulus 10 entry field"},
428 #define MAGNETIC_STRIPE_READER_ENTRY_FIELD 0x8101
429 #define SELECTOR_LIGHT_PEN_OR_CURSOR_SELECT_FIELD 0x8102
430 #define MAGNETIC_STRIPE_READER_AND_SELECTOR_LIGHT_PEN_ENTRY_FIELD 0x8103
431 #define SELECTOR_LIGHT_PEN_AND_SELECTABLE_ATTENTION_ENTRY_FIELD 0x8106
432 #define IDEOGRAPHIC_ONLY_ENTRY_FIELD 0x8200
433 #define IDEOGRAPHIC_DATA_TYPE_ENTRY_FIELD 0x8220
434 #define IDEOGRAPHIC_EITHER_ENTRY_FIELD 0x8240
435 #define IDEOGRAPHIC_OPEN_ENTRY_FIELD 0x8280
436 #define IDEOGRAPHIC_OPEN_ENTRY_FIELD1 0x82C0
437 #define FORWARD_EDGE_TRIGGER_ENTRY_FIELD 0x8501
438 #define CONTINUED_ENTRY_FIELD 0x8601
439 #define CONTINUED_ENTRY_FIELD1 0x8602
440 #define CONTINUED_ENTRY_FIELD2 0x8603
441 #define WORD_WRAP_ENTRY_FIELD 0x8680
442 #define SELF_CHECK_MODULUS_11_ENTRY_FIELD 0xB140
443 #define SELF_CHECK_MODULUS_10_ENTRY_FIELD 0xB1A0
445 static const value_string vals_tn5250_fcw
[] = {
446 { ENTRY_FIELD_RESEQUENCING
, "Entry field resequencing. The NN specifies the next entry field "
447 "in the sequence (X'00' to X'80')."},
448 { MAGNETIC_STRIPE_READER_ENTRY_FIELD
, "Magnetic stripe reader entry field"},
449 { SELECTOR_LIGHT_PEN_OR_CURSOR_SELECT_FIELD
, "Selector light pen or cursor select field"},
450 { MAGNETIC_STRIPE_READER_AND_SELECTOR_LIGHT_PEN_ENTRY_FIELD
, "Magnetic stripe reader and selector light pen entry field"},
451 { SELECTOR_LIGHT_PEN_AND_SELECTABLE_ATTENTION_ENTRY_FIELD
, "Selector light pen and selectable attention entry field"},
452 { IDEOGRAPHIC_ONLY_ENTRY_FIELD
, "Ideographic-only entry field"},
453 { IDEOGRAPHIC_DATA_TYPE_ENTRY_FIELD
, "Ideographic data type entry field"},
454 { IDEOGRAPHIC_EITHER_ENTRY_FIELD
, "Ideographic-either entry field"},
455 { IDEOGRAPHIC_OPEN_ENTRY_FIELD
, "Ideographic-open entry field"},
456 { IDEOGRAPHIC_OPEN_ENTRY_FIELD1
, "Ideographic-open entry field"},
457 { TRANSPARENCY_ENTRY_FIELD
, "Transparency entry field. The NN can be any two digits."},
458 { FORWARD_EDGE_TRIGGER_ENTRY_FIELD
, "Forward edge trigger entry field"},
459 { CONTINUED_ENTRY_FIELD
, "Continued entry field"},
460 { CONTINUED_ENTRY_FIELD1
, "Continued entry field"},
461 { CONTINUED_ENTRY_FIELD2
, "Continued entry field"},
462 { WORD_WRAP_ENTRY_FIELD
, "Word Wrap entry field"},
463 { CURSOR_PROGRESSION_ENTRY_FIELD
, "Cursor progression entry field. The NN is the next entry field "
464 "in the specified application cursor progression sequence."},
465 { HIGHLIGHTED_ENTRY_FIELD
, "Highlighted entry field. The NN specifies the field attribute"},
466 { POINTER_DEVICE_SELECTION_ENTRY_FIELD
, "Pointer device selection entry field. If a user selects the "
467 "entry field, the NN specifies the AID to be returned."},
468 { SELF_CHECK_MODULUS_11_ENTRY_FIELD
, "Self-check modulus 11 entry field"},
469 { SELF_CHECK_MODULUS_10_ENTRY_FIELD
, "Self-check modulus 10 entry field"},
474 /* 15.6.12.3 Start of Field Order - Field Attribute */
476 static const value_string vals_tn5250_fa_color
[] = {
478 { 0x21, "Green/Reverse image"},
480 { 0x23, "White/Reverse image"},
481 { 0x24, "Green/Underscore"},
482 { 0x25, "Green/Underscore/Reverse image"},
483 { 0x26, "White/Underscore"},
484 { 0x27, "Nondisplay"},
486 { 0x29, "Red/Reverse image "},
487 { 0x2A, "Red/Blink"},
488 { 0x2B, "Red/Reverse image/Blink"},
489 { 0x2C, "Red/Underscore"},
490 { 0x2D, "Red/Underscore/Reverse image"},
491 { 0x2E, "Red/Underscore/Blink"},
492 { 0x2F, "Nondisplay"},
493 { 0x30, "Turquoise/Column separators "},
494 { 0x31, "Turquoise/Column separators/Reverse image"},
495 { 0x32, "Yellow/Column separators"},
496 { 0x33, "Yellow/Column separators/Reverse image"},
497 { 0x34, "Turquoise/Underscore"},
498 { 0x35, "Turquoise/Underscore/Reverse image"},
499 { 0x36, "Yellow/Underscore"},
500 { 0x37, "Nondisplay"},
502 { 0x39, "Pink/Reverse image"},
504 { 0x3B, "Blue/Reverse image"},
505 { 0x3C, "Pink/Underscore"},
506 { 0x3D, "Pink/Underscore/Reverse image "},
507 { 0x3E, "Blue/Underscore"},
508 { 0x3F, "Nondisplay"},
512 /* 15.6.13 Write to Display Structured Field Order */
513 #define CLASS_5250 0xD9
515 static const value_string vals_tn5250_sf_class
[] = {
516 { CLASS_5250
, "5250 Class of Structured Field"},
520 /* 15.6.13 - Major Structure Types */
521 #define DEFINE_SELECTION_FIELD 0x50
522 #define CREATE_WINDOW 0x51
523 #define UNRESTRICTED_WINDOW_CURSOR_MOVEMENT 0x52
524 #define DEFINE_SCROLL_BAR_FIELD 0x53
525 #define WRITE_DATA 0x54
526 #define PROGRAMMABLE_MOUSE_BUTTONS 0x55
527 #define REMOVE_GUI_SELECTION_FIELD 0x58
528 #define REMOVE_GUI_WINDOW 0x59
529 #define REMOVE_GUI_SCROLL_BAR_FIELD 0x5B
530 #define REMOVE_ALL_GUI_CONSTRUCTS 0x5F
531 #define DRAW_ERASE_GRID_LINES 0x60
532 #define CLEAR_GRID_LINE_BUFFER 0x61
533 #define IMAGE_FAX_CONTROL 0x66
534 #define IMAGE_FAX_DOWNLOAD 0x67
535 #define WSC_CUSTOMIZATION 0x71
536 #define DEFINE_AUDIT_WINDOW__TABLE 0x30
537 #define DEFINE_COMMAND_KEY_FUNCTION 0x31
538 #define READ_TEXT_SCREEN 0x32
539 #define DEFINE_PENDING_OPERATIONS 0x33
540 #define DEFINE_TEXT_SCREEN_FORMAT 0x34
541 #define DEFINE_SCALE_LINE 0x35
542 #define WRITE_TEXT_SCREEN 0x36
543 #define DEFINE_SPECIAL_CHARACTERS 0x37
544 #define PENDING_DATA 0x38
545 #define DEFINE_OPERATOR_ERROR_MESSAGES 0x39
546 #define DEFINE_PITCH_TABLE 0x3A
547 #define DEFINE_FAKE_DP_COMMAND_KEY_FUNCTION 0x3B
548 #define PASS_THROUGH 0x3F
549 #define TN5250_QUERY 0x70
550 #define TN5250_QUERY_STATION_STATE 0x72
551 #define VIDEO_AUDIO_CONTROLS 0x68
552 #define TRUE_TRANSPARENCY_WRITE 0x6A
554 static const value_string vals_tn5250_sf_type
[] = {
555 { DEFINE_SELECTION_FIELD
, "Define Selection Field"},
556 { CREATE_WINDOW
, "Create Window"},
557 { UNRESTRICTED_WINDOW_CURSOR_MOVEMENT
, "Unrestricted Window Cursor Movement"},
558 { DEFINE_SCROLL_BAR_FIELD
, "Define Scroll Bar Field"},
559 { WRITE_DATA
, "Write Data"},
560 { PROGRAMMABLE_MOUSE_BUTTONS
, "Programmable Mouse Buttons"},
561 { REMOVE_GUI_SELECTION_FIELD
, "Remove Gui Selection Field"},
562 { REMOVE_GUI_WINDOW
, "Remove Gui Window"},
563 { REMOVE_GUI_SCROLL_BAR_FIELD
, "Remove Gui Scroll Bar Field"},
564 { REMOVE_ALL_GUI_CONSTRUCTS
, "Remove All Gui Constructs"},
565 { DRAW_ERASE_GRID_LINES
, "Draw/Erase Grid Lines"},
566 { CLEAR_GRID_LINE_BUFFER
, "Clear Grid Line Buffer"},
567 { IMAGE_FAX_CONTROL
, "Image Fax Control"},
568 { IMAGE_FAX_DOWNLOAD
, "Image Fax Download"},
569 { WSC_CUSTOMIZATION
, "Wsc Customization"},
570 { DEFINE_AUDIT_WINDOW__TABLE
, "Define Audit Window Table"},
571 { DEFINE_COMMAND_KEY_FUNCTION
, "Define Command Key Function"},
572 { READ_TEXT_SCREEN
, "Read Text Screen"},
573 { DEFINE_PENDING_OPERATIONS
, "Define Pending Operations"},
574 { DEFINE_TEXT_SCREEN_FORMAT
, "Define Text Screen Format"},
575 { DEFINE_SCALE_LINE
, "Define Scale Line"},
576 { WRITE_TEXT_SCREEN
, "Write Text Screen"},
577 { DEFINE_SPECIAL_CHARACTERS
, "Define Special Characters"},
578 { PENDING_DATA
, "Pending Data"},
579 { DEFINE_OPERATOR_ERROR_MESSAGES
, "Define Operator Error Messages"},
580 { DEFINE_PITCH_TABLE
, "Define Pitch Table"},
581 { DEFINE_FAKE_DP_COMMAND_KEY_FUNCTION
, "Define Fake Dp Command Key Function"},
582 { PASS_THROUGH
, "Pass-Through"},
583 { TN5250_QUERY
, "5250 Query"},
584 { TN5250_QUERY_STATION_STATE
, "5250 Query Station State"},
585 { VIDEO_AUDIO_CONTROLS
, "Video/Audio Controls Command"},
586 { TRUE_TRANSPARENCY_WRITE
, "True Transparency Write Command"},
590 /* 15.6.13.1 Write to Display Structured Field Order - Create Window */
591 static const struct true_false_string tn5250_field_wdsf_cw_flag1_1
= {
592 "Cursor Restricted To Window",
593 "Cursor Not Restricted To Window"
596 static const struct true_false_string tn5250_field_wdsf_cw_flag1_2
= {
597 "Window Is A Pull-Down Menu Bar",
598 "Window Is Not A Pull-Down Menu Bar"
601 #define CW_BORDER_PRESENTATION 0x01
602 #define CW_TITLE_FOOTER 0x10
604 static const value_string vals_tn5250_wdsf_cw_minor_type
[] = {
605 { CW_BORDER_PRESENTATION
, "Border Presentation"},
606 { CW_TITLE_FOOTER
, "Window Title/Footer"},
610 /* 15.6.13.1 Write to Display Structured Field Order - Create Window - Border Presentation Minor Structure */
611 static const struct true_false_string tn5250_field_wdsf_cw_bp_flag1_1
= {
612 "Use Border Presentation Characters on a GUI-like NWS",
613 "Do Not Use Border Presentation Characters on a GUI-like NWS"
616 /* 15.6.13.1 Write to Display Structured Field Order - Create Window - Window Title/Footer Minor Structure */
617 #define WTF_BITS 0xC0
619 static const value_string vals_tn5250_wdsf_cw_tf_flag_orientation
[] = {
620 { 0x00, "Window Title or Footer is Centered"},
621 { 0x40, "Window Title or Footer is Right Justified"},
622 { 0x80, "Window Title or Footer is Left Justified"},
623 { 0xC0, "Reserved (Window Title or Footer is Centered)"},
627 static const struct true_false_string tn5250_field_wdsf_cw_tf_flag_1
= {
628 "Window Footer is Defined",
629 "Window Title is Defined"
633 /* 15.6.13.4 Write to Display Structured Field Order - Remove All GUI Constructs*/
634 static const struct true_false_string tn5250_field_wdsf_ragc_flag1_0
= {
635 "5494 Maps GUI-like Characters",
636 "5494 Does Not Map GUI-like Characters"
640 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field*/
641 #define DS_CHOICE_TEXT 0x10
642 #define DS_MENU_BAR_SEPARATOR 0x09
643 #define DS_CHOICE_PRESENTATION_DISPLAY 0x01
644 #define DS_CHOICE_INDICATORS 0x02
645 #define DS_SCROLLBAR_INDICATORS 0x03
648 static const value_string vals_tn5250_wdsf_ds_minor_type
[] = {
649 { DS_CHOICE_TEXT
, "Choice Text"},
650 { DS_MENU_BAR_SEPARATOR
, "Menu Bar Separator"},
651 { DS_CHOICE_PRESENTATION_DISPLAY
, "Choice Presentation Display Attributes"},
652 { DS_CHOICE_INDICATORS
, "Choice Indicators"},
653 { DS_SCROLLBAR_INDICATORS
, "Scroll Bar Indicators"},
657 #define MOUSE_CHARACTERISTICS_BITS 0x03
659 static const value_string vals_tn5250_wdsf_ds_flag1_mouse_characteristics
[] = {
660 { 0x00, "Use this selection field in all cases"},
661 { 0x02, "Use this selection field only if the display does not have a mouse."},
662 { 0x01, "Use this selection field only if the display has a mouse."},
667 #define DS_AUTO_ENTER_BITS 0x30
669 static const value_string vals_tn5250_wdsf_ds_flag1_auto_enter
[] = {
670 { 0x00, "Selection field is not auto-enter"},
671 { 0x20, "Selection field is auto-enter on selection except if double-digit numeric selection is used."},
672 { 0x10, "Selection field is auto-enter on selection or deselection except if double-digit numeric selection is used. "},
673 { 0x30, "Selection field is auto-enter on selection except if single-digit or double-digit numeric selection is used."},
677 static const struct true_false_string tn5250_field_wdsf_ds_flag1_1
= {
678 "Auto-Select Enabled",
679 "Auto-Select Not Enabled"
682 static const struct true_false_string tn5250_field_wdsf_ds_flag1_2
= {
684 "Field MDT Not Enabled"
687 static const struct true_false_string tn5250_field_wdsf_ds_flag2_1
= {
688 "If set to on, a scroll bar should is created beside the selection field choices, and TotalRows and SliderPos that can "
689 "be scrolled are included in the major structure.",
693 static const struct true_false_string tn5250_field_wdsf_ds_flag2_2
= {
694 "If set to on, one blank is added after the numeric separator character.",
698 static const struct true_false_string tn5250_field_wdsf_ds_flag2_3
= {
699 "If set to on, an asterisk (*) replaces the first character of an unavailable choice on monochrome display.",
703 static const struct true_false_string tn5250_field_wdsf_ds_flag2_4
= {
704 "If set to on, cursor is limited to input-capable positions only.",
708 static const struct true_false_string tn5250_field_wdsf_ds_flag2_5
= {
709 "If set to on, the Field Advance/Field Backspace function is like the Character Advance/Character Backspace keys within "
710 "this selection field.",
714 static const struct true_false_string tn5250_field_wdsf_ds_flag2_6
= {
715 "If set to on, the cursor movement keys are not allowed to exit this selection field.",
719 static const struct true_false_string tn5250_field_wdsf_ds_flag3_1
= {
720 "If set to on, any selected choices are changed to available whenever the keyboard is unlocked.",
724 #define MENU_BAR 0x01
725 #define SINGLE_CHOICE_SELECTION_FIELD 0x11
726 #define MULTIPLE_CHOICE_SELECTION_FIELD 0x12
727 #define SINGLE_CHOICE_SELECTION_LIST 0x21
728 #define MULTIPLE_CHOICE_SELECTION_LIST 0x22
729 #define SINGLE_CHOICE_SELECTION_FIELD_AND_A_PULL_DOWN_LIST 0x31
730 #define MULTIPLE_CHOICE_SELECTION_FIELD_AND_A_PULL_DOWN_LIST 0x32
731 #define PUSH_BUTTONS 0x41
732 #define PUSH_BUTTONS_IN_A_PULL_DOWN_MENU_ 0x51
734 static const value_string vals_tn5250_wdsf_ds_type
[] = {
735 { MENU_BAR
, "Menu bar"},
736 { SINGLE_CHOICE_SELECTION_FIELD
, "Single choice selection field"},
737 { MULTIPLE_CHOICE_SELECTION_FIELD
, "Multiple choice selection field"},
738 { SINGLE_CHOICE_SELECTION_LIST
, "Single choice selection list"},
739 { MULTIPLE_CHOICE_SELECTION_LIST
, "Multiple choice selection list"},
740 { SINGLE_CHOICE_SELECTION_FIELD_AND_A_PULL_DOWN_LIST
, "Single choice selection field and a pull-down list"},
741 { MULTIPLE_CHOICE_SELECTION_FIELD_AND_A_PULL_DOWN_LIST
, "Multiple choice selection field and a pull-down list"},
742 { PUSH_BUTTONS
, "Push buttons"},
743 { PUSH_BUTTONS_IN_A_PULL_DOWN_MENU_
, "Push buttons in a pull-down menu "},
747 #define DS_INDICATOR1 0x00
748 #define DS_INDICATOR2 0x02
749 #define DS_INDICATOR3 0x03
750 #define DS_INDICATOR4 0x04
751 #define DS_INDICATOR5 0x05
752 #define DS_INDICATOR6 0x06
753 #define DS_INDICATOR7 0x0F
754 #define DS_INDICATORS_BITS 0x0F
756 static const value_string vals_tn5250_wdsf_ds_gdc_indicators
[] = {
757 { DS_INDICATOR1
, "An indicator to the left of each choice (check box or radio button) is created."},
758 { DS_INDICATOR2
, "A push button box is created around choice text and the choice text is padded with a blank on both sides."},
759 { DS_INDICATOR3
, "A push button indicator specifies each choice instead of a push button box on a GUI-like NWS. (A GUI "
760 "PWS treats this setting like B'0010'.)"},
761 { DS_INDICATOR4
, "A push button box is created around choice text and choice text is padded with a blank on both sides,"
762 " and a leading choice text attribute is written on top of the previous choice text ending attribute."},
763 { DS_INDICATOR5
, "A push button indicator specifies each choice instead of a push button box on a GUI-like NWS, and a leading "
764 "choice text attribute is specified on top of the previous ending choice text attribute. (A GUI PWS treats "
765 "this setting like B'0100'.)"},
766 { DS_INDICATOR6
, "A push button box is created around choice text (with no padding)."},
767 { DS_INDICATOR7
, "There are no indicators for this value. It is valid for all types of selection."},
771 #define DS_SELECTION_TECHNIQUES1 0x20
772 #define DS_SELECTION_TECHNIQUES2 0x40
773 #define DS_SELECTION_TECHNIQUES3 0xE0
774 #define DS_SELECTION_TECHNIQUES_BITS 0xE0
776 static const value_string vals_tn5250_wdsf_ds_gdc_selection_techniques
[] = {
777 { DS_SELECTION_TECHNIQUES1
, "Defines a mnemonic (or numeric) selection for some or all of the choices. The mnemonic is underscored."},
778 { DS_SELECTION_TECHNIQUES2
, "Defines a mnemonic (or numeric) selection for some or all of the choices. "
779 "The mnemonic is not underscored."},
780 { DS_SELECTION_TECHNIQUES3
, "No mnemonic (or numeric) selection is specified."},
785 #define DS_NWS_INDICATOR1 0x00
786 #define DS_NWS_INDICATOR2 0x03
787 #define DS_NWS_INDICATOR3 0x05
788 #define DS_NWS_INDICATOR4 0x08
789 #define DS_NWS_INDICATOR5 0x0F
790 #define DS_NWS_INDICATORS_BITS 0x0F
792 static const value_string vals_tn5250_wdsf_ds_nws_indicators
[] = {
793 { DS_NWS_INDICATOR1
, "An indicator to the left of each choice (for example, a slash (/)) is created. (1)"},
794 { DS_NWS_INDICATOR2
, "A push button indicator specifies each choice. (2)"},
795 { DS_NWS_INDICATOR3
, "A push button indicator specifies each choice, and a leading choice text attribute is "
796 "specified on top of a previous ending choice text attribute. (2)"},
797 { DS_NWS_INDICATOR4
, "A numeric field to the left of the first choice is created. (Single- or double-digit "
798 "numeric fields are determined by bits 5-7.) (3)"},
799 { DS_NWS_INDICATOR5
, "No indicators are specified for this value. This is valid for all types of selection fields."},
803 #define DS_NWS_SELECTION_TECHNIQUES1 0x20
804 #define DS_NWS_SELECTION_TECHNIQUES2 0x40
805 #define DS_NWS_SELECTION_TECHNIQUES3 0x80
806 #define DS_NWS_SELECTION_TECHNIQUES4 0xA0
807 #define DS_NWS_SELECTION_TECHNIQUES5 0xE0
808 #define DS_NWS_SELECTION_TECHNIQUES_BITS 0xE0
810 static const value_string vals_tn5250_wdsf_ds_nws_selection_techniques
[] = {
811 { DS_NWS_SELECTION_TECHNIQUES1
, "Defines a mnemonic (or numeric) selection for some or all of the choices. "
812 "The mnemonic is underscored."},
813 { DS_NWS_SELECTION_TECHNIQUES2
, "Defines a mnemonic (or numeric) selection for some or all of the choices. "
814 "The mnemonic is not underscored."},
815 { DS_NWS_SELECTION_TECHNIQUES3
, "Defines a single-digit numeric selection."},
816 { DS_NWS_SELECTION_TECHNIQUES4
, "Defines a double-digit numeric selection."},
817 { DS_NWS_SELECTION_TECHNIQUES5
, "No mnemonic or numeric selection is defined."},
821 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Choice Text Minor Structure*/
822 #define DS_CHOICE_STATE1 0x01
823 #define DS_CHOICE_STATE2 0x02
824 #define DS_CHOICE_STATE3 0x03
825 #define DS_CHOICE_STATE_BITS 0x03
827 static const value_string vals_tn5250_wdsf_ds_ct_flag1_choice_state
[] = {
828 { DS_CHOICE_STATE1
, "Available and not a default selection"},
829 { DS_CHOICE_STATE2
, "Available and is a default selection (selected state)"},
830 { DS_CHOICE_STATE3
, "Not available"},
834 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag1_2
= {
835 "Set to on: specifies a menu bar choice that starts a new row.",
836 "Set to on: does not specify a menu bar choice that starts a new row."
839 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag1_3
= {
840 "Reserved (incorrectly set to on).",
841 "Reserved (set to zero)."
844 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag1_4
= {
845 "Set to on: specifies that a mnemonic offset is included in the minor structure.",
846 "Set to off: does not specify that a mnemonic offset is included in the minor structure."
849 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag1_5
= {
850 "If set to on, specifies an AID if 'selected' is included in this minor structure.",
854 #define DS_NUMERIC_SELECTION_NOT_INCLUDED 0x00
855 #define DS_NUMERIC_SELECTION_SINGLE_DIGIT 0x40
856 #define DS_NUMERIC_SELECTION_DOUBLE_DIGIT 0x80
857 #define DS_NUMERIC_SELECTION_BITS 0xC0
859 static const value_string vals_tn5250_wdsf_ds_ct_flag1_numeric_selection
[] = {
860 { DS_NUMERIC_SELECTION_NOT_INCLUDED
, "Numeric selection characters are not included in this minor structure."},
861 { DS_NUMERIC_SELECTION_SINGLE_DIGIT
, "A single-digit numeric selection character is included in this minor structure."},
862 { DS_NUMERIC_SELECTION_DOUBLE_DIGIT
, "Double-digit numeric selection characters are included in this minor structure."},
866 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_0
= {
867 "Set to on, the choice cannot accept a cursor.",
868 "Set to off, the choice can accept a cursor."
871 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_1
= {
872 "Set to on, the application user desires a roll-down AID if the Cursor Up key is pressed on this choice.",
873 "Set to off, the application user does not desire a roll-down AID if the Cursor Up key is pressed on this choice."
876 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_2
= {
877 "Set to on, the application user desires a roll-up AID if the Cursor Up key is pressed on this choice.",
878 "Set to off, the application user does not desire a roll-up AID if the Cursor Up key is pressed on this choice."
881 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_3
= {
882 "Set to on, the application user desires a roll-left AID if the Cursor Up key is pressed on this choice.",
883 "Set to off, the application user does not desire a roll-left AID if the Cursor Up key is pressed on this choice."
886 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_4
= {
887 "Set to on, the application user desires a roll-right AID if the Cursor Up key is pressed on this choice.",
888 "Set to off, the application user does not desire a roll-right AID if the Cursor Up key is pressed on this choice."
891 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_5
= {
892 "Set to on, no push-button box is written for this choice.",
893 "Set to off, a push-button box is written for this choice."
896 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_6
= {
897 "Reserved (incorrectly set to on).",
898 "Reserved (set to zero)."
901 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag2_7
= {
902 "Set to on, cursor direction is right to left.",
903 "Set to off, cursor direction is left to right."
906 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag3_0
= {
907 "Set to on, use this minor structure for GUI devices (including GUI-like NWSs).",
908 "Set to off, do not use this minor structure for GUI devices (including GUI-like NWSs)."
911 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag3_1
= {
912 "Set to on, use this minor structure for non-GUI NWSs that are capable of creating mnemonic underscores.",
913 "Set to off, do not use this minor structure for non-GUI NWSs that are capable of creating mnemonic underscores."
916 static const struct true_false_string tn5250_field_wdsf_ds_ct_flag3_2
= {
917 "Set to on, use this minor structure for NWS display devices that are not capable of creating underscores.",
918 "Set to off, do not use this minor structure for NWS display devices that are not capable of creating underscores."
921 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Menu Bar Separator Minor Structure*/
923 static const struct true_false_string tn5250_field_wdsf_ds_mbs_flag_0
= {
924 "Use specified separator character on GUI-like NWSs.",
925 "Do not use specified separator character on GUI-like NWSs."
928 static const struct true_false_string tn5250_field_wdsf_ds_mbs_flag_1
= {
929 "Suppress writing of leading and ending attributes.",
930 "Do not suppress writing of leading and ending attributes."
933 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Choice Presentation Display Attributes Minor Structure*/
935 static const struct true_false_string tn5250_field_wdsf_ds_cpda_flag1_0
= {
936 "Uses the minor structure for GUI devices (including GUI-like NWSs).",
937 "Does not use the minor structure for GUI devices (including GUI-like NWSs)."
940 static const struct true_false_string tn5250_field_wdsf_ds_cpda_flag1_1
= {
941 "Uses the minor structure for NWSs that are capable of creating underscores.",
942 "Does not use the minor structure for NWSs that are capable of creating underscores."
945 static const struct true_false_string tn5250_field_wdsf_ds_cpda_flag1_2
= {
946 "Uses the minor structure for NWSs that are not capable of creating mnemonic underscores.",
947 "Does not use the minor structure for NWSs that are not capable of creating mnemonic underscores."
950 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Choice Indicators Minor Structure*/
952 static const struct true_false_string tn5250_field_wdsf_ds_ci_flag1_0
= {
953 "Use the specified indicators on GUI-like NWSs.",
954 "Do Not Use the specified indicators on GUI-like NWSs"
957 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Scroll Bar Indicators Minor Structure*/
959 static const struct true_false_string tn5250_field_wdsf_ds_sbi_flag1_0
= {
960 "Use the specified indicators on GUI-like NWSs.",
961 "Do Not Use the specified indicators on GUI-like NWSs"
964 /* 15.6.13.7 Write to Display Structured Field Order - Define Scroll Bar Field */
966 static const struct true_false_string tn5250_field_wdsf_dsb_flag1_0
= {
967 "On: Vertical scroll bar is set to off and horizontal scroll bar is set to on.",
968 "Off: Vertical scroll bar is set to off and horizontal scroll bar is set to on."
972 static const struct true_false_string tn5250_field_wdsf_dsb_flag1_1
= {
973 "On: The cursor is moved to the scroll bar on a pointer device scroll bar interaction",
974 "Off: The cursor is moved to the scroll bar on a pointer device scroll bar interaction."
978 static const struct true_false_string tn5250_field_wdsf_dsb_flag1_7
= {
983 /* 15.6.13.9 Write to Display Structured Field Order - Write Data Field */
985 static const struct true_false_string tn5250_field_wdsf_wdf_flag1_0
= {
986 "On: Write data to entry field",
987 "Off: Do not write data to entry field"
990 /* 15.6.13.10 Write to Display Structured Field Order - Programmable Mouse Buttons */
991 static const struct true_false_string tn5250_field_wdsf_pmb_flag1_0
= {
992 "Two-event definition",
993 "Single-event definition"
996 static const struct true_false_string tn5250_field_wdsf_pmb_flag1_1
= {
997 "On: The text cursor is moved to the location of the mouse cursor.",
998 "Off: The text cursor is NOT moved to the location of the mouse cursor."
1001 static const struct true_false_string tn5250_field_wdsf_pmb_flag1_2
= {
1002 "On: The single mouse event is queued if the keyboard is locked.",
1003 "Off: The single mouse event is not queued if the keyboard is locked"
1006 static const struct true_false_string tn5250_field_wdsf_pmb_flag1_3
= {
1007 "On: A marker box is drawn on the first event of a two-event definition",
1008 "Off: A marker box is not drawn on the first event of a two-event definition"
1011 #define PMB_RESERVED 0x00
1012 #define LEFT_BUTTON_PRESSED 0x01
1013 #define LEFT_BUTTON_RELEASED 0x02
1014 #define LEFT_BUTTON_DOUBLE_CLICK 0x03
1015 #define RIGHT_BUTTON_PRESSED 0x04
1016 #define RIGHT_BUTTON_RELEASED 0x05
1017 #define RIGHT_BUTTON_DOUBLE_CLICK 0x06
1018 #define MIDDLE_BUTTON_PRESSED 0x07
1019 #define MIDDLE_BUTTON_RELEASED 0x08
1020 #define MIDDLE_BUTTON_DOUBLE_CLICK 0x09
1021 #define SHIFTED_LEFT_BUTTON_PRESSED 0x0A
1022 #define SHIFTED_LEFT_BUTTON_RELEASED 0x0B
1023 #define SHIFTED_LEFT_BUTTON_DOUBLE_CLICK 0x0C
1024 #define SHIFTED_RIGHT_BUTTON_PRESSED 0x0D
1025 #define SHIFTED_RIGHT_BUTTON_RELEASED 0x0E
1026 #define SHIFTED_RIGHT_BUTTON_DOUBLE_CLICK 0x0F
1027 #define SHIFTED_MIDDLE_BUTTON_PRESSED 0x10
1028 #define SHIFTED_MIDDLE_BUTTON_RELEASED 0x11
1029 #define SHIFTED_MIDDLE_BUTTON_DOUBLE_CLICK 0x12
1031 static const value_string vals_tn5250_mouse_events
[] = {
1032 { PMB_RESERVED
, "Reserved"},
1033 { LEFT_BUTTON_PRESSED
, "Left button pressed"},
1034 { LEFT_BUTTON_RELEASED
, "Left button released"},
1035 { LEFT_BUTTON_DOUBLE_CLICK
, "Left button double click"},
1036 { RIGHT_BUTTON_PRESSED
, "Right button pressed"},
1037 { RIGHT_BUTTON_RELEASED
, "Right button released"},
1038 { RIGHT_BUTTON_DOUBLE_CLICK
, "Right button double click"},
1039 { MIDDLE_BUTTON_PRESSED
, "Middle button pressed"},
1040 { MIDDLE_BUTTON_RELEASED
, "Middle button released"},
1041 { MIDDLE_BUTTON_DOUBLE_CLICK
, "Middle button double click"},
1042 { SHIFTED_LEFT_BUTTON_PRESSED
, "Shifted left button pressed"},
1043 { SHIFTED_LEFT_BUTTON_RELEASED
, "Shifted left button released"},
1044 { SHIFTED_LEFT_BUTTON_DOUBLE_CLICK
, "Shifted left button double click"},
1045 { SHIFTED_RIGHT_BUTTON_PRESSED
, "Shifted right button pressed"},
1046 { SHIFTED_RIGHT_BUTTON_RELEASED
, "Shifted right button released"},
1047 { SHIFTED_RIGHT_BUTTON_DOUBLE_CLICK
, "Shifted right button double click"},
1048 { SHIFTED_MIDDLE_BUTTON_PRESSED
, "Shifted middle button pressed"},
1049 { SHIFTED_MIDDLE_BUTTON_RELEASED
, "Shifted middle button released"},
1050 { SHIFTED_MIDDLE_BUTTON_DOUBLE_CLICK
, "Shifted middle button double click"},
1054 /* 15.7 Draw/Erase Grid Lines Structured Field */
1055 static const struct true_false_string tn5250_field_wdsf_deg_flag1_0
= {
1056 "On: Clear the grid line buffer specified by the partition byte",
1057 "Off: Do not clear the grid line buffer specified by the partition byte"
1060 #define SOLID_LINE 0x00
1061 #define THICK_SOLID_LINE_BOLD 0x01
1062 #define DOUBLE_LINE 0x02
1063 #define DOTTED_LINE 0x03
1064 #define DASHED_LINE 0x08
1065 #define THICK_DASHED_LINE_BOLD 0x09
1066 #define DOUBLE_DASHED_LINE 0x0A
1067 #define USE_DEFAULT_LINE_FOR_THE_DISPLAY 0xFF
1069 static const value_string vals_tn5250_deg_lines
[] = {
1070 { SOLID_LINE
, "Solid line"},
1071 { THICK_SOLID_LINE_BOLD
, "Thick solid line (bold)"},
1072 { DOUBLE_LINE
, "Double line"},
1073 { DOTTED_LINE
, "Dotted line"},
1074 { DASHED_LINE
, "Dashed line"},
1075 { THICK_DASHED_LINE_BOLD
, "Thick dashed line (bold)"},
1076 { DOUBLE_DASHED_LINE
, "Double dashed line"},
1077 { USE_DEFAULT_LINE_FOR_THE_DISPLAY
, "Use default line for the display."},
1081 /* 15.7.1 Draw/Erase Grid Lines Structured Field - Minor Structure*/
1082 #define UPPER_HORIZONTAL_LINE 0x00
1083 #define LOWER_HORIZONTAL_LINE 0x01
1084 #define LEFT_VERTICAL_LINE 0x02
1085 #define RIGHT_VERTICAL_LINE 0x03
1086 #define PLAIN_BOX 0x04
1087 #define HORIZONTALLY_RULED_BOX 0x05
1088 #define VERTICALLY_RULED_BOX 0x06
1089 #define HORIZONTALLY_AND_VERTICALLY_RULED_BOX 0x07
1091 static const value_string vals_tn5250_wdsf_deg_minor_type
[] = {
1092 { UPPER_HORIZONTAL_LINE
, "Upper horizontal line"},
1093 { LOWER_HORIZONTAL_LINE
, "Lower horizontal line"},
1094 { LEFT_VERTICAL_LINE
, "Left vertical line"},
1095 { RIGHT_VERTICAL_LINE
, "Right vertical line"},
1096 { PLAIN_BOX
, "Plain box"},
1097 { HORIZONTALLY_RULED_BOX
, "Horizontally ruled box"},
1098 { VERTICALLY_RULED_BOX
, "Vertically ruled box"},
1099 { HORIZONTALLY_AND_VERTICALLY_RULED_BOX
, "Horizontally and vertically ruled box"},
1103 static const struct true_false_string tn5250_field_wdsf_deg_ms_flag1_0
= {
1104 "Erase the construct specified",
1105 "Draw the construct specified"
1108 /* 15.22 SAVE PARTIAL SCREEN Command */
1109 static const struct true_false_string tn5250_field_sps_flag1_0
= {
1110 "Do not include image/fax information",
1111 "Include image/fax information if image/fax data is on the 5250 session"
1114 /* 15.25 ROLL Command */
1115 static const struct true_false_string tn5250_field_roll_flag1_0
= {
1120 /* 15.26.1 WRITE SINGLE STRUCTURED FIELD Command - 5250 WSC CUSTOMIZATION Command*/
1121 #define KEYSTROKE_BUFFERING_CONTROL 0x01
1122 #define CURSOR_CONTROL 0x02
1124 static const value_string vals_tn5250_wssf_minor_type
[] = {
1125 { KEYSTROKE_BUFFERING_CONTROL
, "Keystroke Buffering Control"},
1126 { CURSOR_CONTROL
, "Cursor Control"},
1130 #define WSC_MINOR_STRUCTURE_LENGTH 0x03
1132 static const struct true_false_string tn5250_field_wssf_flag2_0
= {
1134 "WARNING: Reserved, but set."
1137 static const struct true_false_string tn5250_field_wssf_flag2_1
= {
1138 "Enhanced field exit required mode.",
1139 "Enhanced field exit required mode not set"
1142 static const struct true_false_string tn5250_field_wssf_flag2_2
= {
1143 "Resets enhanced field exit required mode",
1144 "Does not reset enhanced field exit required mode"
1147 static const struct true_false_string tn5250_field_wssf_flag2_3
= {
1148 "Sets System/36* mode of operation",
1149 "Does not set System/36* mode of operation"
1152 static const struct true_false_string tn5250_field_wssf_flag2_4
= {
1153 "Resets System/36* mode of operation",
1154 "Does not reset System/36* mode of operation"
1157 static const struct true_false_string tn5250_field_wssf_flag2_5
= {
1158 "Set SBA code to X'04' in data returned for READ commands if set to logic 1.",
1159 "Does not set SBA code to X'04' in data returned for READ commands."
1162 static const struct true_false_string tn5250_field_wssf_flag2_6
= {
1163 "Set SBA code to X'11' in data returned for READ commands if set to logic 1.",
1164 "Does not set SBA code to X'11' in data returned for READ commands."
1167 static const struct true_false_string tn5250_field_wssf_flag2_7
= {
1168 "Customization applies to entire 5494 if set to logic 1",
1169 "Customization does not apply to entire 5494 if set to logic 1"
1172 /* 15.26.1 WRITE SINGLE STRUCTURED FIELD Command - 5250 WSC CUSTOMIZATION Command
1173 - Keystroke Buffering Control Minor Structure*/
1174 static const struct true_false_string tn5250_field_wssf_kbc_flag1_5
= {
1175 "Change type-ahead state if set to logic 1",
1176 "Change type-ahead state not set"
1179 static const struct true_false_string tn5250_field_wssf_kbc_flag1_6
= {
1180 "Indicates type-ahead is on if set to logic 1 (and bit 5 set to 1). If bit 6 is set to 0 and bit 5 is set to 1, type-ahead is turned off. If bit 5 is set to 0, bit 6 is ignored.",
1181 "Indicates type-ahead is on if set to logic 1 (and bit 5 set to 1). If bit 6 is set to 0 and bit 5 is set to 1, type-ahead is turned off. If bit 5 is set to 0, bit 6 is ignored."
1184 static const struct true_false_string tn5250_field_wssf_kbc_flag1_7
= {
1185 "Attention key is buffered",
1186 "Attention key is not buffered"
1189 /* 15.26.1 WRITE SINGLE STRUCTURED FIELD Command - 5250 WSC CUSTOMIZATION Command
1190 - Cursor Control Minor Structure*/
1192 static const struct true_false_string tn5250_field_wssf_cc_flag1_7
= {
1193 "Cursor will blink",
1194 "Cursor will not blink"
1197 /* 15.26.2 WRITE SINGLE STRUCTURED FIELD Command - IMAGE/FAX CONTROL Command */
1199 static const struct true_false_string tn5250_field_wssf_ifc_flag1_0
= {
1200 "If the display supports a cache,this image/fax data remains in cache memory when the application "
1201 "sends one of the above commands to erase this image/fax data",
1202 "Erase this image/fax from memory whenever any of the following commands are received: CLEAR UNIT, CLEAR UNIT ALTERNATE "
1203 "(without saving image/fax), RESTORE RESTORE PARTIAL (if image/fax data was indicated in the SAVE PARTIAL), Another IMAGE/FAX CONTROL command"
1206 static const value_string tn5250_vals_tn5250_wssf_ifc_vals
[] = {
1207 { 0x00 , "Normal display (default)"},
1208 { 0x08 , "Transparent display (underlying text may be seen through the image/fax)"},
1209 { 0x04 , "Non-display (the image/fax data remains in memory until it is erased). All other parameters in this command are ignored."},
1210 { 0x02 , "Previously stored image/fax data is erased from the 5250 session and possibly from display memory "
1211 "(see bit 0 previously). All other parameters in this command are ignored."},
1215 static const struct true_false_string tn5250_field_wssf_ifc_flag1_4
= {
1216 "The display does not present scroll bars",
1217 "The display presents vertical and horizontal scroll bars as needed and allows the user to scroll without "
1218 "any interaction with the AS/400 application"
1221 static const struct true_false_string tn5250_field_wssf_ifc_flag1_5
= {
1222 "Image/fax is light foreground on dark background. Preserve the light foreground data during scaling",
1223 "Image/fax is dark foreground on light background. Preserve the dark foreground data during scaling"
1226 static const struct true_false_string tn5250_field_wssf_ifc_flag1_6
= {
1227 "Background and foreground colors are reversed",
1228 "Normal image/fax display"
1231 static const struct true_false_string tn5250_field_wssf_ifc_flag1_7
= {
1232 "Do not allow EasyScroll with the primary mouse button.",
1233 "Allow the primary mouse button to EasyScroll the image/fax"
1236 static const struct true_false_string tn5250_field_wssf_ifc_flag2_0
= {
1237 "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",
1238 "Normal image/fax display"
1241 static const struct true_false_string tn5250_field_wssf_ifc_flag2_1
= {
1242 "Inhibit the secondary mouse button to Trim Magnify",
1243 "Allow the secondary mouse button to Trim Magnify the image/fax data"
1246 static const struct true_false_string tn5250_field_wssf_ifc_flag2_7
= {
1247 "Reserved for IBM image/fax-capable displays. It is used to download compression algorithms. Non-IBM displays should ignore this bit.",
1248 "Reserved for IBM image/fax-capable displays. It is used to download compression algorithms. Non-IBM displays should ignore this bit."
1251 static const value_string vals_tn5250_image_format
[] = {
1252 { 0x0000, "An unknown IBM-defined format."},
1253 { 0x0001, "IOCA (The IOCA header defines the compression algorithm.)"},
1254 { 0x0002, "TIFF (The TIFF header defines the compression algorithm.)"},
1256 { 0x0004, "Stand alone Group 3 Fax compression."},
1261 static const value_string vals_tn5250_wssf_ifc_scaling
[] = {
1262 { 0xFFFE, "No Scroll Bar Scaling. The data is scaled such that it fits within the Viewport without requiring scrolling in either direction."},
1263 { 0xFFFD, "Fill Scaling. The data is scaled such that it fits horizontally within the Viewport without requiring horizontal scroll bars."},
1264 { 0xFFEA, "Decrement Scaling Values."},
1265 { 0xFFDA, "Increment Scaling Values."},
1270 /* 15.26.3 WRITE SINGLE STRUCTURED FIELD Command - IMAGE/FAX DOWNLOAD Command */
1271 static const struct true_false_string tn5250_field_wssf_ifd_flag1_0
= {
1272 "This is the last or only IMAGE/FAX DOWNLOAD command for this image/fax",
1273 "Additional IMAGE/FAX DOWNLOAD commands follow, containing data for this image/fax"
1276 static const value_string vals_tn5250_image_fax_error
[] = {
1277 { 0x0001, "Image/fax data was too large. Only the first portion of the data is displayed."},
1278 { 0x0002, " Image/fax data was too large. The data was ignored."},
1279 { 0x0003, " Invalid major length in the IMAGE/FAX CONTROL command"},
1280 { 0x0004, " Invalid major length in the IMAGE/FAX DOWNLOAD command"},
1281 { 0x0005, " Error in the IMAGE/FAX CONTROL command"},
1282 { 0x0006, " Error in the IMAGE/FAX DOWNLOAD command"},
1283 { 0x0007, " Error detected in the image/fax data"},
1289 /* 15.26.4 WRITE SINGLE STRUCTURED FIELD Command - Video/Audio Controls Command Major Structure */
1291 static const range_string vals_tn5250_vac_data
[] = {
1292 { 0x13000001, 0x13000001, "Set View Mode to PIP"},
1293 { 0x13000000, 0x13000000, "Set View Mode to Off"},
1294 { 0x14000000, 0x14000000, "Turn Audio On"},
1295 { 0x14000001, 0x14000001, "Turn Audio Off"},
1296 { 0x0C000000, 0x0C000064, "Set PC/TV Volume"},
1297 { 0x00000000, 0xFFFFFFFF, "Set PIP Location and Size"},
1298 { 0x1F000001, 0x1F000001, "Set PIP See Through On"},
1299 { 0x1F000000, 0x1F000000, "Set PIP SeeThrough Off"},
1300 { 0x20000001, 0x20000001, "Freeze PIP"},
1301 { 0x20000000, 0x20000000, "Resume After Freeze"},
1302 { 0x12000000, 0x12000064, "Set PC/TV Channel"},
1303 { 0x11000000, 0x11000000, "Set Antenna Tuner Source"},
1304 { 0x11000001, 0x11000001, "Set Cable Tuner Source"},
1305 { 0x21000001, 0x21000001, "Disable Internal Speaker"},
1306 { 0x21000000, 0x21000000, "Enable Internal Speaker"},
1307 { 0x17000001, 0x17000001, "Keyboard Disable"},
1308 { 0x17000000, 0x17000000, "Keyboard Enable"},
1309 { 0x0D000000, 0x0D000064, "Set PC/TV Brightness"},
1310 { 0x0F000000, 0x0F000064, "Set PC/TV Color"},
1311 { 0x0E000000, 0x0E000064, "Set PC/TV Contrast"},
1312 { 0x10000000, 0x10006464, "Set PC/TV Tint"},
1316 /* Appendix B.1 WRITE SINGLE STRUCTURED FIELD Command - True Transparency Write Command Major Structure */
1317 static const value_string vals_tn5250_wssf_ttw_flag
[] = {
1319 { 0x01, "ASCII Data"},
1324 /* 15.27.3 WRITE STRUCTURED FIELD (WSF) Command - 5250 QUERY STATION STATE Command*/
1325 static const struct true_false_string tn5250_field_wsf_qss_flag1_0
= {
1326 "QUERY STATION STATE Command Response",
1327 "QUERY STATION STATE Command"
1330 static const struct true_false_string tn5250_field_wsf_qss_flag2_7
= {
1331 "Return all customization states",
1332 "Return Keystroke Buffering Control Minor Structure"
1335 /* 15.27.4.1 DEFINE AUDIT WINDOW TABLE Command */
1336 static const range_string vals_tn5250_dawt_id
[] = {
1337 { 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" },
1338 { 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" },
1339 { 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" },
1343 static const range_string vals_tn5250_dawt_length
[] = {
1344 { 0x00, 0x01, "Length of Table Entry is Invalid (should between 2 and 22)" },
1345 { 0x02, 0x16, "Length of Table Entry" },
1346 { 0x17, 0xFF, "Length of Table Entry is Invalid (should between 2 and 22)" },
1350 /* 15.27.4.2 DEFINE COMMAND KEY FUNCTION Command */
1351 static const range_string vals_tn5250_dckf_id
[] = {
1352 { 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" },
1353 { 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" },
1354 { 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" },
1358 static const range_string vals_tn5250_dckf_length
[] = {
1359 { 0x00, 0x02, "Length of Table Entry is Invalid (should between 3 and 82)" },
1360 { 0x03, 0x52, "Length of Table Entry" },
1361 { 0x53, 0xFF, "Length of Table Entry is Invalid (should between 3 and 82)" },
1365 static const range_string vals_tn5250_dckf_key_code
[] = {
1366 { 0x01, 0x18, "Command key number"},
1367 { 0xFB, 0xFB, "Symbols Support (Cmd + A) message"},
1368 { 0xFC, 0xFC, "Formatted text usage"},
1369 { 0xFD, 0xFD, "Stop code advance key"},
1370 { 0xFE, 0xFE, "Del key"},
1371 { 0xFF, 0xFF, "Home key"},
1375 static const value_string vals_tn5250_dckf_function_code
[] = {
1376 { 0x01, "Perform general prompt"},
1377 { 0x02, "Perform locate"},
1378 { 0x03, "Perform copy text"},
1379 { 0x04, "Perform move text"},
1380 { 0x05, "Perform delete text"},
1381 { 0x06, "Perform hyphenate text"},
1382 { 0x07, "Display AS/400 system-defined prompt line message"},
1386 /* 15.27.4.3 READ TEXT SCREEN Command */
1388 static const range_string vals_tn5250_rts_partition
[] = {
1389 { 0x00, 0x00, "Valid Parition ID" },
1390 { 0x01, 0xFF, "Invalid Partition ID" },
1394 static const struct true_false_string tn5250_field_rts_flag1_0
= {
1395 "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.",
1396 "WARNING: Invalid Value"
1401 /* 15.27.4.4 DEFINE PENDING OPERATIONS Command */
1403 static const struct true_false_string tn5250_field_dpo_flag1_0
= {
1404 "Insert mode enabled",
1405 "Insert mode not enabled"
1408 static const struct true_false_string tn5250_field_dpo_flag1_1
= {
1409 "Locate mode enabled",
1410 "Locate mode not enabled"
1413 static const struct true_false_string tn5250_field_dpo_flag1_2
= {
1414 "AS/400 system controls text delete",
1415 "AS/400 system does not control text delete"
1418 static const struct true_false_string tn5250_field_dpo_flag1_3
= {
1419 "5494 responds to the Error Reset key by locking the workstation keyboard and sending an X'4E' AID request to the AS/400 system",
1420 "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"
1423 static const struct true_false_string tn5250_field_dpo_flag1_4
= {
1424 "5494 must notify the AS/400 system on completion of a copy, move, or delete operation",
1425 "5494 does not need to notify the AS/400 system on completion of a copy, move, or delete operation"
1428 static const struct true_false_string tn5250_field_dpo_flag1_5
= {
1429 "AS/400 system assisted locate function enabled",
1430 "AS/400 system assisted locate function not enabled"
1433 static const struct true_false_string tn5250_field_dpo_flag1_6
= {
1434 "Tab function independent of shift status",
1435 "Tab function not independent of shift status"
1438 static const struct true_false_string tn5250_field_dpo_flag1_7
= {
1439 "Insert mode is toggled by the Insert key",
1440 "Insert mode is toggled by the Insert key"
1443 static const struct true_false_string tn5250_field_dpo_flag2_0
= {
1444 "Copy, move, or delete is pending",
1445 "Copy, move, or delete is not pending"
1449 /* 15.27.4.5 DEFINE TEXT SCREEN FORMAT Command */
1450 static const struct true_false_string tn5250_field_dtsf_flag1_0
= {
1451 "Column edit active",
1452 "Column edit is not active"
1455 static const struct true_false_string tn5250_field_dtsf_flag1_1
= {
1456 "Data exists outside left margin",
1457 "No data outside left margin"
1460 static const struct true_false_string tn5250_field_dtsf_flag1_2
= {
1461 "Data exists outside right margin",
1462 "No data outside right margin"
1465 static const struct true_false_string tn5250_field_dtsf_flag1_3
= {
1466 "Cursor-sensitive scrolling active",
1467 "No cursor-sensitive scrolling active"
1470 static const struct true_false_string tn5250_field_dtsf_flag1_4
= {
1471 "Fake DP mode active",
1472 "No fake DP mode active"
1475 static const struct true_false_string tn5250_field_dtsf_flag1_5
= {
1476 "Do not clear screen",
1477 "Clear screen as normal"
1480 static const struct true_false_string tn5250_field_dtsf_flag1_6
= {
1481 "Document orientation is right to left",
1482 "Document orientation is left to right"
1485 static const struct true_false_string tn5250_field_dtsf_flag1_7
= {
1486 "Host does not have BIDI support.",
1487 "Host has bi-directional (BIDI) support"
1491 static const struct true_false_string tn5250_field_dtsf_flag2_0
= {
1492 "Data stream from AS/400 system.",
1493 "Data stream from S/36 system."
1496 static const struct true_false_string tn5250_field_dtsf_flag2_1
= {
1497 "The screen data does have extended attributes.",
1498 "The screen data in READ and WRITE commands does not have extended attributes."
1501 static const struct true_false_string tn5250_field_dtsf_flag2_2
= {
1502 "WordPerfect/400* edit session",
1503 "OfficeVision/400* edit session"
1506 static const struct true_false_string tn5250_field_dtsf_flag2_3
= {
1507 "Secondary language tables should be used.",
1508 "Primary language tables should be used."
1511 static const range_string vals_tn5250_dtsf_flag2_vals
[] = {
1512 { 0x00, 0x70, "Reserved"},
1513 { 0x80, 0x80, "System Version 2 Release 2.0"},
1514 { 0x90, 0x90, "System Version 2 Release 3.0"},
1515 { 0xA0, 0xA0, "System Version 3 Release 0.5"},
1516 { 0xB0, 0xB0, "System Version 3 Release 1.0"},
1517 { 0xC0, 0xF0, "Reserved"},
1521 /* 15.27.4.6 DEFINE SCALE LINE Command */
1522 static const struct true_false_string tn5250_field_dsl_flag1_0
= {
1523 "Suppress display of the right margin symbol",
1524 "Do not suppress display of the right margin symbol"
1527 static const struct true_false_string tn5250_field_dsl_flag1_1
= {
1528 "Suppress display of the left margin symbol",
1529 "Do not suppress display of the left margin symbol"
1532 static const struct true_false_string tn5250_field_dsl_flag1_2
= {
1533 "Indicate a tab stop located off the display if the absolute right margin is not defined",
1534 "Do not indicate a tab stop located off the display if the absolute right margin is not defined"
1537 static const range_string vals_tn5250_dsl_function
[] = {
1538 { 0x01, 0x01, "Left margin symbol"},
1539 { 0x02, 0x02, "Right margin symbol"},
1540 { 0x03, 0x03, "Left tab symbol"},
1541 { 0x04, 0x04, "Right tab symbol"},
1542 { 0x05, 0x05, "Center tab symbol"},
1543 { 0x06, 0x06, "Decimal align tab symbol"},
1544 { 0x07, 0x07, "Comma align tab symbol"},
1545 { 0x08, 0x08, "Colon align tab symbol"},
1546 { 0x09, 0x09, "Inactive tab stop symbol"},
1547 { 0x0A, 0x0A, "Center of margins symbol"},
1548 { 0x0B, 0x0B, "Paper edge symbol"},
1549 { 0x0C, 0x0C, "Pitch symbol"},
1550 { 0x0D, 0xFF, "Reserved."},
1555 /* 15.27.4.7 WRITE TEXT SCREEN Command */
1556 static const struct true_false_string tn5250_field_wts_flag1_0
= {
1558 "3270 format (not supported on 5494)."
1561 static const struct true_false_string tn5250_field_wts_flag1_1
= {
1562 "First line in body is an odd number of half-spacing units.",
1563 "First line in body is an even number of half-spacing units."
1566 static const struct true_false_string tn5250_field_wts_flag1_2
= {
1567 "Cursor is on a line of formatted text. The 5494 displays text message defined in the Define Command Key table.",
1568 "Cursor is not on a line that contains formatted text. No function is performed."
1571 static const struct true_false_string tn5250_field_wts_flag1_3
= {
1572 "Display the primary attribute at the cursor location.",
1573 "Do not display the primary attribute"
1576 static const struct true_false_string tn5250_field_wts_flag2_6
= {
1577 "Lock keyboard to inhibit data input before any lines are written to screen",
1578 "Do not lock keyboard to inhibit data input before any lines are written to screen"
1581 static const struct true_false_string tn5250_field_wts_flag3_0
= {
1583 "Reserved: should be 0!"
1586 static const struct true_false_string tn5250_field_wts_flag3_1
= {
1587 "Moves cursor to home position after write operation is completed",
1588 "Does not move cursor to home position after write operation is completed"
1591 static const struct true_false_string tn5250_field_wts_flag3_2
= {
1592 "Resets Cursor Blinking mode after write operation is completed",
1593 "Does not reset Cursor Blinking mode after write operation is completed"
1596 static const struct true_false_string tn5250_field_wts_flag3_3
= {
1597 "Sets Cursor Blinking mode after write operation is completed",
1598 "Does not set Cursor Blinking mode after write operation is completed"
1601 static const struct true_false_string tn5250_field_wts_flag3_4
= {
1602 "Resets keyboard locking function after write operation is completed",
1603 "Does not reset keyboard locking function after write operation is completed"
1606 static const struct true_false_string tn5250_field_wts_flag3_5
= {
1607 "Enables audible alarm after write operation is completed",
1608 "Does not enable audible alarm after write operation is completed"
1611 static const struct true_false_string tn5250_field_wts_flag3_6
= {
1612 "Resets Message Waiting indicator after write operation is completed",
1613 "Does not reset Message Waiting indicator after write operation is completed"
1616 static const struct true_false_string tn5250_field_wts_flag3_7
= {
1617 "Sets Message Waiting indicator after write operation is completed",
1618 "Does not set Message Waiting indicator after write operation is completed"
1621 /* Structure of the WRITE TEXT SCREEN Command Line Data */
1622 static const struct true_false_string tn5250_field_wts_cld_flag1_0
= {
1623 "Writes nulls to the line before writing data",
1624 "Does not write nulls to the line before writing data"
1627 static const struct true_false_string tn5250_field_wts_cld_flag1_1
= {
1628 "Inhibits changes to text on this line",
1629 "Does not inhibit changes to text on this line"
1632 static const struct true_false_string tn5250_field_wts_cld_flag1_2
= {
1633 "Inhibits all input functions on this line",
1634 "Does not inhibit all input functions on this line"
1637 static const struct true_false_string tn5250_field_wts_cld_flag1_3
= {
1638 "Indicates that this line has been modified by the operator",
1639 "Indicates that this line has not been modified by the operator"
1642 static const struct true_false_string tn5250_field_wts_cld_flag1_4
= {
1643 "Indicates that the text body has been modified",
1644 "Indicates that the text body has not been modified"
1647 static const struct true_false_string tn5250_field_wts_cld_flag1_5
= {
1648 "Inhibits the word spill function on this line",
1649 "Does not inhibit the word spill function on this line"
1652 static const struct true_false_string tn5250_field_wts_cld_flag1_6
= {
1653 "Spills the last word on this line to the next line",
1654 "Does not spill the last word on this line to the next line"
1657 static const struct true_false_string tn5250_field_wts_cld_flag1_7
= {
1658 "Invalid Use of Reserved Field",
1662 static const struct true_false_string tn5250_field_wts_cld_flag2_0
= {
1663 "Indicates that this row contains formatted text",
1664 "Indicates that this row does not contain formatted text"
1667 static const struct true_false_string tn5250_field_wts_cld_flag2_1
= {
1668 "Indicates that a required tab character exists left of absolute left margin",
1669 "Indicates that a required tab character does not exist left of absolute left margin"
1672 static const struct true_false_string tn5250_field_wts_cld_flag2_2
= {
1673 "Indicates that a tab character exists left of absolute left margin",
1674 "Indicates that a tab character does not exist left of absolute left margin"
1677 static const struct true_false_string tn5250_field_wts_cld_flag2_3
= {
1678 "Indicates that a required tab character exists right of absolute right margin",
1679 "Indicates that a required tab character does not exist right of absolute right margin"
1682 static const struct true_false_string tn5250_field_wts_cld_flag2_4
= {
1683 "Indicates that a tab character exists right of absolute right margin",
1684 "Indicates that a tab character does not exist right of absolute right margin"
1687 static const struct true_false_string tn5250_field_wts_cld_flag3_0
= {
1688 "Indicates that line orientation is right to left",
1689 "Indicates that line orientation is not right to left"
1692 static const struct true_false_string tn5250_field_wts_cld_flag3_1
= {
1693 "Indicates that 'begin reverse' exists to the left of left margin",
1694 "Indicates that 'begin reverse' is not to the left of left margin"
1697 static const struct true_false_string tn5250_field_wts_cld_flag3_2
= {
1698 "Indicates that 'end reverse' exists to the right of right margin",
1699 "Indicates that 'end reverse' is not to the right of right margin"
1702 static const struct true_false_string tn5250_field_wts_cld_flag3_3
= {
1703 "Invalid Use of Reserved Field",
1707 static const struct true_false_string tn5250_field_wts_cld_flag3_4
= {
1708 "Indicates that a primary attribute exists on the line",
1709 "Indicates that a primary attribute does not exist on the line"
1712 static const struct true_false_string tn5250_field_wts_cld_flag3_5
= {
1713 "Indicates that an end attribute exists one position to the right of right margin",
1714 "Indicates that an end attribute does not exist one position to the right of right margin"
1717 static const struct true_false_string tn5250_field_wts_cld_flag3_6
= {
1718 "Indicates that one or more word underscore control characters (X'1D') exist on the line",
1719 "Indicates that one or more word underscore control characters (X'1D') do not exist on the line"
1722 static const struct true_false_string tn5250_field_wts_cld_flag3_7
= {
1723 "Indicates that one or more half index up or half index down text attributes exist on the line",
1724 "Indicates that one or more half index up or half index down text attributes do not exist on the line"
1727 /* 15.27.4.10 DEFINE OPERATOR ERROR MESSAGES Command */
1729 static const range_string vals_tn5250_dorm_id
[] = {
1730 { 0x00, 0x7F, "Indicates update of primary operator error message table is necessary."},
1731 { 0x80, 0xFE, "Indicates update of secondary operator error message table is necessary."},
1732 { 0xFF, 0xFF, "Indicates the value of the ID bytes set by the 5494 when the table is built initially."},
1736 static const range_string vals_tn5250_dorm_length
[] = {
1737 { 0x00, 0x02, "Length of Table Entry is Invalid (should between 3 and 82)" },
1738 { 0x03, 0x53, "Length of Table Entry" },
1739 { 0x54, 0xFF, "Length of Table Entry is Invalid (should between 3 and 82)" },
1743 /* 15.27.4.11 DEFINE PITCH TABLE Command */
1745 static const range_string vals_tn5250_dpt_id
[] = {
1746 { 0x00, 0x7F, "Indicates update of primary pitch table is necessary."},
1747 { 0x80, 0xFE, "Indicates update of secondary pitch table is necessary."},
1748 { 0xFF, 0xFF, "Indicates the value of the ID bytes set by the 5494 when the table is built initially."},
1752 /* 15.27.4.12 DEFINE FAKE DP COMMAND KEY FUNCTION Command */
1753 #define TOP_ROW_COMMAND_KEYS 0x40
1754 #define CORE_AREA_COMMAND_KEYS 0x80
1756 static const range_string vals_tn5250_dfdpck_data_field
[] = {
1757 { 0x00, 0x40, "Invalid Data Field Type"},
1758 { 0x40, 0x40, "Top Row Command Key Functions"},
1759 { 0x41, 0x79, "Invalid Data Field Type"},
1760 { 0x80, 0x80, "Core Area Key Command Functions"},
1761 { 0x81, 0xFF, "Invalid Data Field Type"},
1765 /* Structure of the DEFINE FAKE DP COMMAND KEY FUNCTION Core Area Command Keys */
1767 static const struct true_false_string tn5250_field_dfdpck_coreflag_0
= {
1768 "Typing Cmd u (begin underscore) causes the operator error '77'.",
1772 static const struct true_false_string tn5250_field_dfdpck_coreflag_1
= {
1773 "Typing Cmd j (end attribute) causes the operator error '77'.",
1777 static const struct true_false_string tn5250_field_dfdpck_coreflag_2
= {
1778 "Typing Cmd b (begin bold) causes the operator error '77'.",
1782 static const struct true_false_string tn5250_field_dfdpck_coreflag_3
= {
1783 "Typing Cmd w (word underscore) causes the operator error '77'.",
1787 static const struct true_false_string tn5250_field_dfdpck_coreflag_4
= {
1788 "Typing Cmd y (half-index-up) causes the operator error '77'.",
1792 static const struct true_false_string tn5250_field_dfdpck_coreflag_5
= {
1793 "Typing Cmd h (half-index-down) causes the operator error '77'.",
1797 static const struct true_false_string tn5250_field_dfdpck_coreflag_6
= {
1798 "Typing Cmd s (stop code) causes the operator error '77'.",
1802 static const struct true_false_string tn5250_field_dfdpck_coreflag_7
= {
1803 "Typing Cmd space (requiredspace) causes the operator error '77'.",
1807 /* Structure of the DEFINE FAKE DP COMMAND KEY FUNCTION Top Row Command Keys */
1808 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_0
= {
1809 "Typing PFA1 causes the operator error '77'.",
1813 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_1
= {
1814 "Typing PFA2 causes the operator error '77'.",
1818 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_2
= {
1819 "Typing PFA3 causes the operator error '77'.",
1823 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_3
= {
1824 "Typing PFA4 causes the operator error '77'.",
1828 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_4
= {
1829 "Typing PFA5 causes the operator error '77'.",
1833 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_5
= {
1834 "Typing PFA6 causes the operator error '77'.",
1838 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_6
= {
1839 "Typing PFA7 causes the operator error '77'.",
1843 static const struct true_false_string tn5250_field_dfdpck_toprowflag1_7
= {
1844 "Typing PFA8 causes the operator error '77'.",
1848 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_0
= {
1849 "Typing PFA9 causes the operator error '77'.",
1853 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_1
= {
1854 "Typing PFA10 causes the operator error '77'.",
1858 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_2
= {
1859 "Typing PFA11 causes the operator error '77'.",
1863 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_3
= {
1864 "Typing PFA12 causes the operator error '77'.",
1868 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_4
= {
1869 "Typing PFA13 causes the operator error '77'.",
1873 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_5
= {
1874 "Typing PFA14 causes the operator error '77'.",
1878 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_6
= {
1879 "Typing PFA15 causes the operator error '77'.",
1883 static const struct true_false_string tn5250_field_dfdpck_toprowflag2_7
= {
1884 "Typing PFA16 causes the operator error '77'.",
1888 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_0
= {
1889 "Typing PFA17 causes the operator error '77'.",
1893 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_1
= {
1894 "Typing PFA18 causes the operator error '77'.",
1898 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_2
= {
1899 "Typing PFA19 causes the operator error '77'.",
1903 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_3
= {
1904 "Typing PFA20 causes the operator error '77'.",
1908 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_4
= {
1909 "Typing PFA21 causes the operator error '77'.",
1913 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_5
= {
1914 "Typing PFA22 causes the operator error '77'.",
1918 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_6
= {
1919 "Typing PFA23 causes the operator error '77'.",
1923 static const struct true_false_string tn5250_field_dfdpck_toprowflag3_7
= {
1924 "Typing PFA24 causes the operator error '77'.",
1928 /* 16.2.1 - AID Codes */
1929 #define AID_CLEAR 0xBD
1930 #define AID_ENTER_OR_RECORD_ADV 0xF1
1931 #define AID_HELP 0xF3
1932 #define AID_ROLL_DOWN 0xF4
1933 #define AID_ROLL_UP 0xF5
1934 #define AID_ROLL_LEFT 0xD9
1935 #define AID_ROLL_RIGHT 0xDA
1936 #define AID_PRINT 0xF6
1937 #define AID_RECORD_BACKSPACE 0xF8
1938 #define AID_SLP_AUTO_ENTER 0x3F
1939 #define AID_FORWARD_EDGE_TRIGGER_AUTO__ENTER 0x50
1940 #define AID_PA1 0x6C
1941 #define AID_PA2 0x6E
1942 #define AID_PA3 0x6B
1943 #define AID_CMD_01 0x31
1944 #define AID_CMD_02 0x32
1945 #define AID_CMD_03 0x33
1946 #define AID_CMD_04 0x34
1947 #define AID_CMD_05 0x35
1948 #define AID_CMD_06 0x36
1949 #define AID_CMD_07 0x37
1950 #define AID_CMD_08 0x38
1951 #define AID_CMD_09 0x39
1952 #define AID_CMD_10 0x3A
1953 #define AID_CMD_11 0x3B
1954 #define AID_CMD_12 0x3C
1955 #define AID_CMD_13 0xB1
1956 #define AID_CMD_14 0xB2
1957 #define AID_CMD_15 0xB3
1958 #define AID_CMD_16 0xB4
1959 #define AID_CMD_17 0xB5
1960 #define AID_CMD_18 0xB6
1961 #define AID_CMD_19 0xB7
1962 #define AID_CMD_20 0xB8
1963 #define AID_CMD_21 0xB9
1964 #define AID_CMD_22 0xBA
1965 #define AID_CMD_23 0xBB
1966 #define AID_CMD_24 0xBC
1967 #define AID_INBOUND_WRITE_STRUCTURED_FIELD 0x88
1968 #define AID_PASS_THROUGH_RESPONSE 0xFF
1969 #define AID_IMAGE_FAX_REQUEST 0x81
1970 #define AID_UNKNOWN_IMAGE_FAX_FORMAT 0x82
1971 #define AID_IMAGE_FAX_ERROR 0x83
1973 static const range_string vals_tn5250_attention_identification_bytes
[] = {
1974 { AID_CLEAR
, AID_CLEAR
, "Clear"},
1975 { AID_ENTER_OR_RECORD_ADV
, AID_ENTER_OR_RECORD_ADV
, "Enter or Record Adv"},
1976 { AID_HELP
, AID_HELP
, "Help"},
1977 { AID_ROLL_DOWN
, AID_ROLL_DOWN
, "Roll Down"},
1978 { AID_ROLL_UP
, AID_ROLL_UP
, "Roll Up"},
1979 { AID_ROLL_LEFT
, AID_ROLL_LEFT
, "Roll Left"},
1980 { AID_ROLL_RIGHT
, AID_ROLL_RIGHT
, "Roll Right"},
1981 { AID_PRINT
, AID_PRINT
, "Print"},
1982 { AID_RECORD_BACKSPACE
, AID_RECORD_BACKSPACE
, "Record Backspace"},
1983 { AID_SLP_AUTO_ENTER
, AID_SLP_AUTO_ENTER
, "SLP Auto Enter"},
1984 { AID_FORWARD_EDGE_TRIGGER_AUTO__ENTER
, AID_FORWARD_EDGE_TRIGGER_AUTO__ENTER
, "Forward Edge Trigger Auto Enter"},
1985 { AID_PA1
, AID_PA1
, "PA1"},
1986 { AID_PA2
, AID_PA2
, "PA2"},
1987 { AID_PA3
, AID_PA3
, "PA3"},
1988 { AID_CMD_01
, AID_CMD_01
, "Cmd 01"},
1989 { AID_CMD_02
, AID_CMD_02
, "Cmd 02"},
1990 { AID_CMD_03
, AID_CMD_03
, "Cmd 03"},
1991 { AID_CMD_04
, AID_CMD_04
, "Cmd 04"},
1992 { AID_CMD_05
, AID_CMD_05
, "Cmd 05"},
1993 { AID_CMD_06
, AID_CMD_06
, "Cmd 06"},
1994 { AID_CMD_07
, AID_CMD_07
, "Cmd 07"},
1995 { AID_CMD_08
, AID_CMD_08
, "Cmd 08"},
1996 { AID_CMD_09
, AID_CMD_09
, "Cmd 09"},
1997 { AID_CMD_10
, AID_CMD_10
, "Cmd 10"},
1998 { AID_CMD_11
, AID_CMD_11
, "Cmd 11"},
1999 { AID_CMD_12
, AID_CMD_12
, "Cmd 12"},
2000 { AID_CMD_13
, AID_CMD_13
, "Cmd 13"},
2001 { AID_CMD_14
, AID_CMD_14
, "Cmd 14"},
2002 { AID_CMD_15
, AID_CMD_15
, "Cmd 15"},
2003 { AID_CMD_16
, AID_CMD_16
, "Cmd 16"},
2004 { AID_CMD_17
, AID_CMD_17
, "Cmd 17"},
2005 { AID_CMD_18
, AID_CMD_18
, "Cmd 18"},
2006 { AID_CMD_19
, AID_CMD_19
, "Cmd 19"},
2007 { AID_CMD_20
, AID_CMD_20
, "Cmd 20"},
2008 { AID_CMD_21
, AID_CMD_21
, "Cmd 21"},
2009 { AID_CMD_22
, AID_CMD_22
, "Cmd 22"},
2010 { AID_CMD_23
, AID_CMD_23
, "Cmd 23"},
2011 { AID_CMD_24
, AID_CMD_24
, "Cmd 24"},
2012 { 0x70 , 0x7F , "Application Use"},
2013 { AID_INBOUND_WRITE_STRUCTURED_FIELD
, AID_INBOUND_WRITE_STRUCTURED_FIELD
, "AID Inbound Write Structured Field"},
2014 { AID_IMAGE_FAX_REQUEST
, AID_IMAGE_FAX_REQUEST
, "Image/Fax Request Aid"},
2015 { AID_UNKNOWN_IMAGE_FAX_FORMAT
, AID_UNKNOWN_IMAGE_FAX_FORMAT
, "Unknown Image/Fax Format Aid"},
2016 { AID_IMAGE_FAX_ERROR
, AID_IMAGE_FAX_ERROR
, " Image/Fax Error Reporting Aid"},
2021 /*TN5250 - RFC1205 - Query Reply Fields */
2022 static const struct true_false_string tn5250_field_qr_flag_0
= {
2027 static const value_string vals_tn5250_chc
[] = {
2028 { 0x0001, "Local Twinax Controller"},
2029 { 0x0061, "Local ASCII Controller"},
2030 { 0x0101, "SDLC/X.21/X.25 Twinax Controller (5394 emulating a 5294)"},
2031 { 0x0103, "SDLC/X.21/X.25 Twinax Controller (5394)"},
2032 { 0x0200, "PC DOS non-DBCS WSF"},
2033 { 0x0300, "OS/2 non-DBCS WSF"},
2034 { 0x0400, "PC DOS DBCS WSF"},
2035 { 0x0500, "OS/2 DBCS WSF"},
2036 { 0x0600, "Other WSF or any other 5250 Emulator"},
2040 static const value_string vals_tn5250_dt
[] = {
2041 { 0x01, "5250 Display or 5250 Emulation"},
2046 static const value_string vals_tn5250_qr_ki
[] = {
2047 { 0x02, "Standard Keyboard"},
2048 { 0x82, "G Keyboard"},
2052 static const struct true_false_string tn5250_field_qr_flag1_1
= {
2053 "Row 1/Col 1 support",
2054 "No Row 1/Col 1 support"
2057 static const struct true_false_string tn5250_field_qr_flag1_2
= {
2058 "Read MDT Alternate Command support",
2059 "No Read MDT Alternate Command support"
2062 static const struct true_false_string tn5250_field_qr_flag1_3
= {
2063 "Display does have PA1/PA2 support",
2064 "Display does not have PA1/PA2 support"
2067 static const struct true_false_string tn5250_field_qr_flag1_4
= {
2068 "Display does have PA3 support",
2069 "Display does not have PA3 support"
2072 static const struct true_false_string tn5250_field_qr_flag1_5
= {
2073 "Display does have Cursor Select support",
2074 "Display does not have Cursor Select support"
2077 static const struct true_false_string tn5250_field_qr_flag1_6
= {
2078 "Display does have Move Cursor Order support",
2079 "Display does not have Move Cursor Order support"
2082 static const struct true_false_string tn5250_field_qr_flag1_7
= {
2083 "Read MDT Immediate Alt Command support",
2084 "No Read MDT Immediate Alt Command support"
2087 static const value_string vals_tn5250_qr_flag2_0to3
[] = {
2088 { 0x10, "24 x 80 Screen Size"},
2089 { 0x30, "Capable of 24 x 80 and 27 x 132"},
2093 static const struct true_false_string tn5250_field_qr_flag2_4
= {
2094 "Light pen support",
2095 "No Light pen support"
2098 static const struct true_false_string tn5250_field_qr_flag2_5
= {
2099 "Mag Stripe Reader support",
2100 "No Mag Stripe Reader support"
2103 static const value_string vals_tn5250_qr_flag2_6to7
[] = {
2104 { 0x00, "Mono display"},
2105 { 0x01, "5292/3179 style color, including color PCs"},
2109 static const value_string vals_tn5250_qr_flag3
[] = {
2110 { 0x00, "No Double Byte Character Set (DBCS) capability"},
2111 { 0x20, "Presentation screen DBCS capability only"},
2115 static const value_string vals_tn5250_qr_flag4
[] = {
2116 { 0x00, "No graphics capability"},
2117 { 0x20, "5292-2 style graphics"},
2123 /* TN5250 Header - Data Type */
2124 #define TN5250_5250_DATA 0x00
2125 #define TN5250_BIND_IMAGE 0x03
2126 #define TN5250_NVT_DATA 0x05
2127 #define TN5250_REQUEST 0x06
2128 #define TN5250_RESPONSE 0x02
2129 #define TN5250_SCS_DATA 0x01
2130 #define TN5250_SSCP_LU_DATA 0x07
2131 #define TN5250_UNBIND 0x04
2133 static const value_string vals_tn5250_header_data_types
[] = {
2134 { TN5250_5250_DATA
, "5250_DATA"},
2135 { TN5250_BIND_IMAGE
, "BIND_IMAGE"},
2136 { TN5250_NVT_DATA
, "NVT_DATA"},
2137 { TN5250_REQUEST
, "REQUEST"},
2138 { TN5250_RESPONSE
, "RESPONSE"},
2139 { TN5250_SCS_DATA
, "SCS_DATA"},
2140 { TN5250_SSCP_LU_DATA
, "SSCP_LU_DATA"},
2141 { TN5250_UNBIND
, "UNBIND"},
2146 /* TN5250 Header - Record Type */
2149 static const value_string vals_tn5250_sna_record_type
[] = {
2150 { GDS
, "General Data Stream"},
2154 /* TN5250 Header - Operation Code */
2155 #define NO_OPERATION 0x00
2156 #define INVITE_OPERATION 0x01
2157 #define OUTPUT_ONLY 0x02
2158 #define PUT_GET_OPERATION 0x03
2159 #define SAVE_SCREEN_OPERATION 0x04
2160 #define RESTORE_SCREEN_OPERATION 0x05
2161 #define READ_IMMEDIATE_OPERATION 0x06
2162 #define RESERVED1 0x07
2163 #define READ_SCREEN_OPERATION 0x08
2164 #define RESERVED2 0x09
2165 #define CANCEL_INVITE_OPERATION 0x0A
2166 #define TURN_ON_MESSAGE_LIGHT 0x0B
2167 #define TURN_OFF_MESSAGE_LIGHT 0x0C
2169 static const value_string vals_tn5250_header_operation_code
[] = {
2170 { NO_OPERATION
, "No Operation"},
2171 { INVITE_OPERATION
, "Invite Operation"},
2172 { OUTPUT_ONLY
, "Output Only"},
2173 { PUT_GET_OPERATION
, "Put or Get Operation"},
2174 { SAVE_SCREEN_OPERATION
, "Save Screen Operation"},
2175 { RESTORE_SCREEN_OPERATION
, "Restore Screen Operation"},
2176 { READ_IMMEDIATE_OPERATION
, "Read Immediate Operation"},
2177 { RESERVED1
, "Reserved"},
2178 { READ_SCREEN_OPERATION
, "Read Screen Operation"},
2179 { RESERVED2
, "Reserved"},
2180 { CANCEL_INVITE_OPERATION
, "Cancel Invite Operation"},
2181 { TURN_ON_MESSAGE_LIGHT
, "Turn On Message Light"},
2182 { TURN_OFF_MESSAGE_LIGHT
, "Turn Off Message Light"},
2187 /* TN5250 Header _ Response Flags - Data Type Response */
2188 #define TN5250_POSITIVE_RESPONSE 0x00
2189 #define TN5250_NEGATIVE_RESPONSE 0x01
2191 static const value_string vals_tn5250_header_response_flags_response
[] = {
2192 { TN5250_POSITIVE_RESPONSE
, "POSITIVE-RESPONSE"},
2193 { TN5250_NEGATIVE_RESPONSE
, "NEGATIVE-RESPONSE"},
2199 static const value_string vals_tn5250_header_error_codes
[] = {
2200 { 0x0000, "Help key not allowed."},
2201 { 0x0001, "Keyboard overrun."},
2202 { 0x0002, "Incorrect scan code."},
2203 { 0x0003, "Command or PF key not valid."},
2204 { 0x0004, "Data not allowed in this field."},
2205 { 0x0005, "Cursor in protected area of display."},
2206 { 0x0006, "Key following Sys Req Key is not valid."},
2207 { 0x0007, "Mandatory entry field; you must enter data."},
2208 { 0x0008, "This field must have alphabetic characters."},
2209 { 0x0009, "This field must have numeric characters."},
2210 { 0x0010, "Only characters 0 through 9 allowed."},
2211 { 0x0011, "You tried to enter data into the last position of a signed numeric field."},
2212 { 0x0012, "Insert mode; no room to insert data."},
2213 { 0x0013, "Insert mode; only data keys permitted."},
2214 { 0x0014, "Must fill field to exit."},
2215 { 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."},
2216 { 0x0016, "Field- not valid in this field."},
2217 { 0x0017, "Mandatory-fill field; key pressed is not valid."},
2218 { 0x0018, "Key used to exit this field not valid."},
2219 { 0x0019, "Dup or Field Mark not permitted in this field."},
2220 { 0x0020, "Function key not valid for right-adjust field."},
2221 { 0x0021, "Must enter data in mandatory entry field."},
2222 { 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."},
2223 { 0x0023, "Hexadecimal mode; entry not valid."},
2224 { 0x0024, "Decimal field; entry not valid."},
2225 { 0x0026, "Field- entry not allowed."},
2226 { 0x0027, "Cannot use undefined key."},
2227 { 0x0029, "Diacritic character not valid."},
2228 { 0x0031, "Data buffer overflow."},
2229 { 0x0032, "MSR error."},
2230 { 0x0033, "MSR data not authorized."},
2231 { 0x0034, "Magnetic stripe reader (MSR) data exceeds length of field."},
2232 { 0x0035, "MSR error."},
2233 { 0x0036, "Cursor select not allowed in field exit required state."},
2234 { 0x0037, "You pressed Cursor Select in a non-selectable field."},
2235 { 0x0038, "Light pen and magnetic stripe reader (MSR) not allowed."},
2236 { 0x0040, "The modem or data circuit-terminating equipment (DCE) is not ready for one of the following reasons:"},
2237 { 0x0041, "X.25: Idle condition has been detected. The receive line was idle for 15 or more contiguous bit-times."},
2238 { 0x0042, "The receive clock signal is not being received from the modem or data circuit-terminating equipment (DCE)."},
2239 { 0x0043, "The 5494 attempted to disconnect from the line, but the data set ready (DSR) signal was not deactivated by the modem or DCE."},
2240 { 0x0044, "Switched lines: This error indicates that no valid data has been received for 30 seconds. The 5494 disconnected the line."},
2241 { 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."},
2242 { 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."},
2243 { 0x0047, "X.25 or LAN: An unexpected Disconnect mode (DM) or a Disconnect (DISC) command was received while in information transfer state."},
2244 { 0x0048, "X.25: An unexpected unnumbered acknowledgment (UA) frame was received."},
2245 { 0x0049, "LAN: A set asynchronous balance mode extended (SABME) was received while the 5494 was in information transfer state."},
2246 { 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:"},
2247 { 0x0051, "The transmit clock from the modem or data circuit-terminating equipment (DCE) failed during a transmit operation."},
2248 { 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."},
2249 { 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."},
2250 { 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."},
2251 { 0x0055, "The 5494 ran a cable wrap test and determined that the communication cable is not attached to the 5494."},
2252 { 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."},
2253 { 0x0060, "Ideographic support SRC: You attempted to enter alphanumeric data into a field that accepts only double-byte data characters."},
2254 { 0x0061, "Ideographic support SRC: You attempted to enter a double-byte character into a field that accepts only alphanumeric data."},
2255 { 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."},
2256 { 0x0063, "You entered an ideographic character that is not valid while operating in Alternate Entry mode."},
2257 { 0x0064, "You pressed a key that is not valid for the current keyboard mode."},
2258 { 0x0065, "The cursor is positioned in a column reserved for shift-out or shift-in characters."},
2259 { 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."},
2260 { 0x0067, "The workstation extension character RAM is full. Any additional extension characters display as special default characters."},
2261 { 0x0068, "The output data stream to the 5494 is not valid for extension characters. Any additional extension characters display as special default characters."},
2262 { 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."},
2263 { 0x0070, "An error occurred during the word spill function or the carriage return function."},
2264 { 0x0071, "You attempted a start copy, move, or delete text operation while one of the previous operations was already in progress."},
2265 { 0x0072, "The key pressed is not valid when the cursor is in the current position."},
2266 { 0x0073, "An attempt was made to delete or replace an instruction or format change when the general prompt function was not active."},
2267 { 0x0074, "A key was pressed that is not valid when using the general prompt function."},
2268 { 0x0075, "The find function failed to find the keyed characters."},
2269 { 0x0076, "The insert function failed because the AS/400 system has not processed the text on the screen."},
2270 { 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."},
2271 { 0x0078, "The required scale line is not defined for your workstation. There is an error in the application program."},
2272 { 0x0081, "Too many workstations are attached to the 5494. The 5494 with LAN adapter installed allows a maximum of 80 devices."},
2273 { 0x0082, "Keyboard function is not valid within a selection field. These invalid functions include Dup, Erase EOF, and Field Mark."},
2274 { 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."},
2275 { 0x0084, "An attempt has been made to select an unavailable selection field."},
2276 { 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."},
2277 { 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."},
2278 { 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."},
2279 { 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)."},
2280 { 0x008D, "Printer port and station values are not valid. Valid ports for the Twinaxial Expansion Kit are 4-7. Valid stations are 0-7."},
2281 { 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."},
2282 { 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."},
2283 { 0x0091, "Reverse and Close keys are not supported in a Word Wrap entry field."},
2284 { 0x0092, "The reverse key is not supported on a display which is configured for shared addressing."},
2285 { 0x0097, "A test request function is not supported by the AS/400 system."},
2286 { 0x0098, "Undefined hardware error."},
2287 { 0x0099, "A key requiring AS/400 system action was pressed, but one of the following has occurred:"},
2288 { 0x009A, "An invalid password has been entered three times in an attempt to access concurrent diagnostics from a PWS."},
2289 { 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."},
2290 { 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."},
2291 { 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."},
2292 { 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:"},
2293 { 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:"},
2297 static const range_string vals_tn5250_reserved
[] = {
2298 { 0x00, 0x00, "Reserved"},
2299 { 0x01, 0xFE, "Invalid Use of Reserved Field"},
2304 static int proto_tn5250
= -1;
2305 static int hf_tn5250_aid
= -1;
2306 static int hf_tn5250_attn_key
= -1;
2307 static int hf_tn5250_attribute_type
= -1;
2308 static int hf_tn5250_buffer_x
= -1;
2309 static int hf_tn5250_buffer_y
= -1;
2310 static int hf_tn5250_command_code
= -1;
2311 static int hf_tn5250_ctp_lsid
= -1;
2312 static int hf_tn5250_ctp_mlpp
= -1;
2313 static int hf_tn5250_cua_parm
= -1;
2314 static int hf_tn5250_dawt_char
= -1;
2315 static int hf_tn5250_dawt_id
= -1;
2316 static int hf_tn5250_dawt_length
= -1;
2317 static int hf_tn5250_dawt_message
= -1;
2318 static int hf_tn5250_dckf_function_code
= -1;
2319 static int hf_tn5250_dckf_id
= -1;
2320 static int hf_tn5250_dckf_key_code
= -1;
2321 static int hf_tn5250_dckf_length
= -1;
2322 static int hf_tn5250_dckf_prompt_text
= -1;
2323 static int hf_tn5250_dfdpck_coreflag
= -1;
2324 static int hf_tn5250_dfdpck_coreflag_0
= -1;
2325 static int hf_tn5250_dfdpck_coreflag_1
= -1;
2326 static int hf_tn5250_dfdpck_coreflag_2
= -1;
2327 static int hf_tn5250_dfdpck_coreflag_3
= -1;
2328 static int hf_tn5250_dfdpck_coreflag_4
= -1;
2329 static int hf_tn5250_dfdpck_coreflag_5
= -1;
2330 static int hf_tn5250_dfdpck_coreflag_6
= -1;
2331 static int hf_tn5250_dfdpck_coreflag_7
= -1;
2332 static int hf_tn5250_dfdpck_data_field
= -1;
2333 static int hf_tn5250_dfdpck_partition
= -1;
2334 static int hf_tn5250_dfdpck_toprowflag1
= -1;
2335 static int hf_tn5250_dfdpck_toprowflag1_0
= -1;
2336 static int hf_tn5250_dfdpck_toprowflag1_1
= -1;
2337 static int hf_tn5250_dfdpck_toprowflag1_2
= -1;
2338 static int hf_tn5250_dfdpck_toprowflag1_3
= -1;
2339 static int hf_tn5250_dfdpck_toprowflag1_4
= -1;
2340 static int hf_tn5250_dfdpck_toprowflag1_5
= -1;
2341 static int hf_tn5250_dfdpck_toprowflag1_6
= -1;
2342 static int hf_tn5250_dfdpck_toprowflag1_7
= -1;
2343 static int hf_tn5250_dfdpck_toprowflag2
= -1;
2344 static int hf_tn5250_dfdpck_toprowflag2_0
= -1;
2345 static int hf_tn5250_dfdpck_toprowflag2_1
= -1;
2346 static int hf_tn5250_dfdpck_toprowflag2_2
= -1;
2347 static int hf_tn5250_dfdpck_toprowflag2_3
= -1;
2348 static int hf_tn5250_dfdpck_toprowflag2_4
= -1;
2349 static int hf_tn5250_dfdpck_toprowflag2_5
= -1;
2350 static int hf_tn5250_dfdpck_toprowflag2_6
= -1;
2351 static int hf_tn5250_dfdpck_toprowflag2_7
= -1;
2352 static int hf_tn5250_dfdpck_toprowflag3
= -1;
2353 static int hf_tn5250_dfdpck_toprowflag3_0
= -1;
2354 static int hf_tn5250_dfdpck_toprowflag3_1
= -1;
2355 static int hf_tn5250_dfdpck_toprowflag3_2
= -1;
2356 static int hf_tn5250_dfdpck_toprowflag3_3
= -1;
2357 static int hf_tn5250_dfdpck_toprowflag3_4
= -1;
2358 static int hf_tn5250_dfdpck_toprowflag3_5
= -1;
2359 static int hf_tn5250_dfdpck_toprowflag3_6
= -1;
2360 static int hf_tn5250_dfdpck_toprowflag3_7
= -1;
2361 static int hf_tn5250_dorm_ec
= -1;
2362 static int hf_tn5250_dorm_id
= -1;
2363 static int hf_tn5250_dorm_length
= -1;
2364 static int hf_tn5250_dorm_mt
= -1;
2365 static int hf_tn5250_dpo_displace_characters
= -1;
2366 static int hf_tn5250_dpo_flag1
= -1;
2367 static int hf_tn5250_dpo_flag1_0
= -1;
2368 static int hf_tn5250_dpo_flag1_1
= -1;
2369 static int hf_tn5250_dpo_flag1_2
= -1;
2370 static int hf_tn5250_dpo_flag1_3
= -1;
2371 static int hf_tn5250_dpo_flag1_4
= -1;
2372 static int hf_tn5250_dpo_flag1_5
= -1;
2373 static int hf_tn5250_dpo_flag1_6
= -1;
2374 static int hf_tn5250_dpo_flag1_7
= -1;
2375 static int hf_tn5250_dpo_flag2
= -1;
2376 static int hf_tn5250_dpo_flag2_0
= -1;
2377 static int hf_tn5250_dpo_flag2_reserved
= -1;
2378 static int hf_tn5250_dpo_partition
= -1;
2379 static int hf_tn5250_dpo_start_location_col
= -1;
2380 static int hf_tn5250_dpo_start_location_row
= -1;
2381 static int hf_tn5250_dpt_ec
= -1;
2382 static int hf_tn5250_dpt_id
= -1;
2383 static int hf_tn5250_ds_output_error
= -1;
2384 static int hf_tn5250_dsc_ev
= -1;
2385 static int hf_tn5250_dsc_partition
= -1;
2386 static int hf_tn5250_dsc_sk
= -1;
2387 static int hf_tn5250_dsl_flag1
= -1;
2388 static int hf_tn5250_dsl_flag1_0
= -1;
2389 static int hf_tn5250_dsl_flag1_1
= -1;
2390 static int hf_tn5250_dsl_flag1_2
= -1;
2391 static int hf_tn5250_dsl_flag1_reserved
= -1;
2392 static int hf_tn5250_dsl_function
= -1;
2393 static int hf_tn5250_dsl_id
= -1;
2394 static int hf_tn5250_dsl_location
= -1;
2395 static int hf_tn5250_dsl_offset
= -1;
2396 static int hf_tn5250_dsl_partition
= -1;
2397 static int hf_tn5250_dsl_rtl_offset
= -1;
2398 static int hf_tn5250_dtsf_first_line
= -1;
2399 static int hf_tn5250_dtsf_flag1
= -1;
2400 static int hf_tn5250_dtsf_flag1_0
= -1;
2401 static int hf_tn5250_dtsf_flag1_1
= -1;
2402 static int hf_tn5250_dtsf_flag1_2
= -1;
2403 static int hf_tn5250_dtsf_flag1_3
= -1;
2404 static int hf_tn5250_dtsf_flag1_4
= -1;
2405 static int hf_tn5250_dtsf_flag1_5
= -1;
2406 static int hf_tn5250_dtsf_flag1_6
= -1;
2407 static int hf_tn5250_dtsf_flag1_7
= -1;
2408 static int hf_tn5250_dtsf_flag2
= -1;
2409 static int hf_tn5250_dtsf_flag2_0
= -1;
2410 static int hf_tn5250_dtsf_flag2_1
= -1;
2411 static int hf_tn5250_dtsf_flag2_2
= -1;
2412 static int hf_tn5250_dtsf_flag2_3
= -1;
2413 static int hf_tn5250_dtsf_flag2_4to7
= -1;
2414 static int hf_tn5250_dtsf_line_cmd_field_size
= -1;
2415 static int hf_tn5250_dtsf_location_of_pitch
= -1;
2416 static int hf_tn5250_dtsf_partition
= -1;
2417 static int hf_tn5250_dtsf_text_body_height
= -1;
2418 static int hf_tn5250_dtsf_text_body_width
= -1;
2419 static int hf_tn5250_soh_err
= -1;
2420 static int hf_tn5250_error_code
= -1;
2421 static int hf_tn5250_error_state
= -1;
2422 static int hf_tn5250_escape_code
= -1;
2423 static int hf_tn5250_fa_color
= -1;
2424 static int hf_tn5250_fcw
= -1;
2425 static int hf_tn5250_ffw
= -1;
2426 static int hf_tn5250_ffw_adjust
= -1;
2427 static int hf_tn5250_ffw_auto
= -1;
2428 static int hf_tn5250_ffw_bypass
= -1;
2429 static int hf_tn5250_ffw_dup
= -1;
2430 static int hf_tn5250_ffw_fer
= -1;
2431 static int hf_tn5250_ffw_id
= -1;
2432 static int hf_tn5250_ffw_mdt
= -1;
2433 static int hf_tn5250_ffw_me
= -1;
2434 static int hf_tn5250_ffw_monocase
= -1;
2435 static int hf_tn5250_ffw_res
= -1;
2436 static int hf_tn5250_ffw_shift
= -1;
2437 static int hf_tn5250_field_data
= -1;
2438 static int hf_tn5250_foreground_color_attr
= -1;
2439 static int hf_tn5250_header_flags
= -1;
2440 static int hf_tn5250_ideographic_attr
= -1;
2441 static int hf_tn5250_length
= -1;
2442 static int hf_tn5250_length_twobyte
= -1;
2443 static int hf_tn5250_logical_record_length
= -1;
2444 static int hf_tn5250_operation_code
= -1;
2445 static int hf_tn5250_order_code
= -1;
2446 static int hf_tn5250_repeated_character
= -1;
2447 static int hf_tn5250_reserved
= -1;
2448 static int hf_tn5250_roll_bottom_line
= -1;
2449 static int hf_tn5250_roll_flag1
= -1;
2450 static int hf_tn5250_roll_flag1_0
= -1;
2451 static int hf_tn5250_roll_flag1_lines
= -1;
2452 static int hf_tn5250_roll_flag1_reserved
= -1;
2453 static int hf_tn5250_roll_top_line
= -1;
2454 static int hf_tn5250_rts_flag1
= -1;
2455 static int hf_tn5250_rts_flag1_0
= -1;
2456 static int hf_tn5250_rts_flag1_reserved
= -1;
2457 static int hf_tn5250_rts_partition
= -1;
2458 static int hf_tn5250_sf_attr_flag
= -1;
2459 static int hf_tn5250_sf_class
= -1;
2460 static int hf_tn5250_fa
= -1;
2461 static int hf_tn5250_sf_length
= -1;
2462 static int hf_tn5250_sf_type
= -1;
2463 static int hf_tn5250_sna_record_type
= -1;
2464 static int hf_tn5250_soh_cursor_direction
= -1;
2465 static int hf_tn5250_soh_flags
= -1;
2466 static int hf_tn5250_soh_input_capable_only
= -1;
2467 static int hf_tn5250_soh_pf1
= -1;
2468 static int hf_tn5250_soh_pf10
= -1;
2469 static int hf_tn5250_soh_pf11
= -1;
2470 static int hf_tn5250_soh_pf12
= -1;
2471 static int hf_tn5250_soh_pf13
= -1;
2472 static int hf_tn5250_soh_pf14
= -1;
2473 static int hf_tn5250_soh_pf15
= -1;
2474 static int hf_tn5250_soh_pf16
= -1;
2475 static int hf_tn5250_soh_pf16to9
= -1;
2476 static int hf_tn5250_soh_pf17
= -1;
2477 static int hf_tn5250_soh_pf18
= -1;
2478 static int hf_tn5250_soh_pf19
= -1;
2479 static int hf_tn5250_soh_pf2
= -1;
2480 static int hf_tn5250_soh_pf20
= -1;
2481 static int hf_tn5250_soh_pf21
= -1;
2482 static int hf_tn5250_soh_pf22
= -1;
2483 static int hf_tn5250_soh_pf23
= -1;
2484 static int hf_tn5250_soh_pf24
= -1;
2485 static int hf_tn5250_soh_pf24to17
= -1;
2486 static int hf_tn5250_soh_pf3
= -1;
2487 static int hf_tn5250_soh_pf4
= -1;
2488 static int hf_tn5250_soh_pf5
= -1;
2489 static int hf_tn5250_soh_pf6
= -1;
2490 static int hf_tn5250_soh_pf7
= -1;
2491 static int hf_tn5250_soh_pf8
= -1;
2492 static int hf_tn5250_soh_pf8to1
= -1;
2493 static int hf_tn5250_soh_pf9
= -1;
2494 static int hf_tn5250_soh_resq
= -1;
2495 static int hf_tn5250_soh_screen_reverse
= -1;
2496 static int hf_tn5250_sps_flag1
= -1;
2497 static int hf_tn5250_sps_flag1_0
= -1;
2498 static int hf_tn5250_sps_flag1_reserved
= -1;
2499 static int hf_tn5250_sps_left_column
= -1;
2500 static int hf_tn5250_sps_top_row
= -1;
2501 static int hf_tn5250_sps_window_depth
= -1;
2502 static int hf_tn5250_sps_window_width
= -1;
2503 static int hf_tn5250_sys_request_key
= -1;
2504 static int hf_tn5250_test_request_key
= -1;
2505 static int hf_tn5250_unknown_data
= -1;
2506 static int hf_tn5250_variable_record_length
= -1;
2507 static int hf_tn5250_wdsf_cw_bp_flag1_reserved
= -1;
2508 static int hf_tn5250_wdsf_cw_tf_flag_reserved
= -1;
2509 static int hf_tn5250_wdsf_deg_flag2_reserved
= -1;
2510 static int hf_tn5250_wdsf_deg_ms_flag1_reserved
= -1;
2511 static int hf_tn5250_wdsf_ds_ci_flag1_reserved
= -1;
2512 static int hf_tn5250_wdsf_ds_cpda_flag1_reserved
= -1;
2513 static int hf_tn5250_wdsf_ds_ct_flag3_reserved
= -1;
2514 static int hf_tn5250_wdsf_ds_gdc_reserved
= -1;
2515 static int hf_tn5250_wdsf_ds_nws_reserved
= -1;
2516 static int hf_tn5250_wdsf_ds_sbi_flag1_reserved
= -1;
2517 static int hf_tn5250_wdsf_dsb_flag1_reserved
= -1;
2518 static int hf_tn5250_wdsf_pmb_flag1_reserved
= -1;
2519 static int hf_tn5250_wdsf_wdf_flag1_reserved
= -1;
2520 static int hf_tn5250_wdsf_cgl_partition
= -1;
2521 static int hf_tn5250_wdsf_cgl_rectangle_height
= -1;
2522 static int hf_tn5250_wdsf_cgl_rectangle_width
= -1;
2523 static int hf_tn5250_wdsf_cgl_start_column
= -1;
2524 static int hf_tn5250_wdsf_cgl_start_row
= -1;
2525 static int hf_tn5250_wdsf_cw_bp_bbc
= -1;
2526 static int hf_tn5250_wdsf_cw_bp_cba
= -1;
2527 static int hf_tn5250_wdsf_cw_bp_flag1
= -1;
2528 static int hf_tn5250_wdsf_cw_bp_flag1_1
= -1;
2529 static int hf_tn5250_wdsf_cw_bp_lbc
= -1;
2530 static int hf_tn5250_wdsf_cw_bp_llbc
= -1;
2531 static int hf_tn5250_wdsf_cw_bp_lrbc
= -1;
2532 static int hf_tn5250_wdsf_cw_bp_mba
= -1;
2533 static int hf_tn5250_wdsf_cw_bp_rbc
= -1;
2534 static int hf_tn5250_wdsf_cw_bp_tbc
= -1;
2535 static int hf_tn5250_wdsf_cw_bp_ulbc
= -1;
2536 static int hf_tn5250_wdsf_cw_bp_urbc
= -1;
2537 static int hf_tn5250_wdsf_cw_flag1
= -1;
2538 static int hf_tn5250_wdsf_cw_flag1_1
= -1;
2539 static int hf_tn5250_wdsf_cw_flag1_2
= -1;
2540 static int hf_tn5250_wdsf_cw_flag1_reserved
= -1;
2541 static int hf_tn5250_wdsf_cw_minor_type
= -1;
2542 static int hf_tn5250_wdsf_cw_tf_cba
= -1;
2543 static int hf_tn5250_wdsf_cw_tf_flag
= -1;
2544 static int hf_tn5250_wdsf_cw_tf_flag_1
= -1;
2545 static int hf_tn5250_wdsf_cw_tf_flag_orientation
= -1;
2546 static int hf_tn5250_wdsf_cw_tf_mba
= -1;
2547 static int hf_tn5250_wdsf_cw_tf_text
= -1;
2548 static int hf_tn5250_wdsf_cw_wd
= -1;
2549 static int hf_tn5250_wdsf_cw_ww
= -1;
2550 static int hf_tn5250_wdsf_deg_default_color
= -1;
2551 static int hf_tn5250_wdsf_deg_default_line
= -1;
2552 static int hf_tn5250_wdsf_deg_flag1
= -1;
2553 static int hf_tn5250_wdsf_deg_flag1_0
= -1;
2554 static int hf_tn5250_wdsf_deg_flag1_reserved
= -1;
2555 static int hf_tn5250_wdsf_deg_flag2
= -1;
2556 static int hf_tn5250_wdsf_deg_flag2_0
= -1;
2557 static int hf_tn5250_wdsf_deg_minor_type
= -1;
2558 static int hf_tn5250_wdsf_deg_ms_default_color
= -1;
2559 static int hf_tn5250_wdsf_deg_ms_flag1
= -1;
2560 static int hf_tn5250_wdsf_deg_ms_flag1_0
= -1;
2561 static int hf_tn5250_wdsf_deg_ms_horizontal_dimension
= -1;
2562 static int hf_tn5250_wdsf_deg_ms_line_interval
= -1;
2563 static int hf_tn5250_wdsf_deg_ms_line_repeat
= -1;
2564 static int hf_tn5250_wdsf_deg_ms_start_column
= -1;
2565 static int hf_tn5250_wdsf_deg_ms_start_row
= -1;
2566 static int hf_tn5250_wdsf_deg_ms_vertical_dimension
= -1;
2567 static int hf_tn5250_wdsf_deg_partition
= -1;
2568 static int hf_tn5250_wdsf_ds_cancel_aid
= -1;
2569 static int hf_tn5250_wdsf_ds_ci_first_choice
= -1;
2570 static int hf_tn5250_wdsf_ds_ci_flag1
= -1;
2571 static int hf_tn5250_wdsf_ds_ci_flag1_0
= -1;
2572 static int hf_tn5250_wdsf_ds_ci_left_push
= -1;
2573 static int hf_tn5250_wdsf_ds_ci_right_push
= -1;
2574 static int hf_tn5250_wdsf_ds_columns
= -1;
2575 static int hf_tn5250_wdsf_ds_country_sel
= -1;
2576 static int hf_tn5250_wdsf_ds_cpda_color_avail
= -1;
2577 static int hf_tn5250_wdsf_ds_cpda_color_indicator
= -1;
2578 static int hf_tn5250_wdsf_ds_cpda_color_sel_avail
= -1;
2579 static int hf_tn5250_wdsf_ds_cpda_color_sel_selected
= -1;
2580 static int hf_tn5250_wdsf_ds_cpda_color_sel_unavail
= -1;
2581 static int hf_tn5250_wdsf_ds_cpda_color_selected
= -1;
2582 static int hf_tn5250_wdsf_ds_cpda_color_unavail
= -1;
2583 static int hf_tn5250_wdsf_ds_cpda_color_unavail_indicator
= -1;
2584 static int hf_tn5250_wdsf_ds_cpda_flag1
= -1;
2585 static int hf_tn5250_wdsf_ds_cpda_flag1_0
= -1;
2586 static int hf_tn5250_wdsf_ds_cpda_flag1_1
= -1;
2587 static int hf_tn5250_wdsf_ds_cpda_flag1_2
= -1;
2588 static int hf_tn5250_wdsf_ds_cpda_monochrome_avail
= -1;
2589 static int hf_tn5250_wdsf_ds_cpda_monochrome_indicator
= -1;
2590 static int hf_tn5250_wdsf_ds_cpda_monochrome_sel_avail
= -1;
2591 static int hf_tn5250_wdsf_ds_cpda_monochrome_sel_selected
= -1;
2592 static int hf_tn5250_wdsf_ds_cpda_monochrome_sel_unavail
= -1;
2593 static int hf_tn5250_wdsf_ds_cpda_monochrome_selected
= -1;
2594 static int hf_tn5250_wdsf_ds_cpda_monochrome_unavail
= -1;
2595 static int hf_tn5250_wdsf_ds_cpda_monochrome_unavail_indicator
= -1;
2596 static int hf_tn5250_wdsf_ds_ct_aid
= -1;
2597 static int hf_tn5250_wdsf_ds_ct_flag1
= -1;
2598 static int hf_tn5250_wdsf_ds_ct_flag1_2
= -1;
2599 static int hf_tn5250_wdsf_ds_ct_flag1_3
= -1;
2600 static int hf_tn5250_wdsf_ds_ct_flag1_4
= -1;
2601 static int hf_tn5250_wdsf_ds_ct_flag1_5
= -1;
2602 static int hf_tn5250_wdsf_ds_ct_flag1_choice_state
= -1;
2603 static int hf_tn5250_wdsf_ds_ct_flag1_numeric_selection
= -1;
2604 static int hf_tn5250_wdsf_ds_ct_flag2
= -1;
2605 static int hf_tn5250_wdsf_ds_ct_flag2_0
= -1;
2606 static int hf_tn5250_wdsf_ds_ct_flag2_1
= -1;
2607 static int hf_tn5250_wdsf_ds_ct_flag2_2
= -1;
2608 static int hf_tn5250_wdsf_ds_ct_flag2_3
= -1;
2609 static int hf_tn5250_wdsf_ds_ct_flag2_4
= -1;
2610 static int hf_tn5250_wdsf_ds_ct_flag2_5
= -1;
2611 static int hf_tn5250_wdsf_ds_ct_flag2_6
= -1;
2612 static int hf_tn5250_wdsf_ds_ct_flag2_7
= -1;
2613 static int hf_tn5250_wdsf_ds_ct_flag3
= -1;
2614 static int hf_tn5250_wdsf_ds_ct_flag3_0
= -1;
2615 static int hf_tn5250_wdsf_ds_ct_flag3_1
= -1;
2616 static int hf_tn5250_wdsf_ds_ct_flag3_2
= -1;
2617 static int hf_tn5250_wdsf_ds_ct_mnemonic_offset
= -1;
2618 static int hf_tn5250_wdsf_ds_ct_numeric_onebyte
= -1;
2619 static int hf_tn5250_wdsf_ds_ct_numeric_twobyte
= -1;
2620 static int hf_tn5250_wdsf_ds_ct_text
= -1;
2621 static int hf_tn5250_wdsf_ds_flag1
= -1;
2622 static int hf_tn5250_wdsf_ds_flag1_1
= -1;
2623 static int hf_tn5250_wdsf_ds_flag1_2
= -1;
2624 static int hf_tn5250_wdsf_ds_flag1_auto_enter
= -1;
2625 static int hf_tn5250_wdsf_ds_flag1_mouse_characteristics
= -1;
2626 static int hf_tn5250_wdsf_ds_flag1_reserved
= -1;
2627 static int hf_tn5250_wdsf_ds_flag2
= -1;
2628 static int hf_tn5250_wdsf_ds_flag2_1
= -1;
2629 static int hf_tn5250_wdsf_ds_flag2_2
= -1;
2630 static int hf_tn5250_wdsf_ds_flag2_3
= -1;
2631 static int hf_tn5250_wdsf_ds_flag2_4
= -1;
2632 static int hf_tn5250_wdsf_ds_flag2_5
= -1;
2633 static int hf_tn5250_wdsf_ds_flag2_6
= -1;
2634 static int hf_tn5250_wdsf_ds_flag2_reserved
= -1;
2635 static int hf_tn5250_wdsf_ds_flag3
= -1;
2636 static int hf_tn5250_wdsf_ds_flag3_1
= -1;
2637 static int hf_tn5250_wdsf_ds_flag3_reserved
= -1;
2638 static int hf_tn5250_wdsf_ds_gdc
= -1;
2639 static int hf_tn5250_wdsf_ds_gdc_indicators
= -1;
2640 static int hf_tn5250_wdsf_ds_gdc_selection_techniques
= -1;
2641 static int hf_tn5250_wdsf_ds_mbs_color_sep
= -1;
2642 static int hf_tn5250_wdsf_ds_mbs_end_column
= -1;
2643 static int hf_tn5250_wdsf_ds_mbs_flag
= -1;
2644 static int hf_tn5250_wdsf_ds_mbs_flag_0
= -1;
2645 static int hf_tn5250_wdsf_ds_mbs_flag_1
= -1;
2646 static int hf_tn5250_wdsf_ds_mbs_flag_reserved
= -1;
2647 static int hf_tn5250_wdsf_ds_mbs_monochrome_sep
= -1;
2648 static int hf_tn5250_wdsf_ds_mbs_sep_char
= -1;
2649 static int hf_tn5250_wdsf_ds_mbs_start_column
= -1;
2650 static int hf_tn5250_wdsf_ds_minor_type
= -1;
2651 static int hf_tn5250_wdsf_ds_numeric_sep
= -1;
2652 static int hf_tn5250_wdsf_ds_nws
= -1;
2653 static int hf_tn5250_wdsf_ds_nws_indicators
= -1;
2654 static int hf_tn5250_wdsf_ds_nws_selection_techniques
= -1;
2655 static int hf_tn5250_wdsf_ds_nws_wout
= -1;
2656 static int hf_tn5250_wdsf_ds_padding
= -1;
2657 static int hf_tn5250_wdsf_ds_rows
= -1;
2658 static int hf_tn5250_wdsf_ds_sbi_bottom_character
= -1;
2659 static int hf_tn5250_wdsf_ds_sbi_color_top_highlight
= -1;
2660 static int hf_tn5250_wdsf_ds_sbi_color_top_highlight_shaft
= -1;
2661 static int hf_tn5250_wdsf_ds_sbi_empty_character
= -1;
2662 static int hf_tn5250_wdsf_ds_sbi_flag1
= -1;
2663 static int hf_tn5250_wdsf_ds_sbi_flag1_0
= -1;
2664 static int hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight
= -1;
2665 static int hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight_shaft
= -1;
2666 static int hf_tn5250_wdsf_ds_sbi_slider_character
= -1;
2667 static int hf_tn5250_wdsf_ds_sbi_top_character
= -1;
2668 static int hf_tn5250_wdsf_ds_sliderpos
= -1;
2669 static int hf_tn5250_wdsf_ds_textsize
= -1;
2670 static int hf_tn5250_wdsf_ds_totalrows
= -1;
2671 static int hf_tn5250_wdsf_ds_type
= -1;
2672 static int hf_tn5250_wdsf_dsb_flag1
= -1;
2673 static int hf_tn5250_wdsf_dsb_flag1_0
= -1;
2674 static int hf_tn5250_wdsf_dsb_flag1_1
= -1;
2675 static int hf_tn5250_wdsf_dsb_flag1_7
= -1;
2676 static int hf_tn5250_wdsf_pmb_first_mouse_event
= -1;
2677 static int hf_tn5250_wdsf_pmb_flag1
= -1;
2678 static int hf_tn5250_wdsf_pmb_flag1_0
= -1;
2679 static int hf_tn5250_wdsf_pmb_flag1_1
= -1;
2680 static int hf_tn5250_wdsf_pmb_flag1_2
= -1;
2681 static int hf_tn5250_wdsf_pmb_flag1_3
= -1;
2682 static int hf_tn5250_wdsf_pmb_second_mouse_event
= -1;
2683 static int hf_tn5250_wdsf_ragc_flag1
= -1;
2684 static int hf_tn5250_wdsf_ragc_flag1_0
= -1;
2685 static int hf_tn5250_wdsf_ragc_reserved
= -1;
2686 static int hf_tn5250_wdsf_rgw_flag1
= -1;
2687 static int hf_tn5250_wdsf_rgw_flag1_0
= -1;
2688 static int hf_tn5250_wdsf_rgw_flag1_1
= -1;
2689 static int hf_tn5250_wdsf_rgw_reserved
= -1;
2690 static int hf_tn5250_wdsf_sbi_rowscols
= -1;
2691 static int hf_tn5250_wdsf_sbi_sliderpos
= -1;
2692 static int hf_tn5250_wdsf_sbi_total_scroll
= -1;
2693 static int hf_tn5250_wdsf_wdf_flag1
= -1;
2694 static int hf_tn5250_wdsf_wdf_flag1_0
= -1;
2695 static int hf_tn5250_wea_prim_attr
= -1;
2696 static int hf_tn5250_wea_prim_attr_blink
= -1;
2697 static int hf_tn5250_wea_prim_attr_col
= -1;
2698 static int hf_tn5250_wea_prim_attr_flag
= -1;
2699 static int hf_tn5250_wea_prim_attr_int
= -1;
2700 static int hf_tn5250_wea_prim_attr_rev
= -1;
2701 static int hf_tn5250_wea_prim_attr_und
= -1;
2702 static int hf_tn5250_wectw_end_column
= -1;
2703 static int hf_tn5250_wectw_start_column
= -1;
2704 static int hf_tn5250_wsf_qss_flag1
= -1;
2705 static int hf_tn5250_wsf_qss_flag1_0
= -1;
2706 static int hf_tn5250_wsf_qss_flag1_reserved
= -1;
2707 static int hf_tn5250_wsf_qss_flag2
= -1;
2708 static int hf_tn5250_wsf_qss_flag2_7
= -1;
2709 static int hf_tn5250_wsf_qss_flag2_reserved
= -1;
2710 static int hf_tn5250_wssf_cc_flag1
= -1;
2711 static int hf_tn5250_wssf_cc_flag1_7
= -1;
2712 static int hf_tn5250_wssf_cc_flag1_reserved
= -1;
2713 static int hf_tn5250_wssf_flag1
= -1;
2714 static int hf_tn5250_wssf_flag2
= -1;
2715 static int hf_tn5250_wssf_flag2_0
= -1;
2716 static int hf_tn5250_wssf_flag2_1
= -1;
2717 static int hf_tn5250_wssf_flag2_2
= -1;
2718 static int hf_tn5250_wssf_flag2_3
= -1;
2719 static int hf_tn5250_wssf_flag2_4
= -1;
2720 static int hf_tn5250_wssf_flag2_5
= -1;
2721 static int hf_tn5250_wssf_flag2_6
= -1;
2722 static int hf_tn5250_wssf_flag2_7
= -1;
2723 static int hf_tn5250_wssf_ifc_background_color
= -1;
2724 static int hf_tn5250_wssf_ifc_flag1
= -1;
2725 static int hf_tn5250_wssf_ifc_flag1_0
= -1;
2726 static int hf_tn5250_wssf_ifc_flag1_1to3
= -1;
2727 static int hf_tn5250_wssf_ifc_flag1_4
= -1;
2728 static int hf_tn5250_wssf_ifc_flag1_5
= -1;
2729 static int hf_tn5250_wssf_ifc_flag1_6
= -1;
2730 static int hf_tn5250_wssf_ifc_flag1_7
= -1;
2731 static int hf_tn5250_wssf_ifc_flag2
= -1;
2732 static int hf_tn5250_wssf_ifc_flag2_0
= -1;
2733 static int hf_tn5250_wssf_ifc_flag2_1
= -1;
2734 static int hf_tn5250_wssf_ifc_flag2_7
= -1;
2735 static int hf_tn5250_wssf_ifc_flag2_reserved
= -1;
2736 static int hf_tn5250_wssf_ifc_foreground_color
= -1;
2737 static int hf_tn5250_wssf_ifc_image_format
= -1;
2738 static int hf_tn5250_wssf_ifc_imagefax_name
= -1;
2739 static int hf_tn5250_wssf_ifc_rotation
= -1;
2740 static int hf_tn5250_wssf_ifc_scaling
= -1;
2741 static int hf_tn5250_wssf_ifc_viewimage_location_col
= -1;
2742 static int hf_tn5250_wssf_ifc_viewimage_location_row
= -1;
2743 static int hf_tn5250_wssf_ifc_viewport_location_col
= -1;
2744 static int hf_tn5250_wssf_ifc_viewport_location_row
= -1;
2745 static int hf_tn5250_wssf_ifc_viewport_size_col
= -1;
2746 static int hf_tn5250_wssf_ifc_viewport_size_row
= -1;
2747 static int hf_tn5250_wssf_ifd_flag1
= -1;
2748 static int hf_tn5250_wssf_ifd_flag1_0
= -1;
2749 static int hf_tn5250_wssf_ifd_flag1_reserved
= -1;
2750 static int hf_tn5250_wssf_ifd_imagefax_data
= -1;
2751 static int hf_tn5250_wssf_ifd_imagefax_name
= -1;
2752 static int hf_tn5250_wssf_kbc_flag1
= -1;
2753 static int hf_tn5250_wssf_kbc_flag1_5
= -1;
2754 static int hf_tn5250_wssf_kbc_flag1_6
= -1;
2755 static int hf_tn5250_wssf_kbc_flag1_7
= -1;
2756 static int hf_tn5250_wssf_kbc_flag1_reserved
= -1;
2757 static int hf_tn5250_wssf_wsc_minor_type
= -1;
2758 static int hf_tn5250_wtd_ccc1
= -1;
2759 static int hf_tn5250_wtd_ccc2
= -1;
2760 static int hf_tn5250_wtd_ccc2_alarm
= -1;
2761 static int hf_tn5250_wtd_ccc2_cursor
= -1;
2762 static int hf_tn5250_wtd_ccc2_off
= -1;
2763 static int hf_tn5250_wtd_ccc2_on
= -1;
2764 static int hf_tn5250_wtd_ccc2_res
= -1;
2765 static int hf_tn5250_wtd_ccc2_reset
= -1;
2766 static int hf_tn5250_wtd_ccc2_set
= -1;
2767 static int hf_tn5250_wtd_ccc2_unlock
= -1;
2768 static int hf_tn5250_wts_cld_flag1
= -1;
2769 static int hf_tn5250_wts_cld_flag1_0
= -1;
2770 static int hf_tn5250_wts_cld_flag1_1
= -1;
2771 static int hf_tn5250_wts_cld_flag1_2
= -1;
2772 static int hf_tn5250_wts_cld_flag1_3
= -1;
2773 static int hf_tn5250_wts_cld_flag1_4
= -1;
2774 static int hf_tn5250_wts_cld_flag1_5
= -1;
2775 static int hf_tn5250_wts_cld_flag1_6
= -1;
2776 static int hf_tn5250_wts_cld_flag1_7
= -1;
2777 static int hf_tn5250_wts_cld_flag2
= -1;
2778 static int hf_tn5250_wts_cld_flag2_0
= -1;
2779 static int hf_tn5250_wts_cld_flag2_1
= -1;
2780 static int hf_tn5250_wts_cld_flag2_2
= -1;
2781 static int hf_tn5250_wts_cld_flag2_3
= -1;
2782 static int hf_tn5250_wts_cld_flag2_4
= -1;
2783 static int hf_tn5250_wts_cld_flag2_line_spacing
= -1;
2784 static int hf_tn5250_wts_cld_flag3
= -1;
2785 static int hf_tn5250_wts_cld_flag3_0
= -1;
2786 static int hf_tn5250_wts_cld_flag3_1
= -1;
2787 static int hf_tn5250_wts_cld_flag3_2
= -1;
2788 static int hf_tn5250_wts_cld_flag3_3
= -1;
2789 static int hf_tn5250_wts_cld_flag3_4
= -1;
2790 static int hf_tn5250_wts_cld_flag3_5
= -1;
2791 static int hf_tn5250_wts_cld_flag3_6
= -1;
2792 static int hf_tn5250_wts_cld_flag3_7
= -1;
2793 static int hf_tn5250_wts_cld_io
= -1;
2794 static int hf_tn5250_wts_cld_li
= -1;
2795 static int hf_tn5250_wts_cld_lmo
= -1;
2796 static int hf_tn5250_wts_cld_page_num
= -1;
2797 static int hf_tn5250_wts_cld_row
= -1;
2798 static int hf_tn5250_wts_cld_sli
= -1;
2799 static int hf_tn5250_wts_flag1
= -1;
2800 static int hf_tn5250_wts_flag1_0
= -1;
2801 static int hf_tn5250_wts_flag1_1
= -1;
2802 static int hf_tn5250_wts_flag1_2
= -1;
2803 static int hf_tn5250_wts_flag1_3
= -1;
2804 static int hf_tn5250_wts_flag1_reserved
= -1;
2805 static int hf_tn5250_wts_flag2
= -1;
2806 static int hf_tn5250_wts_flag2_6
= -1;
2807 static int hf_tn5250_wts_flag2_reserved
= -1;
2808 static int hf_tn5250_wts_flag2_reserved2
= -1;
2809 static int hf_tn5250_wts_flag3
= -1;
2810 static int hf_tn5250_wts_flag3_0
= -1;
2811 static int hf_tn5250_wts_flag3_1
= -1;
2812 static int hf_tn5250_wts_flag3_2
= -1;
2813 static int hf_tn5250_wts_flag3_3
= -1;
2814 static int hf_tn5250_wts_flag3_4
= -1;
2815 static int hf_tn5250_wts_flag3_5
= -1;
2816 static int hf_tn5250_wts_flag3_6
= -1;
2817 static int hf_tn5250_wts_flag3_7
= -1;
2818 static int hf_tn5250_wts_home_position_col
= -1;
2819 static int hf_tn5250_wts_home_position_row
= -1;
2820 static int hf_tn5250_wts_partition
= -1;
2821 static int hf_tn5250_soh_length
= -1;
2822 static int hf_tn5250_negative_response
= -1;
2823 static int hf_tn5250_qr_ccl
= -1;
2824 static int hf_tn5250_qr_chc
= -1;
2825 static int hf_tn5250_qr_dm
= -1;
2826 static int hf_tn5250_qr_dsn
= -1;
2827 static int hf_tn5250_qr_dt
= -1;
2828 static int hf_tn5250_qr_dtc
= -1;
2829 static int hf_tn5250_qr_eki
= -1;
2830 static int hf_tn5250_qr_flag
= -1;
2831 static int hf_tn5250_qr_flag1
= -1;
2832 static int hf_tn5250_qr_flag2
= -1;
2833 static int hf_tn5250_qr_flag3
= -1;
2834 static int hf_tn5250_qr_flag4
= -1;
2835 static int hf_tn5250_qr_ki
= -1;
2836 static int hf_tn5250_qr_flag1_0
= -1;
2837 static int hf_tn5250_qr_flag1_1
= -1;
2838 static int hf_tn5250_qr_flag1_2
= -1;
2839 static int hf_tn5250_qr_flag1_3
= -1;
2840 static int hf_tn5250_qr_flag1_4
= -1;
2841 static int hf_tn5250_qr_flag1_5
= -1;
2842 static int hf_tn5250_qr_flag1_6
= -1;
2843 static int hf_tn5250_qr_flag1_7
= -1;
2844 static int hf_tn5250_qr_flag2_0to3
= -1;
2845 static int hf_tn5250_qr_flag2_4
= -1;
2846 static int hf_tn5250_qr_flag2_5
= -1;
2847 static int hf_tn5250_qr_flag2_6to7
= -1;
2848 static int hf_tn5250_qr_flag_0
= -1;
2849 static int hf_tn5250_qr_flag_reserved
= -1;
2850 static int hf_tn5250_qr_mni
= -1;
2851 static int hf_tn5250_image_fax_error
= -1;
2852 static int hf_tn5250_vac_data
= -1;
2853 static int hf_tn5250_vac_prefix
= -1;
2854 static int hf_tn5250_wssf_ttw_flag
= -1;
2855 static int hf_tn5250_wssf_ttw_data
= -1;
2857 static gint ett_tn5250
= -1;
2858 static gint ett_tn5250_wcc
= -1;
2859 static gint ett_sf
= -1;
2860 static gint ett_tn5250_field_attribute
= -1;
2861 static gint ett_tn5250_dfdpck_mask
= -1;
2862 static gint ett_tn5250_field_validation
= -1;
2863 static gint ett_tn5250_header_flags
= -1;
2864 static gint ett_tn5250_roll_mask
= -1;
2865 static gint ett_tn5250_soh_mask
= -1;
2866 static gint ett_tn5250_soh_pf16to9_mask
= -1;
2867 static gint ett_tn5250_soh_pf24to17_mask
= -1;
2868 static gint ett_tn5250_soh_pf8to1_mask
= -1;
2869 static gint ett_tn5250_sps_mask
= -1;
2870 static gint ett_tn5250_wdsf_cw_bp_mask
= -1;
2871 static gint ett_tn5250_wdsf_cw_mask
= -1;
2872 static gint ett_tn5250_wdsf_cw_tf_mask
= -1;
2873 static gint ett_tn5250_wdsf_deg_mask
= -1;
2874 static gint ett_tn5250_wdsf_deg_ms_mask
= -1;
2875 static gint ett_tn5250_wdsf_ds_ci_mask
= -1;
2876 static gint ett_tn5250_wdsf_ds_cpda_mask
= -1;
2877 static gint ett_tn5250_wdsf_ds_ct_mask
= -1;
2878 static gint ett_tn5250_wdsf_ds_mask
= -1;
2879 static gint ett_tn5250_wdsf_ds_mbs_mask
= -1;
2880 static gint ett_tn5250_wdsf_ds_sbi_mask
= -1;
2881 static gint ett_tn5250_wdsf_dsb_mask
= -1;
2882 static gint ett_tn5250_wdsf_pmb_mask
= -1;
2883 static gint ett_tn5250_wdsf_ragc_mask
= -1;
2884 static gint ett_tn5250_wdsf_rgw_mask
= -1;
2885 static gint ett_tn5250_wdsf_wdf_mask
= -1;
2886 static gint ett_tn5250_wsf_dpo_mask
= -1;
2887 static gint ett_tn5250_wsf_dsl_mask
= -1;
2888 static gint ett_tn5250_wsf_dtsf_mask
= -1;
2889 static gint ett_tn5250_wsf_qss_mask
= -1;
2890 static gint ett_tn5250_wsf_rts_mask
= -1;
2891 static gint ett_tn5250_wssf_cc_mask
= -1;
2892 static gint ett_tn5250_wssf_ifc_mask
= -1;
2893 static gint ett_tn5250_wssf_ifd_mask
= -1;
2894 static gint ett_tn5250_wssf_kbc_mask
= -1;
2895 static gint ett_tn5250_wssf_mask
= -1;
2896 static gint ett_tn5250_wts_mask
= -1;
2897 static gint ett_tn5250_qr_mask
= -1;
2898 static gint ett_tn5250_wea_prim_attr
= -1;
2899 static gint ett_cc
= -1;
2901 static tn5250_conv_info_t
*tn5250_info_items
;
2903 static guint32
dissect_tn5250_orders_and_data(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
);
2905 typedef struct hf_items
{
2909 const int **bitmask
;
2913 /* Utility Functions */
2916 tn5250_is_valid_aid(gint aid
)
2920 case AID_ENTER_OR_RECORD_ADV
:
2925 case AID_ROLL_RIGHT
:
2927 case AID_RECORD_BACKSPACE
:
2928 case AID_SLP_AUTO_ENTER
:
2929 case AID_FORWARD_EDGE_TRIGGER_AUTO__ENTER
:
2957 case AID_INBOUND_WRITE_STRUCTURED_FIELD
:
2958 case AID_PASS_THROUGH_RESPONSE
:
2967 tn5250_add_hf_items(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
,
2970 int start
=offset
, byte
;
2973 for (i
= 0; fields
[i
].hf
; ++i
) {
2974 if (fields
[i
].bitmask
== 0) {
2975 /* Skip an 0xFF byte acting as an escape byte */
2976 byte
= tvb_get_guint8(tvb
,offset
);
2980 proto_tree_add_item(tn5250_tree
, fields
[i
].hf
, tvb
, offset
,
2981 fields
[i
].length
, fields
[i
].encoding
);
2983 proto_tree_add_bitmask(tn5250_tree
, tvb
, offset
, fields
[i
].hf
,
2984 fields
[i
].bitmask_ett
, fields
[i
].bitmask
, ENC_BIG_ENDIAN
);
2986 DISSECTOR_ASSERT(fields
[i
].length
> 0);
2987 offset
+=fields
[i
].length
;
2989 return (offset
- start
);
2993 dissect_unknown_data(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
,
2994 gint start
, gint sf_length
)
2998 len_left
= sf_length
- (offset
- start
);
3001 proto_tree_add_item(tn5250_tree
, hf_tn5250_unknown_data
, tvb
, offset
,
3009 dissect_wcc(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3012 static const int *wcc_byte
[] = {
3013 &hf_tn5250_wtd_ccc2_res
,
3014 &hf_tn5250_wtd_ccc2_cursor
,
3015 &hf_tn5250_wtd_ccc2_reset
,
3016 &hf_tn5250_wtd_ccc2_set
,
3017 &hf_tn5250_wtd_ccc2_unlock
,
3018 &hf_tn5250_wtd_ccc2_alarm
,
3019 &hf_tn5250_wtd_ccc2_off
,
3020 &hf_tn5250_wtd_ccc2_on
,
3024 hf_items wcc_fields
[] = {
3025 { hf_tn5250_wtd_ccc1
, 0, 1, 0, ENC_BIG_ENDIAN
},
3026 { hf_tn5250_wtd_ccc2
, ett_tn5250_wcc
, 1, wcc_byte
, 0 },
3030 tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, wcc_fields
);
3037 dissect_row_column(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3040 proto_tree_add_item(tn5250_tree
, hf_tn5250_buffer_x
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3042 proto_tree_add_item(tn5250_tree
, hf_tn5250_buffer_y
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3045 return (offset
- start
);
3048 /* End - Utility Functions */
3051 /* Start: Handle WCC, Orders and Data */
3053 /* 15.6.8 Erase to Address Order */
3055 dissect_erase_to_address(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3060 dissect_row_column(tn5250_tree
, tvb
, offset
);
3062 length
= tvb_get_guint8(tvb
, offset
);
3063 proto_tree_add_item(tn5250_tree
, hf_tn5250_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3066 for (i
=1; i
< length
; i
++) {
3067 proto_tree_add_item(tn5250_tree
, hf_tn5250_attribute_type
, tvb
, offset
, 1,
3072 return (offset
- start
);
3075 /* 15.6.9 Start of Header Order */
3077 dissect_start_of_header(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3081 /*TODO: Warn on invalid length. <= 7 */
3082 static const int *byte
[] = {
3083 &hf_tn5250_soh_cursor_direction
,
3084 &hf_tn5250_soh_screen_reverse
,
3085 &hf_tn5250_soh_input_capable_only
,
3089 static const int *byte1
[] = {
3090 &hf_tn5250_soh_pf24
, &hf_tn5250_soh_pf23
, &hf_tn5250_soh_pf22
,
3091 &hf_tn5250_soh_pf21
, &hf_tn5250_soh_pf20
, &hf_tn5250_soh_pf19
,
3092 &hf_tn5250_soh_pf18
, &hf_tn5250_soh_pf17
,
3096 static const int *byte2
[] = {
3097 &hf_tn5250_soh_pf16
, &hf_tn5250_soh_pf15
, &hf_tn5250_soh_pf14
,
3098 &hf_tn5250_soh_pf13
, &hf_tn5250_soh_pf12
, &hf_tn5250_soh_pf11
,
3099 &hf_tn5250_soh_pf10
, &hf_tn5250_soh_pf9
,
3103 static const int *byte3
[] = {
3104 &hf_tn5250_soh_pf8
, &hf_tn5250_soh_pf7
, &hf_tn5250_soh_pf6
,
3105 &hf_tn5250_soh_pf5
, &hf_tn5250_soh_pf4
, &hf_tn5250_soh_pf3
,
3106 &hf_tn5250_soh_pf2
, &hf_tn5250_soh_pf1
,
3110 hf_items start_of_header_fields
[] = {
3111 { hf_tn5250_soh_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3112 { hf_tn5250_soh_flags
, ett_tn5250_soh_mask
, 1, byte
, 0 },
3113 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3114 { hf_tn5250_soh_resq
, 1, 1, 0, ENC_BIG_ENDIAN
},
3115 { hf_tn5250_soh_err
, 1, 1, 0, ENC_BIG_ENDIAN
},
3116 { hf_tn5250_soh_pf24to17
, ett_tn5250_soh_pf24to17_mask
, 1, byte1
, 0 },
3117 { hf_tn5250_soh_pf16to9
, ett_tn5250_soh_pf16to9_mask
, 1, byte2
, 0 },
3118 { hf_tn5250_soh_pf8to1
, ett_tn5250_soh_pf8to1_mask
, 1, byte3
, 0 },
3123 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
3124 start_of_header_fields
);
3126 return (offset
- start
);
3129 /* 15.6.10 Transparent Data */
3131 dissect_twobyte_length_and_data(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3136 length
= tvb_get_ntohs(tvb
, offset
);
3137 proto_tree_add_item(tn5250_tree
, hf_tn5250_length_twobyte
, tvb
, offset
, 2,
3141 if (tvb_reported_length_remaining(tvb
, offset
) >= length
) {
3142 proto_tree_add_item(tn5250_tree
, hf_tn5250_field_data
, tvb
, offset
,
3143 length
, ENC_EBCDIC
|ENC_NA
);
3146 offset
+= dissect_unknown_data(tn5250_tree
, tvb
, offset
, start
, length
);
3149 return (offset
- start
);
3152 /* 15.6.11 Write Extended Attribute Order */
3154 dissect_field_attribute_pair(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3159 static const int *byte
[] = {
3160 &hf_tn5250_wea_prim_attr_flag
, &hf_tn5250_wea_prim_attr_col
,
3161 &hf_tn5250_wea_prim_attr_blink
, &hf_tn5250_wea_prim_attr_und
,
3162 &hf_tn5250_wea_prim_attr_int
, &hf_tn5250_wea_prim_attr_rev
,
3166 attribute_type
= tvb_get_guint8(tvb
, offset
);
3167 proto_tree_add_item(tn5250_tree
, hf_tn5250_attribute_type
, tvb
, offset
, 1,
3170 switch (attribute_type
) {
3171 case EXTENDED_PRIMARY_ATTRIBUTES
:
3172 proto_tree_add_bitmask(tn5250_tree
, tvb
, offset
, hf_tn5250_wea_prim_attr
,
3173 ett_tn5250_wea_prim_attr
, byte
, ENC_BIG_ENDIAN
);
3176 case EXTENDED_FOREGROUND_COLOR_ATTRIBUTES
:
3177 proto_tree_add_item(tn5250_tree
, hf_tn5250_foreground_color_attr
, tvb
,
3178 offset
, 1, ENC_BIG_ENDIAN
);
3181 case EXTENDED_IDEOGRAPHIC_ATTRIBUTES
:
3182 proto_tree_add_item(tn5250_tree
, hf_tn5250_ideographic_attr
, tvb
, offset
,
3187 /*TODO: Add invalid data statement here*/
3191 return (offset
- start
);
3194 /* 15.6.12 Start of Field Order */
3196 dissect_start_of_field(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3200 int ffw
= 0, fcw
= 0, fa
= 0;
3202 static const int *byte
[] = {
3204 &hf_tn5250_ffw_bypass
,
3207 &hf_tn5250_ffw_shift
,
3211 static const int *byte1
[] = {
3212 &hf_tn5250_ffw_auto
,
3214 &hf_tn5250_ffw_monocase
,
3217 &hf_tn5250_ffw_adjust
,
3221 static const int *fabyte
[] = {
3222 &hf_tn5250_sf_attr_flag
, &hf_tn5250_wea_prim_attr_col
,
3223 &hf_tn5250_wea_prim_attr_blink
, &hf_tn5250_wea_prim_attr_und
,
3224 &hf_tn5250_wea_prim_attr_int
, &hf_tn5250_wea_prim_attr_rev
,
3228 hf_items outbound_text_header_fields
[] = {
3229 { hf_tn5250_ffw
, ett_tn5250_soh_mask
, 1, byte
, 0 },
3230 { hf_tn5250_ffw
, ett_tn5250_soh_mask
, 1, byte1
, 0 },
3234 ffw
= tvb_get_guint8(tvb
, offset
);
3237 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
3238 outbound_text_header_fields
);
3239 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3240 fcw
= tvb_get_guint8(tvb
, offset
);
3245 case CONTINUED_ENTRY
:
3247 case ENTRY_FIELD_RESEQUENCING
:
3248 case CURSOR_PROGRESSION_ENTRY_FIELD
:
3249 case HIGHLIGHTED_ENTRY_FIELD
:
3250 case POINTER_DEVICE_SELECTION_ENTRY_FIELD
:
3251 case TRANSPARENCY_ENTRY_FIELD
:
3252 proto_tree_add_item(tn5250_tree
, hf_tn5250_fcw
, tvb
, offset
,
3263 fa
= tvb_get_guint8(tvb
, offset
);
3266 proto_tree_add_bitmask(tn5250_tree
, tvb
, offset
, hf_tn5250_fa
,
3267 ett_tn5250_wea_prim_attr
, fabyte
, ENC_BIG_ENDIAN
);
3270 proto_tree_add_item(tn5250_tree
, hf_tn5250_fa_color
, tvb
, offset
,
3274 proto_tree_add_item(tn5250_tree
, hf_tn5250_length_twobyte
, tvb
, offset
,
3278 return (offset
- start
);
3281 /* 15.6.13 Write To Display Structured Field Order */
3283 dissect_create_window(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3287 int done
= 0, minor_structure
= 0;
3289 static const int *byte
[] = {
3290 &hf_tn5250_wdsf_cw_flag1_1
,
3291 &hf_tn5250_wdsf_cw_flag1_2
,
3292 &hf_tn5250_wdsf_cw_flag1_reserved
,
3296 hf_items cw_fields
[] = {
3297 { hf_tn5250_wdsf_cw_flag1
, ett_tn5250_wdsf_cw_mask
, 1, byte
, 0 },
3298 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3299 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3300 { hf_tn5250_wdsf_cw_wd
, 0, 1, 0, ENC_BIG_ENDIAN
},
3301 { hf_tn5250_wdsf_cw_ww
, 0, 1, 0, ENC_BIG_ENDIAN
},
3305 static const int *cw_bp_flag1
[] = {
3306 &hf_tn5250_wdsf_cw_bp_flag1_1
,
3307 &hf_tn5250_wdsf_cw_bp_flag1_reserved
,
3312 hf_items cwbp_fields
[] = {
3313 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3314 { hf_tn5250_wdsf_cw_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3315 { hf_tn5250_wdsf_cw_bp_flag1
, ett_tn5250_wdsf_cw_bp_mask
, 1, cw_bp_flag1
, 0 },
3316 { hf_tn5250_wdsf_cw_bp_mba
, 0, 1, 0, ENC_BIG_ENDIAN
},
3317 { hf_tn5250_wdsf_cw_bp_cba
, 0, 1, 0, ENC_BIG_ENDIAN
},
3318 { hf_tn5250_wdsf_cw_bp_ulbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3319 { hf_tn5250_wdsf_cw_bp_tbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3320 { hf_tn5250_wdsf_cw_bp_urbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3321 { hf_tn5250_wdsf_cw_bp_lbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3322 { hf_tn5250_wdsf_cw_bp_rbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3323 { hf_tn5250_wdsf_cw_bp_llbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3324 { hf_tn5250_wdsf_cw_bp_bbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3325 { hf_tn5250_wdsf_cw_bp_lrbc
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3329 static const int *cw_tf_flag1
[] = {
3330 &hf_tn5250_wdsf_cw_tf_flag_orientation
,
3331 &hf_tn5250_wdsf_cw_tf_flag_1
,
3332 &hf_tn5250_wdsf_cw_tf_flag_reserved
,
3337 hf_items cw_tf_fields
[] = {
3338 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3339 { hf_tn5250_wdsf_cw_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3340 { hf_tn5250_wdsf_cw_tf_flag
, ett_tn5250_wdsf_cw_tf_mask
, 1, cw_tf_flag1
, 0 },
3341 { hf_tn5250_wdsf_cw_tf_mba
, 0, 1, 0, ENC_BIG_ENDIAN
},
3342 { hf_tn5250_wdsf_cw_tf_cba
, 0, 1, 0, ENC_BIG_ENDIAN
},
3343 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3347 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, cw_fields
);
3349 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3350 minor_structure
= tvb_get_guint8(tvb
, offset
+1);
3351 switch (minor_structure
) {
3352 case CW_BORDER_PRESENTATION
:
3353 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, cwbp_fields
);
3354 case CW_TITLE_FOOTER
:
3355 length
= tvb_get_guint8(tvb
,offset
);
3356 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, cw_tf_fields
);
3357 proto_tree_add_item(tn5250_tree
, hf_tn5250_wdsf_cw_tf_text
, tvb
, offset
,
3358 (length
- 6), ENC_EBCDIC
|ENC_NA
);
3359 offset
+= (guint32
)((length
- 6));
3366 return (offset
- start
);
3370 dissect_define_selection(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3374 int done
= 0, minor_structure
= 0, digit_selection
= 0;
3376 static const int *ds_flag1
[] = {
3377 &hf_tn5250_wdsf_ds_flag1_mouse_characteristics
, &hf_tn5250_wdsf_ds_flag1_reserved
,
3378 &hf_tn5250_wdsf_ds_flag1_auto_enter
, &hf_tn5250_wdsf_ds_flag1_1
,
3379 &hf_tn5250_wdsf_ds_flag1_2
, NULL
3382 static const int *ds_flag2
[] = {
3383 &hf_tn5250_wdsf_ds_flag2_1
, &hf_tn5250_wdsf_ds_flag2_2
,
3384 &hf_tn5250_wdsf_ds_flag2_3
, &hf_tn5250_wdsf_ds_flag2_4
,
3385 &hf_tn5250_wdsf_ds_flag2_5
, &hf_tn5250_wdsf_ds_flag2_6
,
3386 &hf_tn5250_wdsf_ds_flag2_reserved
,
3390 static const int *ds_flag3
[] = {
3391 &hf_tn5250_wdsf_ds_flag3_1
, &hf_tn5250_wdsf_ds_flag3_reserved
,
3395 static const int *ds_gdc
[] = {
3396 &hf_tn5250_wdsf_ds_gdc_indicators
, &hf_tn5250_wdsf_ds_gdc_reserved
,
3397 &hf_tn5250_wdsf_ds_gdc_selection_techniques
,
3401 static const int *ds_nws
[] = {
3402 &hf_tn5250_wdsf_ds_nws_indicators
, &hf_tn5250_wdsf_ds_nws_reserved
,
3403 &hf_tn5250_wdsf_ds_nws_selection_techniques
,
3407 hf_items ds_fields
[] = {
3408 { hf_tn5250_wdsf_ds_flag1
, ett_tn5250_wdsf_ds_mask
, 1, ds_flag1
, 0 },
3409 { hf_tn5250_wdsf_ds_flag2
, ett_tn5250_wdsf_ds_mask
, 1, ds_flag2
, 0 },
3410 { hf_tn5250_wdsf_ds_flag3
, ett_tn5250_wdsf_ds_mask
, 1, ds_flag3
, 0 },
3411 { hf_tn5250_wdsf_ds_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3412 { hf_tn5250_wdsf_ds_gdc
, ett_tn5250_wdsf_ds_mask
, 1, ds_gdc
, 0 },
3413 { hf_tn5250_wdsf_ds_nws
, ett_tn5250_wdsf_ds_mask
, 1, ds_nws
, 0 },
3414 { hf_tn5250_wdsf_ds_nws_wout
, ett_tn5250_wdsf_ds_mask
, 1, ds_nws
, 0 },
3415 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3416 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3417 { hf_tn5250_wdsf_ds_textsize
, 0, 1, 0, ENC_BIG_ENDIAN
},
3418 { hf_tn5250_wdsf_ds_rows
, 0, 1, 0, ENC_BIG_ENDIAN
},
3419 { hf_tn5250_wdsf_ds_columns
, 0, 1, 0, ENC_BIG_ENDIAN
},
3420 { hf_tn5250_wdsf_ds_padding
, 0, 1, 0, ENC_BIG_ENDIAN
},
3421 { hf_tn5250_wdsf_ds_numeric_sep
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3422 { hf_tn5250_wdsf_ds_country_sel
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3423 { hf_tn5250_wdsf_ds_cancel_aid
, 0, 1, 0, ENC_BIG_ENDIAN
},
3424 { hf_tn5250_wdsf_ds_totalrows
, 0, 4, 0, ENC_BIG_ENDIAN
},
3425 { hf_tn5250_wdsf_ds_sliderpos
, 0, 4, 0, ENC_BIG_ENDIAN
},
3429 static const int *ds_ct_flag1
[] = {
3430 &hf_tn5250_wdsf_ds_ct_flag1_choice_state
, &hf_tn5250_wdsf_ds_ct_flag1_2
,
3431 &hf_tn5250_wdsf_ds_ct_flag1_3
, &hf_tn5250_wdsf_ds_ct_flag1_4
,
3432 &hf_tn5250_wdsf_ds_ct_flag1_5
, &hf_tn5250_wdsf_ds_ct_flag1_numeric_selection
,
3436 static const int *ds_ct_flag2
[] = {
3437 &hf_tn5250_wdsf_ds_ct_flag2_0
, &hf_tn5250_wdsf_ds_ct_flag2_1
,
3438 &hf_tn5250_wdsf_ds_ct_flag2_2
, &hf_tn5250_wdsf_ds_ct_flag2_3
,
3439 &hf_tn5250_wdsf_ds_ct_flag2_4
, &hf_tn5250_wdsf_ds_ct_flag2_5
,
3440 &hf_tn5250_wdsf_ds_ct_flag2_6
, &hf_tn5250_wdsf_ds_ct_flag2_7
,
3444 static const int *ds_ct_flag3
[] = {
3445 &hf_tn5250_wdsf_ds_ct_flag3_0
, &hf_tn5250_wdsf_ds_ct_flag3_1
,
3446 &hf_tn5250_wdsf_ds_ct_flag3_2
, &hf_tn5250_wdsf_ds_ct_flag3_reserved
,
3450 hf_items ds_ct_fields
[] = {
3451 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3452 { hf_tn5250_wdsf_ds_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3453 { hf_tn5250_wdsf_ds_ct_flag1
, ett_tn5250_wdsf_ds_ct_mask
, 1, ds_ct_flag1
, 0 },
3454 { hf_tn5250_wdsf_ds_ct_flag2
, ett_tn5250_wdsf_ds_ct_mask
, 1, ds_ct_flag2
, 0 },
3455 { hf_tn5250_wdsf_ds_ct_flag3
, ett_tn5250_wdsf_ds_ct_mask
, 1, ds_ct_flag3
, 0 },
3456 { hf_tn5250_wdsf_ds_ct_mnemonic_offset
, 0, 1, 0, ENC_BIG_ENDIAN
},
3457 { hf_tn5250_wdsf_ds_ct_aid
, 0, 1, 0, ENC_BIG_ENDIAN
},
3458 { hf_tn5250_wdsf_ds_ct_numeric_onebyte
, 0, 1, 0, ENC_BIG_ENDIAN
},
3459 { hf_tn5250_wdsf_ds_ct_numeric_twobyte
, 0, 2, 0, ENC_BIG_ENDIAN
},
3463 static const int *ds_mbs_flag
[] = {
3464 &hf_tn5250_wdsf_ds_mbs_flag_0
, &hf_tn5250_wdsf_ds_mbs_flag_1
,
3465 &hf_tn5250_wdsf_ds_mbs_flag_reserved
,
3469 hf_items ds_mbs_fields
[] = {
3470 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3471 { hf_tn5250_wdsf_ds_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3472 { hf_tn5250_wdsf_ds_mbs_flag
, ett_tn5250_wdsf_ds_mbs_mask
, 1, ds_mbs_flag
, 0 },
3473 { hf_tn5250_wdsf_ds_mbs_start_column
, 0, 1, 0, ENC_BIG_ENDIAN
},
3474 { hf_tn5250_wdsf_ds_mbs_end_column
, 0, 1, 0, ENC_BIG_ENDIAN
},
3475 { hf_tn5250_wdsf_ds_mbs_start_column
, 0, 1, 0, ENC_BIG_ENDIAN
},
3476 { hf_tn5250_wdsf_ds_mbs_monochrome_sep
, 0, 1, 0, ENC_BIG_ENDIAN
},
3477 { hf_tn5250_wdsf_ds_mbs_color_sep
, 0, 1, 0, ENC_BIG_ENDIAN
},
3478 { hf_tn5250_wdsf_ds_mbs_sep_char
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3482 static const int *ds_cpda_flag
[] = {
3483 &hf_tn5250_wdsf_ds_cpda_flag1_0
, &hf_tn5250_wdsf_ds_cpda_flag1_1
,
3484 &hf_tn5250_wdsf_ds_cpda_flag1_2
, &hf_tn5250_wdsf_ds_cpda_flag1_reserved
,
3488 hf_items ds_cpda_fields
[] = {
3489 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3490 { hf_tn5250_wdsf_ds_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3491 { hf_tn5250_wdsf_ds_cpda_flag1
, ett_tn5250_wdsf_ds_cpda_mask
, 1, ds_cpda_flag
, 0 },
3492 { hf_tn5250_wdsf_ds_cpda_monochrome_sel_avail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3493 { hf_tn5250_wdsf_ds_cpda_color_sel_avail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3494 { hf_tn5250_wdsf_ds_cpda_monochrome_sel_selected
, 0, 1, 0, ENC_BIG_ENDIAN
},
3495 { hf_tn5250_wdsf_ds_cpda_color_sel_selected
, 0, 1, 0, ENC_BIG_ENDIAN
},
3496 { hf_tn5250_wdsf_ds_cpda_monochrome_sel_unavail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3497 { hf_tn5250_wdsf_ds_cpda_color_sel_unavail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3498 { hf_tn5250_wdsf_ds_cpda_monochrome_avail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3499 { hf_tn5250_wdsf_ds_cpda_color_avail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3500 { hf_tn5250_wdsf_ds_cpda_monochrome_selected
, 0, 1, 0, ENC_BIG_ENDIAN
},
3501 { hf_tn5250_wdsf_ds_cpda_color_selected
, 0, 1, 0, ENC_BIG_ENDIAN
},
3502 { hf_tn5250_wdsf_ds_cpda_monochrome_unavail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3503 { hf_tn5250_wdsf_ds_cpda_color_unavail
, 0, 1, 0, ENC_BIG_ENDIAN
},
3504 { hf_tn5250_wdsf_ds_cpda_monochrome_indicator
, 0, 1, 0, ENC_BIG_ENDIAN
},
3505 { hf_tn5250_wdsf_ds_cpda_color_indicator
, 0, 1, 0, ENC_BIG_ENDIAN
},
3506 { hf_tn5250_wdsf_ds_cpda_monochrome_unavail_indicator
, 0, 1, 0, ENC_BIG_ENDIAN
},
3507 { hf_tn5250_wdsf_ds_cpda_color_unavail_indicator
, 0, 1, 0, ENC_BIG_ENDIAN
},
3511 static const int *ds_ci_flag
[] = {
3512 &hf_tn5250_wdsf_ds_ci_flag1_0
, &hf_tn5250_wdsf_ds_ci_flag1_reserved
,
3516 hf_items ds_ci_fields
[] = {
3517 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3518 { hf_tn5250_wdsf_ds_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3519 { hf_tn5250_wdsf_ds_ci_flag1
, ett_tn5250_wdsf_ds_ci_mask
, 1, ds_ci_flag
, 0 },
3520 { hf_tn5250_wdsf_ds_ci_left_push
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3521 { hf_tn5250_wdsf_ds_ci_right_push
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3522 { hf_tn5250_wdsf_ds_ci_first_choice
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3526 static const int *ds_sbi_flag
[] = {
3527 &hf_tn5250_wdsf_ds_sbi_flag1_0
, &hf_tn5250_wdsf_ds_sbi_flag1_reserved
,
3531 hf_items ds_sbi_fields
[] = {
3532 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3533 { hf_tn5250_wdsf_ds_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3534 { hf_tn5250_wdsf_ds_sbi_flag1
, ett_tn5250_wdsf_ds_sbi_mask
, 1, ds_sbi_flag
, 0 },
3535 { hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight
, 0, 1, 0, ENC_BIG_ENDIAN
},
3536 { hf_tn5250_wdsf_ds_sbi_color_top_highlight
, 0, 1, 0, ENC_BIG_ENDIAN
},
3537 { hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight_shaft
, 0, 1, 0, ENC_BIG_ENDIAN
},
3538 { hf_tn5250_wdsf_ds_sbi_color_top_highlight_shaft
, 0, 1, 0, ENC_BIG_ENDIAN
},
3539 { hf_tn5250_wdsf_ds_sbi_top_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3540 { hf_tn5250_wdsf_ds_sbi_bottom_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3541 { hf_tn5250_wdsf_ds_sbi_empty_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3542 { hf_tn5250_wdsf_ds_sbi_slider_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3546 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_fields
);
3548 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3549 minor_structure
= tvb_get_guint8(tvb
, offset
+1);
3550 switch (minor_structure
) {
3551 case DS_CHOICE_TEXT
:
3552 length
= tvb_get_guint8(tvb
, offset
);
3553 digit_selection
= tvb_get_guint8(tvb
, offset
+2);
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
, 1, ENC_BIG_ENDIAN
);
3564 proto_tree_add_item(tn5250_tree
, hf_tn5250_wdsf_ds_ct_text
, tvb
, offset
,
3565 (length
- (offset
- start
)), ENC_EBCDIC
|ENC_NA
);
3566 offset
+= (guint32
)((length
- (offset
- start
)));
3568 case DS_MENU_BAR_SEPARATOR
:
3569 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_mbs_fields
);
3571 case DS_CHOICE_PRESENTATION_DISPLAY
:
3572 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_cpda_fields
);
3574 case DS_CHOICE_INDICATORS
:
3575 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_ci_fields
);
3577 case DS_SCROLLBAR_INDICATORS
:
3578 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_sbi_fields
);
3585 return (offset
- start
);
3589 dissect_define_scrollbar(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3592 int done
= 0, minor_structure
= 0;
3594 static const int *dsb_byte
[] = {
3595 &hf_tn5250_wdsf_dsb_flag1_0
, &hf_tn5250_wdsf_dsb_flag1_1
,
3596 &hf_tn5250_wdsf_dsb_flag1_reserved
, &hf_tn5250_wdsf_dsb_flag1_7
,
3600 hf_items dsb_fields
[] = {
3601 { hf_tn5250_wdsf_dsb_flag1
, ett_tn5250_wdsf_dsb_mask
, 1, dsb_byte
, 0 },
3602 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3603 { hf_tn5250_wdsf_sbi_total_scroll
, 0, 4, 0, ENC_BIG_ENDIAN
},
3604 { hf_tn5250_wdsf_sbi_sliderpos
, 0, 4, 0, ENC_BIG_ENDIAN
},
3605 { hf_tn5250_wdsf_sbi_rowscols
, 0, 1, 0, ENC_BIG_ENDIAN
},
3609 static const int *ds_sbi_flag
[] = {
3610 &hf_tn5250_wdsf_ds_sbi_flag1_0
, &hf_tn5250_wdsf_ds_sbi_flag1_reserved
,
3614 hf_items ds_sbi_fields
[] = {
3615 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3616 { hf_tn5250_wdsf_ds_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3617 { hf_tn5250_wdsf_ds_sbi_flag1
, ett_tn5250_wdsf_ds_sbi_mask
, 1, ds_sbi_flag
, 0 },
3618 { hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight
, 0, 1, 0, ENC_BIG_ENDIAN
},
3619 { hf_tn5250_wdsf_ds_sbi_color_top_highlight
, 0, 1, 0, ENC_BIG_ENDIAN
},
3620 { hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight_shaft
, 0, 1, 0, ENC_BIG_ENDIAN
},
3621 { hf_tn5250_wdsf_ds_sbi_color_top_highlight_shaft
, 0, 1, 0, ENC_BIG_ENDIAN
},
3622 { hf_tn5250_wdsf_ds_sbi_top_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3623 { hf_tn5250_wdsf_ds_sbi_bottom_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3624 { hf_tn5250_wdsf_ds_sbi_empty_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3625 { hf_tn5250_wdsf_ds_sbi_slider_character
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
3630 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, dsb_fields
);
3632 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3633 minor_structure
= tvb_get_guint8(tvb
, offset
+1);
3634 switch (minor_structure
) {
3635 case DS_SCROLLBAR_INDICATORS
:
3636 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ds_sbi_fields
);
3643 return (offset
- start
);
3647 dissect_draw_erase_gridlines(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3650 int done
= 0, minor_structure
=0;
3652 static const int *deg_byte
[] = {
3653 &hf_tn5250_wdsf_deg_flag1_0
, &hf_tn5250_wdsf_deg_flag1_reserved
,
3657 static const int *deg_byte2
[] = {
3658 &hf_tn5250_wdsf_deg_flag2_0
, &hf_tn5250_wdsf_deg_flag2_reserved
,
3662 hf_items deg_fields
[] = {
3663 { hf_tn5250_wdsf_deg_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
3664 { hf_tn5250_wdsf_deg_flag1
, ett_tn5250_wdsf_deg_mask
, 1, deg_byte
, 0 },
3665 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3666 { hf_tn5250_wdsf_deg_flag2
, ett_tn5250_wdsf_deg_mask
, 1, deg_byte2
, 0 },
3667 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3668 { hf_tn5250_wdsf_deg_default_color
, 0, 1, 0, ENC_BIG_ENDIAN
},
3669 { hf_tn5250_wdsf_deg_default_line
, 0, 1, 0, ENC_BIG_ENDIAN
},
3674 static const int *deg_ms_byte
[] = {
3675 &hf_tn5250_wdsf_deg_ms_flag1_0
, &hf_tn5250_wdsf_deg_ms_flag1_reserved
,
3679 hf_items deg_ms_fields
[] = {
3680 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3681 { hf_tn5250_wdsf_deg_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3682 { hf_tn5250_wdsf_deg_ms_flag1
, ett_tn5250_wdsf_deg_ms_mask
, 1, deg_ms_byte
, 0 },
3683 { hf_tn5250_wdsf_deg_ms_start_row
, 0, 1, 0, ENC_BIG_ENDIAN
},
3684 { hf_tn5250_wdsf_deg_ms_start_column
, 0, 1, 0, ENC_BIG_ENDIAN
},
3685 { hf_tn5250_wdsf_deg_ms_horizontal_dimension
, 0, 1, 0, ENC_BIG_ENDIAN
},
3686 { hf_tn5250_wdsf_deg_ms_vertical_dimension
, 0, 1, 0, ENC_BIG_ENDIAN
},
3687 { hf_tn5250_wdsf_deg_ms_default_color
, 0, 1, 0, ENC_BIG_ENDIAN
},
3688 { hf_tn5250_wdsf_deg_ms_line_repeat
, 0, 1, 0, ENC_BIG_ENDIAN
},
3689 { hf_tn5250_wdsf_deg_ms_line_interval
, 0, 1, 0, ENC_BIG_ENDIAN
},
3693 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, deg_fields
);
3695 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3696 minor_structure
= tvb_get_guint8(tvb
, offset
+1);
3697 switch (minor_structure
) {
3698 case UPPER_HORIZONTAL_LINE
:
3699 case LOWER_HORIZONTAL_LINE
:
3700 case LEFT_VERTICAL_LINE
:
3701 case RIGHT_VERTICAL_LINE
:
3703 case HORIZONTALLY_RULED_BOX
:
3704 case VERTICALLY_RULED_BOX
:
3705 case HORIZONTALLY_AND_VERTICALLY_RULED_BOX
:
3706 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, deg_ms_fields
);
3713 return (offset
- start
);
3717 dissect_wdsf_structured_field(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3720 int length
= 0, type
;
3721 int done
= 0, ln_left
= 0, i
= 0;
3723 hf_items standard_fields
[] = {
3724 { hf_tn5250_sf_length
, 0, 2, 0, ENC_BIG_ENDIAN
},
3725 { hf_tn5250_sf_class
, 0, 1, 0, ENC_BIG_ENDIAN
},
3726 { hf_tn5250_sf_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
3730 static const int *rgw_byte
[] = {
3731 &hf_tn5250_wdsf_rgw_flag1_0
,
3732 &hf_tn5250_wdsf_rgw_flag1_1
,
3733 &hf_tn5250_wdsf_rgw_reserved
,
3737 hf_items rgw_fields
[] = {
3738 { hf_tn5250_wdsf_rgw_flag1
, ett_tn5250_wdsf_rgw_mask
, 1, rgw_byte
, 0 },
3739 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3740 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3744 static const int *ragc_byte
[] = {
3745 &hf_tn5250_wdsf_ragc_flag1_0
,
3746 &hf_tn5250_wdsf_ragc_reserved
,
3750 hf_items ragc_fields
[] = {
3751 { hf_tn5250_wdsf_ragc_flag1
, ett_tn5250_wdsf_ragc_mask
, 1, ragc_byte
, 0 },
3752 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3753 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3757 static const int *wdf_byte
[] = {
3758 &hf_tn5250_wdsf_wdf_flag1_0
,
3759 &hf_tn5250_wdsf_wdf_flag1_reserved
,
3763 hf_items wdf_fields
[] = {
3764 { hf_tn5250_wdsf_wdf_flag1
, ett_tn5250_wdsf_wdf_mask
, 1, wdf_byte
, 0 },
3765 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
3769 static const int *pmb_byte
[] = {
3770 &hf_tn5250_wdsf_pmb_flag1_0
, &hf_tn5250_wdsf_pmb_flag1_1
,
3771 &hf_tn5250_wdsf_pmb_flag1_2
, &hf_tn5250_wdsf_pmb_flag1_3
,
3772 &hf_tn5250_wdsf_pmb_flag1_reserved
,
3776 hf_items pmb_fields
[] = {
3777 { hf_tn5250_wdsf_pmb_flag1
, ett_tn5250_wdsf_pmb_mask
, 1, pmb_byte
, 0 },
3778 { hf_tn5250_wdsf_pmb_first_mouse_event
, 0, 1, 0, ENC_BIG_ENDIAN
},
3779 { hf_tn5250_wdsf_pmb_second_mouse_event
, 0, 1, 0, ENC_BIG_ENDIAN
},
3780 { hf_tn5250_aid
, 0, 1, 0, ENC_BIG_ENDIAN
},
3784 hf_items cgl_fields
[] = {
3785 { hf_tn5250_wdsf_cgl_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
3786 { hf_tn5250_wdsf_cgl_start_row
, 0, 1, 0, ENC_BIG_ENDIAN
},
3787 { hf_tn5250_wdsf_cgl_start_column
, 0, 1, 0, ENC_BIG_ENDIAN
},
3788 { hf_tn5250_wdsf_cgl_rectangle_width
, 0, 1, 0, ENC_BIG_ENDIAN
},
3789 { hf_tn5250_wdsf_cgl_rectangle_height
, 0, 1, 0, ENC_BIG_ENDIAN
},
3793 length
= tvb_get_ntohs(tvb
,offset
);
3794 type
= tvb_get_guint8(tvb
, offset
+3);
3796 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, standard_fields
);
3798 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3801 offset
+= dissect_create_window(tn5250_tree
, tvb
, offset
);
3803 case UNRESTRICTED_WINDOW_CURSOR_MOVEMENT
:
3804 case REMOVE_GUI_SELECTION_FIELD
:
3805 case REMOVE_GUI_SCROLL_BAR_FIELD
:
3806 proto_tree_add_item(tn5250_tree
, hf_tn5250_reserved
, tvb
, offset
,
3808 proto_tree_add_item(tn5250_tree
, hf_tn5250_reserved
, tvb
, offset
,
3812 case REMOVE_GUI_WINDOW
:
3813 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, rgw_fields
);
3815 case REMOVE_ALL_GUI_CONSTRUCTS
:
3816 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, ragc_fields
);
3818 case DEFINE_SELECTION_FIELD
:
3819 offset
+= dissect_define_selection(tn5250_tree
, tvb
, offset
);
3821 case DEFINE_SCROLL_BAR_FIELD
:
3822 offset
+= dissect_define_scrollbar(tn5250_tree
, tvb
, offset
);
3825 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, wdf_fields
);
3826 proto_tree_add_item(tn5250_tree
, hf_tn5250_field_data
, tvb
, offset
,
3827 (length
- 6), ENC_EBCDIC
|ENC_NA
);
3828 offset
+= (guint32
)((length
- 6));
3830 case PROGRAMMABLE_MOUSE_BUTTONS
:
3831 proto_tree_add_item(tn5250_tree
, hf_tn5250_reserved
, tvb
, offset
,
3833 proto_tree_add_item(tn5250_tree
, hf_tn5250_reserved
, tvb
, offset
,
3836 ln_left
= length
- (offset
- start
);
3837 for (i
= 0; i
< ln_left
; i
+=4) {
3838 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, pmb_fields
);
3841 case DRAW_ERASE_GRID_LINES
:
3842 offset
+= dissect_draw_erase_gridlines(tn5250_tree
, tvb
, offset
);
3844 case CLEAR_GRID_LINE_BUFFER
:
3845 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, cgl_fields
);
3852 offset
+= dissect_unknown_data(tn5250_tree
, tvb
, offset
, start
, length
);
3854 return (offset
- start
);
3859 /* 15.6 WRITE TO DISPLAY Command - Orders and Data */
3861 dissect_tn5250_ra_data(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3863 gint order_code
, done
= 0;
3864 gint start
= offset
;
3866 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3867 order_code
= tvb_get_guint8(tvb
, offset
);
3868 switch (order_code
) {
3888 if (offset
> start
) {
3889 proto_tree_add_item(tn5250_tree
, hf_tn5250_repeated_character
,
3890 tvb
, start
, (offset
- start
), ENC_EBCDIC
|ENC_NA
);
3892 return (offset
- start
);
3897 dissect_tn5250_orders_and_data(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3899 gint start
= offset
, done
= 0;
3901 proto_tree
*cc_tree
;
3906 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
3907 order_code
= tvb_get_guint8(tvb
, offset
);
3908 switch (order_code
) {
3912 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3913 offset
, 1, ENC_BIG_ENDIAN
);
3915 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3916 offset
+= dissect_row_column(cc_tree
, tvb
, offset
);
3917 offset
+= dissect_tn5250_ra_data(cc_tree
, tvb
, offset
);
3920 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3921 offset
, 1, ENC_BIG_ENDIAN
);
3923 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3924 offset
+= dissect_row_column(cc_tree
, tvb
, offset
);
3925 offset
+= dissect_tn5250_ra_data(cc_tree
, tvb
, offset
);
3928 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3929 offset
, 1, ENC_BIG_ENDIAN
);
3931 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3932 offset
+= dissect_erase_to_address(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_start_of_header(cc_tree
, tvb
, offset
);
3942 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3943 offset
, 1, ENC_BIG_ENDIAN
);
3945 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3946 offset
+= dissect_twobyte_length_and_data(cc_tree
, tvb
, offset
);
3949 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3950 offset
, 1, ENC_BIG_ENDIAN
);
3952 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3953 offset
+= dissect_field_attribute_pair(cc_tree
, tvb
, offset
);
3956 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_order_code
, tvb
,
3957 offset
, 1, ENC_BIG_ENDIAN
);
3959 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
3960 offset
+= dissect_start_of_field(cc_tree
, tvb
, offset
);
3961 offset
+= dissect_tn5250_ra_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_wdsf_structured_field(cc_tree
, tvb
, offset
);
3975 return (offset
- start
);
3978 /* 15.22 SAVE PARTIAL SCREEN Command */
3980 dissect_save_partial_screen(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
3985 static const int *byte
[] = {
3986 &hf_tn5250_sps_flag1_0
,
3987 &hf_tn5250_sps_flag1_reserved
,
3991 hf_items save_partial_screen_fields
[] = {
3992 { hf_tn5250_soh_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
3993 { hf_tn5250_sps_flag1
, ett_tn5250_sps_mask
, 1, byte
, 0 },
3994 { hf_tn5250_sps_top_row
, 0, 1, 0, ENC_BIG_ENDIAN
},
3995 { hf_tn5250_sps_left_column
, 0, 1, 0, ENC_BIG_ENDIAN
},
3996 { hf_tn5250_sps_window_depth
, 0, 1, 0, ENC_BIG_ENDIAN
},
3997 { hf_tn5250_sps_window_width
, 0, 1, 0, ENC_BIG_ENDIAN
},
4001 length
= tvb_get_guint8(tvb
, offset
);
4003 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4004 save_partial_screen_fields
);
4006 offset
+= dissect_unknown_data(tn5250_tree
, tvb
, offset
, start
, length
);
4008 return (offset
- start
);
4011 /* 15.25 ROLL Command */
4013 dissect_roll(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
4017 static const int *byte
[] = {
4018 &hf_tn5250_roll_flag1_0
,
4019 &hf_tn5250_roll_flag1_reserved
,
4020 &hf_tn5250_roll_flag1_lines
,
4024 hf_items roll_fields
[] = {
4025 { hf_tn5250_roll_flag1
, ett_tn5250_roll_mask
, 1, byte
, 0 },
4026 { hf_tn5250_roll_top_line
, 0, 1, 0, ENC_BIG_ENDIAN
},
4027 { hf_tn5250_roll_bottom_line
, 0, 1, 0, ENC_BIG_ENDIAN
},
4032 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, roll_fields
);
4034 return (offset
- start
);
4037 /* 15.26 WRITE SINGLE STRUCTURED FIELD Command */
4039 dissect_write_single_structured_field_minor_fields(proto_tree
*tn5250_tree
,
4040 tvbuff_t
*tvb
, gint offset
)
4044 int done
= 0, type
= 0;
4046 static const int *byte_wssf_kbc_flag1
[] = {
4047 &hf_tn5250_wssf_kbc_flag1_reserved
,
4048 &hf_tn5250_wssf_kbc_flag1_5
,
4049 &hf_tn5250_wssf_kbc_flag1_6
,
4050 &hf_tn5250_wssf_kbc_flag1_7
,
4054 static const int *byte_wssf_cc_flag1
[] = {
4055 &hf_tn5250_wssf_cc_flag1_reserved
,
4056 &hf_tn5250_wssf_cc_flag1_7
,
4060 hf_items wsc_customization_kbc_fields
[] = {
4061 { hf_tn5250_sf_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4062 { hf_tn5250_wssf_wsc_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
4063 { hf_tn5250_wssf_kbc_flag1
, ett_tn5250_wssf_kbc_mask
, 1, byte_wssf_kbc_flag1
, 0 },
4067 hf_items wsc_customization_cc_fields
[] = {
4068 { hf_tn5250_sf_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4069 { hf_tn5250_wssf_wsc_minor_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
4070 { hf_tn5250_wssf_cc_flag1
, ett_tn5250_wssf_cc_mask
, 1, byte_wssf_cc_flag1
, 0 },
4074 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
4075 type
= tvb_get_guint8(tvb
, offset
+1);
4077 case KEYSTROKE_BUFFERING_CONTROL
:
4078 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4079 wsc_customization_kbc_fields
);
4081 case CURSOR_CONTROL
:
4082 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4083 wsc_customization_cc_fields
);
4091 return (offset
- start
);
4096 dissect_write_single_structured_field(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
,
4100 int length
, type
, done
= 0;
4103 static const int *byte
[] = {
4104 &hf_tn5250_wssf_flag2_0
,
4105 &hf_tn5250_wssf_flag2_1
,
4106 &hf_tn5250_wssf_flag2_2
,
4107 &hf_tn5250_wssf_flag2_3
,
4108 &hf_tn5250_wssf_flag2_4
,
4109 &hf_tn5250_wssf_flag2_5
,
4110 &hf_tn5250_wssf_flag2_6
,
4111 &hf_tn5250_wssf_flag2_7
,
4115 static const int *ifc_byte
[] = {
4116 &hf_tn5250_wssf_ifc_flag1_0
,
4117 &hf_tn5250_wssf_ifc_flag1_1to3
,
4118 &hf_tn5250_wssf_ifc_flag1_4
,
4119 &hf_tn5250_wssf_ifc_flag1_5
,
4120 &hf_tn5250_wssf_ifc_flag1_6
,
4121 &hf_tn5250_wssf_ifc_flag1_7
,
4125 static const int *ifc_byte2
[] = {
4126 &hf_tn5250_wssf_ifc_flag2_0
,
4127 &hf_tn5250_wssf_ifc_flag2_1
,
4128 &hf_tn5250_wssf_ifc_flag2_reserved
,
4129 &hf_tn5250_wssf_ifc_flag2_7
,
4133 static const int *ifd_byte
[] = {
4134 &hf_tn5250_wssf_ifd_flag1_0
,
4135 &hf_tn5250_wssf_ifd_flag1_reserved
,
4140 hf_items standard_fields
[] = {
4141 { hf_tn5250_sf_length
, 0, 2, 0, ENC_BIG_ENDIAN
},
4142 { hf_tn5250_sf_class
, 0, 1, 0, ENC_BIG_ENDIAN
},
4143 { hf_tn5250_sf_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
4147 hf_items wsc_customization_fields
[] = {
4148 { hf_tn5250_wssf_flag1
, 0, 1, 0, ENC_BIG_ENDIAN
},
4149 { hf_tn5250_wssf_flag2
, ett_tn5250_wssf_mask
, 1, byte
, 0 },
4153 hf_items wsc_image_control_fields
[] = {
4154 { hf_tn5250_wssf_ifc_flag1
, ett_tn5250_wssf_ifc_mask
, 1, ifc_byte
, 0 },
4155 { hf_tn5250_wssf_ifc_flag2
, ett_tn5250_wssf_ifc_mask
, 1, ifc_byte2
, 0 },
4156 { hf_tn5250_wssf_ifc_image_format
, 0, 2, 0, ENC_BIG_ENDIAN
},
4157 { hf_tn5250_wssf_ifc_viewport_location_row
, 0, 1, 0, ENC_BIG_ENDIAN
},
4158 { hf_tn5250_wssf_ifc_viewport_location_col
, 0, 1, 0, ENC_BIG_ENDIAN
},
4159 { hf_tn5250_wssf_ifc_viewport_size_row
, 0, 1, 0, ENC_BIG_ENDIAN
},
4160 { hf_tn5250_wssf_ifc_viewport_size_col
, 0, 1, 0, ENC_BIG_ENDIAN
},
4161 { hf_tn5250_wssf_ifc_scaling
, 0, 2, 0, ENC_BIG_ENDIAN
},
4162 { hf_tn5250_wssf_ifc_viewimage_location_row
, 0, 1, 0, ENC_BIG_ENDIAN
},
4163 { hf_tn5250_wssf_ifc_viewimage_location_col
, 0, 1, 0, ENC_BIG_ENDIAN
},
4164 { hf_tn5250_wssf_ifc_rotation
, 0, 2, 0, ENC_BIG_ENDIAN
},
4165 { hf_tn5250_wssf_ifc_foreground_color
, 0, 1, 0, ENC_BIG_ENDIAN
},
4166 { hf_tn5250_wssf_ifc_background_color
, 0, 1, 0, ENC_BIG_ENDIAN
},
4170 hf_items wsc_image_download_fields
[] = {
4171 { hf_tn5250_wssf_ifd_flag1
, ett_tn5250_wssf_ifd_mask
, 1, ifd_byte
, 0 },
4172 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4173 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4174 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4175 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4176 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4177 { hf_tn5250_length
, 0, 2, 0, ENC_BIG_ENDIAN
},
4181 length
= tvb_get_ntohs(tvb
,offset
);
4182 type
= tvb_get_guint8(tvb
, offset
+3);
4184 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, standard_fields
);
4186 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
4188 case WSC_CUSTOMIZATION
:
4189 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4190 wsc_customization_fields
);
4191 offset
+= dissect_write_single_structured_field_minor_fields(tn5250_tree
, tvb
, offset
);
4193 case IMAGE_FAX_CONTROL
:
4194 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4195 wsc_image_control_fields
);
4196 proto_tree_add_item(tn5250_tree
, hf_tn5250_wssf_ifc_imagefax_name
, tvb
, offset
,
4197 (length
- (start
+ offset
)), ENC_EBCDIC
|ENC_NA
);
4198 if (length
> (start
+ offset
))
4199 offset
+= (guint32
)(length
- (start
+ offset
));
4201 case IMAGE_FAX_DOWNLOAD
:
4202 namelength
= tvb_get_ntohs(tvb
,offset
+6);
4203 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4204 wsc_image_download_fields
);
4205 proto_tree_add_item(tn5250_tree
, hf_tn5250_wssf_ifd_imagefax_name
, tvb
, offset
,
4206 namelength
, ENC_EBCDIC
|ENC_NA
);
4207 offset
+= namelength
;
4208 proto_tree_add_item(tn5250_tree
, hf_tn5250_wssf_ifd_imagefax_data
, tvb
, offset
,
4209 (length
- (start
+ offset
)), ENC_NA
);
4210 if (length
> (start
+ offset
))
4211 offset
+= (guint32
)(length
- (start
+ offset
));
4213 case VIDEO_AUDIO_CONTROLS
:
4214 proto_tree_add_item(tn5250_tree
, hf_tn5250_vac_prefix
, tvb
, offset
,
4217 proto_tree_add_item(tn5250_tree
, hf_tn5250_vac_data
, tvb
, offset
,
4221 case TRUE_TRANSPARENCY_WRITE
:
4222 proto_tree_add_item(tn5250_tree
, hf_tn5250_wssf_ttw_flag
, tvb
, offset
,
4225 proto_tree_add_item(tn5250_tree
, hf_tn5250_wssf_ttw_data
, tvb
, offset
,
4226 (length
- (start
+ offset
)), ENC_NA
);
4227 if (length
> (start
+ offset
))
4228 offset
+= (guint32
)(length
- (start
+ offset
));
4235 offset
+= dissect_unknown_data(tn5250_tree
, tvb
, offset
, start
, length
);
4237 return (offset
- start
);
4240 /* 15.27 WRITE STRUCTURED FIELD Command */
4242 dissect_write_structured_field(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
4245 guint16 sf_length
= 0;
4246 int length
, type
, done
= 0, used
= 0;
4248 hf_items standard_fields
[] = {
4249 { hf_tn5250_sf_length
, 0, 2, 0, ENC_BIG_ENDIAN
},
4250 { hf_tn5250_sf_class
, 0, 1, 0, ENC_BIG_ENDIAN
},
4251 { hf_tn5250_sf_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
4255 static const int *qss_byte1
[] = {
4256 &hf_tn5250_wsf_qss_flag1_0
,
4257 &hf_tn5250_wsf_qss_flag1_reserved
,
4261 static const int *qss_byte2
[] = {
4262 &hf_tn5250_wsf_qss_flag2_reserved
,
4263 &hf_tn5250_wsf_qss_flag2_7
,
4267 hf_items qss_fields
[] = {
4268 { hf_tn5250_wsf_qss_flag1
, ett_tn5250_wsf_qss_mask
, 1, qss_byte1
, 0 },
4269 { hf_tn5250_wsf_qss_flag2
, ett_tn5250_wsf_qss_mask
, 1, qss_byte2
, 0 },
4273 hf_items dawt_fields
[] = {
4274 { hf_tn5250_dawt_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4275 { hf_tn5250_dawt_char
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
4279 hf_items dckf_fields
[] = {
4280 { hf_tn5250_dckf_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4281 { hf_tn5250_dckf_key_code
, 0, 1, 0, ENC_BIG_ENDIAN
},
4282 { hf_tn5250_dckf_function_code
, 0, 1, 0, ENC_BIG_ENDIAN
},
4286 static const int *rts_byte1
[] = {
4287 &hf_tn5250_rts_flag1_0
,
4288 &hf_tn5250_rts_flag1_reserved
,
4292 hf_items rts_fields
[] = {
4293 { hf_tn5250_rts_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4294 { hf_tn5250_rts_flag1
, ett_tn5250_wsf_rts_mask
, 1, rts_byte1
, 0 },
4295 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4296 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4300 static const int *dpo_byte1
[] = {
4301 &hf_tn5250_dpo_flag1_0
,
4302 &hf_tn5250_dpo_flag1_1
,
4303 &hf_tn5250_dpo_flag1_2
,
4304 &hf_tn5250_dpo_flag1_3
,
4305 &hf_tn5250_dpo_flag1_4
,
4306 &hf_tn5250_dpo_flag1_5
,
4307 &hf_tn5250_dpo_flag1_6
,
4308 &hf_tn5250_dpo_flag1_7
,
4312 static const int *dpo_byte2
[] = {
4313 &hf_tn5250_dpo_flag2_0
,
4314 &hf_tn5250_dpo_flag2_reserved
,
4318 hf_items dpo_fields
[] = {
4319 { hf_tn5250_dpo_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4320 { hf_tn5250_dpo_flag1
, ett_tn5250_wsf_dpo_mask
, 1, dpo_byte1
, 0 },
4321 { hf_tn5250_dpo_flag2
, ett_tn5250_wsf_dpo_mask
, 1, dpo_byte2
, 0 },
4322 { hf_tn5250_dpo_displace_characters
, 0, 3, 0, ENC_EBCDIC
|ENC_NA
},
4323 { hf_tn5250_dpo_start_location_row
, 0, 2, 0, ENC_BIG_ENDIAN
},
4324 { hf_tn5250_dpo_start_location_col
, 0, 2, 0, ENC_BIG_ENDIAN
},
4328 static const int *dtsf_byte1
[] = {
4329 &hf_tn5250_dtsf_flag1_0
,
4330 &hf_tn5250_dtsf_flag1_1
,
4331 &hf_tn5250_dtsf_flag1_2
,
4332 &hf_tn5250_dtsf_flag1_3
,
4333 &hf_tn5250_dtsf_flag1_4
,
4334 &hf_tn5250_dtsf_flag1_5
,
4335 &hf_tn5250_dtsf_flag1_6
,
4336 &hf_tn5250_dtsf_flag1_7
,
4340 static const int *dtsf_byte2
[] = {
4341 &hf_tn5250_dtsf_flag2_0
,
4342 &hf_tn5250_dtsf_flag2_1
,
4343 &hf_tn5250_dtsf_flag2_2
,
4344 &hf_tn5250_dtsf_flag2_3
,
4345 &hf_tn5250_dtsf_flag2_4to7
,
4349 hf_items dtsf_fields
[] = {
4350 { hf_tn5250_dtsf_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4351 { hf_tn5250_dtsf_flag1
, ett_tn5250_wsf_dtsf_mask
, 1, dtsf_byte1
, 0 },
4352 { hf_tn5250_dtsf_flag2
, ett_tn5250_wsf_dtsf_mask
, 1, dtsf_byte2
, 0 },
4353 { hf_tn5250_dtsf_text_body_height
, 0, 2, 0, ENC_BIG_ENDIAN
},
4354 { hf_tn5250_dtsf_text_body_width
, 0, 2, 0, ENC_BIG_ENDIAN
},
4355 { hf_tn5250_dtsf_line_cmd_field_size
, 0, 1, 0, ENC_BIG_ENDIAN
},
4356 { hf_tn5250_dtsf_location_of_pitch
, 0, 1, 0, ENC_BIG_ENDIAN
},
4357 { hf_tn5250_dtsf_first_line
, 0, 1, 0, ENC_BIG_ENDIAN
},
4361 static const int *dsl_byte1
[] = {
4362 &hf_tn5250_dsl_flag1_0
,
4363 &hf_tn5250_dsl_flag1_1
,
4364 &hf_tn5250_dsl_flag1_2
,
4365 &hf_tn5250_dsl_flag1_reserved
,
4369 hf_items dsl_fields
[] = {
4370 { hf_tn5250_dsl_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4371 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4372 { hf_tn5250_dsl_rtl_offset
, 0, 1, 0, ENC_BIG_ENDIAN
},
4373 { hf_tn5250_dsl_offset
, 0, 1, 0, ENC_BIG_ENDIAN
},
4377 hf_items dsl_fields2
[] = {
4378 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4379 { hf_tn5250_dsl_flag1
, ett_tn5250_wsf_dsl_mask
, 1, dsl_byte1
, 0 },
4380 { hf_tn5250_dsl_id
, 0, 1, 0, ENC_BIG_ENDIAN
},
4381 { hf_tn5250_dsl_location
, 0, 1, 0, ENC_BIG_ENDIAN
},
4382 { hf_tn5250_dsl_function
, 0, 1, 0, ENC_BIG_ENDIAN
},
4386 static const int *wts_byte1
[] = {
4387 &hf_tn5250_wts_flag1_0
,
4388 &hf_tn5250_wts_flag1_1
,
4389 &hf_tn5250_wts_flag1_2
,
4390 &hf_tn5250_wts_flag1_3
,
4391 &hf_tn5250_wts_flag1_reserved
,
4395 static const int *wts_byte2
[] = {
4396 &hf_tn5250_wts_flag2_reserved
,
4397 &hf_tn5250_wts_flag2_6
,
4398 &hf_tn5250_wts_flag2_reserved2
,
4402 static const int *wts_byte3
[] = {
4403 &hf_tn5250_wts_flag3_0
,
4404 &hf_tn5250_wts_flag3_1
,
4405 &hf_tn5250_wts_flag3_2
,
4406 &hf_tn5250_wts_flag3_3
,
4407 &hf_tn5250_wts_flag3_4
,
4408 &hf_tn5250_wts_flag3_5
,
4409 &hf_tn5250_wts_flag3_6
,
4410 &hf_tn5250_wts_flag3_7
,
4414 hf_items wts_fields
[] = {
4415 { hf_tn5250_wts_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4416 { hf_tn5250_wts_flag1
, ett_tn5250_wts_mask
, 1, wts_byte1
, 0 },
4417 { hf_tn5250_wts_flag2
, ett_tn5250_wts_mask
, 1, wts_byte2
, 0 },
4418 { hf_tn5250_wts_flag3
, ett_tn5250_wts_mask
, 1, wts_byte3
, 0 },
4419 { hf_tn5250_wts_home_position_row
, 0, 2, 0, ENC_BIG_ENDIAN
},
4420 { hf_tn5250_wts_home_position_col
, 0, 2, 0, ENC_BIG_ENDIAN
},
4424 static const int *wts_cld_byte1
[] = {
4425 &hf_tn5250_wts_cld_flag1_0
,
4426 &hf_tn5250_wts_cld_flag1_1
,
4427 &hf_tn5250_wts_cld_flag1_2
,
4428 &hf_tn5250_wts_cld_flag1_3
,
4429 &hf_tn5250_wts_cld_flag1_4
,
4430 &hf_tn5250_wts_cld_flag1_5
,
4431 &hf_tn5250_wts_cld_flag1_6
,
4432 &hf_tn5250_wts_cld_flag1_7
,
4436 static const int *wts_cld_byte2
[] = {
4437 &hf_tn5250_wts_cld_flag2_0
,
4438 &hf_tn5250_wts_cld_flag2_1
,
4439 &hf_tn5250_wts_cld_flag2_2
,
4440 &hf_tn5250_wts_cld_flag2_3
,
4441 &hf_tn5250_wts_cld_flag2_4
,
4442 &hf_tn5250_wts_cld_flag2_line_spacing
,
4446 static const int *wts_cld_byte3
[] = {
4447 &hf_tn5250_wts_cld_flag3_0
,
4448 &hf_tn5250_wts_cld_flag3_1
,
4449 &hf_tn5250_wts_cld_flag3_2
,
4450 &hf_tn5250_wts_cld_flag3_3
,
4451 &hf_tn5250_wts_cld_flag3_4
,
4452 &hf_tn5250_wts_cld_flag3_5
,
4453 &hf_tn5250_wts_cld_flag3_6
,
4454 &hf_tn5250_wts_cld_flag3_7
,
4458 hf_items wts_line_data_fields
[] = {
4459 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
}, /*FIXME: Could be one or two bytes! */
4460 { hf_tn5250_wts_cld_flag1
, ett_tn5250_wts_mask
, 1, wts_cld_byte1
, 0 },
4461 { hf_tn5250_wts_cld_flag2
, ett_tn5250_wts_mask
, 1, wts_cld_byte2
, 0 },
4462 { hf_tn5250_wts_cld_row
, 0, 2, 0, ENC_BIG_ENDIAN
},
4463 { hf_tn5250_wts_cld_flag3
, ett_tn5250_wts_mask
, 1, wts_cld_byte3
, 0 },
4464 { hf_tn5250_wts_cld_page_num
, 0, 2, 0, ENC_BIG_ENDIAN
},
4465 { hf_tn5250_wts_cld_lmo
, 0, 1, 0, ENC_BIG_ENDIAN
},
4466 { hf_tn5250_wts_cld_io
, 0, 1, 0, ENC_BIG_ENDIAN
},
4467 { hf_tn5250_wts_cld_sli
, 0, 1, 0, ENC_BIG_ENDIAN
},
4472 hf_items dsc_fields
[] = {
4473 { hf_tn5250_dsc_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4474 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4475 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4476 { hf_tn5250_dsc_sk
, 0, 1, 0, ENC_BIG_ENDIAN
},
4477 { hf_tn5250_dsc_ev
, 0, 1, 0, ENC_EBCDIC
|ENC_NA
},
4481 hf_items dorm_fields
[] = {
4482 { hf_tn5250_dorm_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4483 { hf_tn5250_dorm_ec
, 0, 2, 0, ENC_BIG_ENDIAN
},
4488 static const int *dfdpck_coreflag
[] = {
4489 &hf_tn5250_dfdpck_coreflag_0
,
4490 &hf_tn5250_dfdpck_coreflag_1
,
4491 &hf_tn5250_dfdpck_coreflag_2
,
4492 &hf_tn5250_dfdpck_coreflag_3
,
4493 &hf_tn5250_dfdpck_coreflag_4
,
4494 &hf_tn5250_dfdpck_coreflag_5
,
4495 &hf_tn5250_dfdpck_coreflag_6
,
4496 &hf_tn5250_dfdpck_coreflag_7
,
4500 static const int *dfdpck_toprowflag1
[] = {
4501 &hf_tn5250_dfdpck_toprowflag1_0
,
4502 &hf_tn5250_dfdpck_toprowflag1_1
,
4503 &hf_tn5250_dfdpck_toprowflag1_2
,
4504 &hf_tn5250_dfdpck_toprowflag1_3
,
4505 &hf_tn5250_dfdpck_toprowflag1_4
,
4506 &hf_tn5250_dfdpck_toprowflag1_5
,
4507 &hf_tn5250_dfdpck_toprowflag1_6
,
4508 &hf_tn5250_dfdpck_toprowflag1_7
,
4512 static const int *dfdpck_toprowflag2
[] = {
4513 &hf_tn5250_dfdpck_toprowflag2_0
,
4514 &hf_tn5250_dfdpck_toprowflag2_1
,
4515 &hf_tn5250_dfdpck_toprowflag2_2
,
4516 &hf_tn5250_dfdpck_toprowflag2_3
,
4517 &hf_tn5250_dfdpck_toprowflag2_4
,
4518 &hf_tn5250_dfdpck_toprowflag2_5
,
4519 &hf_tn5250_dfdpck_toprowflag2_6
,
4520 &hf_tn5250_dfdpck_toprowflag2_7
,
4524 static const int *dfdpck_toprowflag3
[] = {
4525 &hf_tn5250_dfdpck_toprowflag3_0
,
4526 &hf_tn5250_dfdpck_toprowflag3_1
,
4527 &hf_tn5250_dfdpck_toprowflag3_2
,
4528 &hf_tn5250_dfdpck_toprowflag3_3
,
4529 &hf_tn5250_dfdpck_toprowflag3_4
,
4530 &hf_tn5250_dfdpck_toprowflag3_5
,
4531 &hf_tn5250_dfdpck_toprowflag3_6
,
4532 &hf_tn5250_dfdpck_toprowflag3_7
,
4536 hf_items dfdpck_fields
[] = {
4537 { hf_tn5250_dfdpck_partition
, 0, 1, 0, ENC_BIG_ENDIAN
},
4538 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4539 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4543 hf_items dfdpck_core_area_fields
[] = {
4544 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4545 { hf_tn5250_dfdpck_data_field
, 0, 1, 0, ENC_BIG_ENDIAN
},
4546 { hf_tn5250_dfdpck_coreflag
, ett_tn5250_dfdpck_mask
, 1, dfdpck_coreflag
, 0 },
4547 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4551 hf_items dfdpck_top_row_fields
[] = {
4552 { hf_tn5250_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4553 { hf_tn5250_dfdpck_data_field
, 0, 1, 0, ENC_BIG_ENDIAN
},
4554 { hf_tn5250_dfdpck_toprowflag1
, ett_tn5250_dfdpck_mask
, 1, dfdpck_toprowflag1
, 0 },
4555 { hf_tn5250_dfdpck_toprowflag2
, ett_tn5250_dfdpck_mask
, 1, dfdpck_toprowflag2
, 0 },
4556 { hf_tn5250_dfdpck_toprowflag3
, ett_tn5250_dfdpck_mask
, 1, dfdpck_toprowflag3
, 0 },
4557 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4561 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
4562 sf_length
= tvb_get_ntohs(tvb
,offset
);
4563 type
= tvb_get_guint8(tvb
, offset
+3);
4565 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, standard_fields
);
4569 proto_tree_add_item(tn5250_tree
, hf_tn5250_field_data
, tvb
, offset
,
4570 (sf_length
- (start
+ offset
)), ENC_EBCDIC
|ENC_NA
);
4571 offset
+= (guint32
)(sf_length
- (start
+ offset
));
4574 proto_tree_add_item(tn5250_tree
, hf_tn5250_reserved
, tvb
, offset
,
4578 case TN5250_QUERY_STATION_STATE
:
4579 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, qss_fields
);
4581 case DEFINE_AUDIT_WINDOW__TABLE
:
4582 proto_tree_add_item(tn5250_tree
, hf_tn5250_dawt_id
, tvb
, offset
,
4584 while ((offset
- start
) < sf_length
) {
4585 length
= tvb_get_guint8(tvb
,offset
);
4586 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, dawt_fields
);
4587 proto_tree_add_item(tn5250_tree
, hf_tn5250_dawt_message
, tvb
, offset
,
4588 (length
- 2), ENC_EBCDIC
|ENC_NA
);
4592 case DEFINE_COMMAND_KEY_FUNCTION
:
4593 proto_tree_add_item(tn5250_tree
, hf_tn5250_dckf_id
, tvb
, offset
,
4595 while ((offset
- start
) < sf_length
) {
4596 length
= tvb_get_guint8(tvb
,offset
);
4597 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4599 proto_tree_add_item(tn5250_tree
, hf_tn5250_dckf_prompt_text
, tvb
,
4600 offset
, (length
- 2), ENC_EBCDIC
|ENC_NA
);
4604 case READ_TEXT_SCREEN
:
4605 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, rts_fields
);
4607 case DEFINE_PENDING_OPERATIONS
:
4608 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, dpo_fields
);
4610 case DEFINE_TEXT_SCREEN_FORMAT
:
4611 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, dtsf_fields
);
4613 case DEFINE_SCALE_LINE
:
4614 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, dsl_fields
);
4615 while ((offset
- start
) < sf_length
) {
4616 /* XXX length unused
4617 length = tvb_get_guint8(tvb,offset); */
4618 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, dsl_fields2
);
4621 case WRITE_TEXT_SCREEN
:
4622 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4624 length
= tvb_get_guint8(tvb
,offset
);
4625 used
= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4626 wts_line_data_fields
);
4628 proto_tree_add_item(tn5250_tree
, hf_tn5250_wts_cld_li
, tvb
, offset
,
4629 (length
- used
), ENC_EBCDIC
|ENC_NA
);
4631 case DEFINE_SPECIAL_CHARACTERS
:
4632 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4635 case DEFINE_OPERATOR_ERROR_MESSAGES
:
4636 proto_tree_add_item(tn5250_tree
, hf_tn5250_dorm_id
, tvb
, offset
,
4638 while ((offset
- start
) < sf_length
) {
4639 length
= tvb_get_guint8(tvb
,offset
);
4640 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4642 proto_tree_add_item(tn5250_tree
, hf_tn5250_dorm_mt
, tvb
, offset
,
4643 (length
- 2), ENC_EBCDIC
|ENC_NA
);
4647 case DEFINE_PITCH_TABLE
:
4648 proto_tree_add_item(tn5250_tree
, hf_tn5250_dpt_id
, tvb
, offset
,
4650 while ((offset
- start
) < sf_length
) {
4651 length
= tvb_get_guint8(tvb
,offset
);
4652 proto_tree_add_item(tn5250_tree
, hf_tn5250_length
, tvb
, offset
,
4654 proto_tree_add_item(tn5250_tree
, hf_tn5250_dpt_ec
, tvb
, offset
,
4655 length
, ENC_EBCDIC
|ENC_NA
);
4659 case DEFINE_FAKE_DP_COMMAND_KEY_FUNCTION
:
4660 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4662 while ((offset
- start
) < sf_length
) {
4663 length
= tvb_get_guint8(tvb
,offset
);
4664 type
= tvb_get_guint8(tvb
,offset
+1);
4665 if (type
== CORE_AREA_COMMAND_KEYS
) {
4666 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4667 dfdpck_core_area_fields
);
4668 } else if (type
== TOP_ROW_COMMAND_KEYS
) {
4669 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
,
4670 dfdpck_top_row_fields
);
4672 offset
+= dissect_unknown_data(tn5250_tree
, tvb
, offset
, start
, length
);
4682 offset
+= dissect_unknown_data(tn5250_tree
, tvb
, offset
, start
, sf_length
);
4684 return (offset
- start
);
4687 /* 15.27.2 5250 Query Command - Response */
4688 /*TN5250 - RFC1205 - Query Reply Fields */
4690 dissect_query_reply(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
4694 static const int *byte
[] = {
4695 &hf_tn5250_qr_flag_0
,
4696 &hf_tn5250_qr_flag_reserved
,
4700 static const int *byte1
[] = {
4701 &hf_tn5250_qr_flag1_0
,
4702 &hf_tn5250_qr_flag1_1
,
4703 &hf_tn5250_qr_flag1_2
,
4704 &hf_tn5250_qr_flag1_3
,
4705 &hf_tn5250_qr_flag1_4
,
4706 &hf_tn5250_qr_flag1_5
,
4707 &hf_tn5250_qr_flag1_6
,
4708 &hf_tn5250_qr_flag1_7
,
4712 static const int *byte2
[] = {
4713 &hf_tn5250_qr_flag2_0to3
,
4714 &hf_tn5250_qr_flag2_4
,
4715 &hf_tn5250_qr_flag2_5
,
4716 &hf_tn5250_qr_flag2_6to7
,
4720 hf_items qr_fields
[] = {
4721 { hf_tn5250_sf_length
, 0, 2, 0, ENC_BIG_ENDIAN
},
4722 { hf_tn5250_sf_class
, 0, 1, 0, ENC_BIG_ENDIAN
},
4723 { hf_tn5250_sf_type
, 0, 1, 0, ENC_BIG_ENDIAN
},
4724 { hf_tn5250_qr_flag
, ett_tn5250_qr_mask
, 1, byte
, 0 },
4725 { hf_tn5250_qr_chc
, 0, 2, 0, ENC_BIG_ENDIAN
},
4726 { hf_tn5250_qr_ccl
, 0, 3, 0, ENC_BIG_ENDIAN
},
4727 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4728 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4729 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4730 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4731 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4732 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4733 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4734 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4735 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4736 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4737 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4738 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4739 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4740 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4741 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4742 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4743 { hf_tn5250_qr_dt
, 0, 1, 0, ENC_BIG_ENDIAN
},
4744 { hf_tn5250_qr_dtc
, 0, 4, 0, ENC_EBCDIC
|ENC_NA
},
4745 { hf_tn5250_qr_dm
, 0, 3, 0, ENC_EBCDIC
|ENC_NA
},
4746 { hf_tn5250_qr_ki
, 0, 1, 0, ENC_BIG_ENDIAN
},
4747 { hf_tn5250_qr_eki
, 0, 1, 0, ENC_BIG_ENDIAN
},
4748 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4749 { hf_tn5250_qr_dsn
, 0, 4, 0, ENC_BIG_ENDIAN
},
4750 { hf_tn5250_qr_mni
, 0, 2, 0, ENC_BIG_ENDIAN
},
4751 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4752 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4753 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4754 { hf_tn5250_qr_flag1
, ett_tn5250_qr_mask
, 1, byte1
, 0 },
4755 { hf_tn5250_qr_flag2
, ett_tn5250_qr_mask
, 1, byte2
, 0 },
4756 { hf_tn5250_qr_flag3
, 0, 1, 0, ENC_BIG_ENDIAN
},
4757 { hf_tn5250_qr_flag4
, 0, 1, 0, ENC_BIG_ENDIAN
},
4758 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4759 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4760 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4761 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4762 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4763 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4764 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4765 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4770 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, qr_fields
);
4772 return (offset
- start
);
4775 /* End: Handle WCC, Orders and Data */
4779 dissect_tn5250_header(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
4785 static const int *byte
[] = {
4786 &hf_tn5250_ds_output_error
,
4787 &hf_tn5250_attn_key
,
4788 &hf_tn5250_sys_request_key
,
4789 &hf_tn5250_test_request_key
,
4790 &hf_tn5250_error_state
,
4794 hf_items fields
[] = {
4795 { hf_tn5250_logical_record_length
, 0, 2, 0, ENC_BIG_ENDIAN
},
4796 { hf_tn5250_sna_record_type
, 0, 2, 0, ENC_BIG_ENDIAN
},
4797 { hf_tn5250_reserved
, 0, 2, 0, ENC_BIG_ENDIAN
},
4798 { hf_tn5250_variable_record_length
, 0, 1, 0, ENC_BIG_ENDIAN
},
4799 { hf_tn5250_header_flags
, ett_tn5250_header_flags
, 1, byte
, 0 },
4800 { hf_tn5250_reserved
, 0, 1, 0, ENC_BIG_ENDIAN
},
4801 { hf_tn5250_operation_code
, 0, 1, 0, ENC_BIG_ENDIAN
},
4805 error_flag
= tvb_get_guint8(tvb
, offset
+8);
4807 offset
+= tn5250_add_hf_items(tn5250_tree
, tvb
, offset
, fields
);
4809 if (error_flag
& 0x02) { /*HLP*/
4810 proto_tree_add_item(tn5250_tree
, hf_tn5250_error_code
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4813 return (offset
- start
);
4818 /* Detect and Handle Direction of Stream */
4820 dissect_tn5250_data_until_next_command(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
4822 gint order_code
, done
= 0;
4823 gint start
= offset
;
4825 while (tvb_reported_length_remaining(tvb
, offset
) > 0 && !done
) {
4826 order_code
= tvb_get_guint8(tvb
, offset
);
4827 switch (order_code
) {
4829 case CLEAR_FORMAT_TABLE
:
4830 case CLEAR_UNIT_ALTERNATE
:
4831 case WRITE_TO_DISPLAY
:
4832 case WRITE_ERROR_CODE
:
4833 case RESTORE_SCREEN
:
4834 case WRITE_ERROR_CODE_TO_WINDOW
:
4835 case READ_INPUT_FIELDS
:
4836 case READ_MDT_FIELDS
:
4837 case READ_MDT_ALTERNATE
:
4839 case READ_SCREEN_WITH_EXTENDED_ATTRIBUTES
:
4840 case READ_SCREEN_TO_PRINT
:
4841 case READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES
:
4842 case READ_SCREEN_TO_PRINT_WITH_GRIDLINES
:
4843 case READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES_AND_GRIDLINES
:
4844 case READ_IMMEDIATE
:
4845 case READ_MODIFIED_IMMEDIATE_ALTERNATE
:
4847 case SAVE_PARTIAL_SCREEN
:
4848 case RESTORE_PARTIAL_SCREEN
:
4850 case WRITE_SINGLE_STRUCTURED_FIELD
:
4851 case WRITE_STRUCTURED_FIELD
:
4852 case COPY_TO_PRINTER
:
4861 if (offset
> start
) {
4862 proto_tree_add_item(tn5250_tree
, hf_tn5250_field_data
,
4863 tvb
, start
, (offset
- start
), ENC_EBCDIC
|ENC_NA
);
4866 return (offset
- start
);
4871 dissect_outbound_stream(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
)
4874 gint start
= offset
, length
= 0;
4875 proto_tree
*cc_tree
;
4879 ti
= proto_tree_add_item(tn5250_tree
, hf_tn5250_escape_code
, tvb
, offset
, 1,
4882 cc_tree
= proto_item_add_subtree(ti
, ett_cc
);
4885 command_code
= tvb_get_guint8(tvb
, offset
);
4886 switch (command_code
) {
4888 case CLEAR_FORMAT_TABLE
:
4889 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4893 case CLEAR_UNIT_ALTERNATE
:
4894 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4897 proto_tree_add_item(cc_tree
, hf_tn5250_cua_parm
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4900 case WRITE_TO_DISPLAY
:
4901 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4905 offset
+= dissect_wcc(cc_tree
, tvb
, offset
);
4906 offset
+= dissect_tn5250_orders_and_data(cc_tree
, tvb
, offset
);
4908 case WRITE_ERROR_CODE
:
4909 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
,
4910 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4912 /* Check for the optional TN5250_IC */
4913 offset
+= dissect_tn5250_orders_and_data(cc_tree
, tvb
, offset
);
4914 /* Add Field Data */
4915 proto_tree_add_item(cc_tree
, hf_tn5250_fa
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4917 proto_tree_add_item(cc_tree
, hf_tn5250_field_data
, tvb
, offset
,
4918 tvb_reported_length_remaining(tvb
, offset
) - 1,
4920 offset
+= (guint32
)(tvb_reported_length_remaining(tvb
, offset
) - 1);
4921 proto_tree_add_item(cc_tree
, hf_tn5250_fa
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4924 case RESTORE_SCREEN
:
4925 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4928 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
4929 offset
+= dissect_outbound_stream(cc_tree
, tvb
, offset
);
4932 case WRITE_ERROR_CODE_TO_WINDOW
:
4933 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4936 proto_tree_add_item(cc_tree
, hf_tn5250_wectw_start_column
, tvb
, offset
,
4939 proto_tree_add_item(cc_tree
, hf_tn5250_wectw_end_column
, tvb
, offset
, 1,
4943 case READ_INPUT_FIELDS
:
4944 case READ_MDT_FIELDS
:
4945 case READ_MDT_ALTERNATE
:
4946 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4949 offset
+= dissect_wcc(cc_tree
, tvb
, offset
);
4952 case READ_SCREEN_WITH_EXTENDED_ATTRIBUTES
:
4953 case READ_SCREEN_TO_PRINT
:
4954 case READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES
:
4955 case READ_SCREEN_TO_PRINT_WITH_GRIDLINES
:
4956 case READ_SCREEN_TO_PRINT_WITH_EXTENDED_ATTRIBUTES_AND_GRIDLINES
:
4957 case READ_IMMEDIATE
:
4958 case READ_MODIFIED_IMMEDIATE_ALTERNATE
:
4960 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4964 case SAVE_PARTIAL_SCREEN
:
4965 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4968 offset
+= dissect_save_partial_screen(cc_tree
, tvb
, offset
);
4970 case RESTORE_PARTIAL_SCREEN
:
4971 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4974 length
= tvb_get_ntohs(tvb
, offset
);
4975 proto_tree_add_item(cc_tree
, hf_tn5250_length_twobyte
, tvb
, offset
, 2,
4978 offset
+= dissect_tn5250_orders_and_data(cc_tree
, tvb
, offset
);
4979 proto_tree_add_item(cc_tree
, hf_tn5250_field_data
, tvb
, offset
,
4980 (length
- 2), ENC_EBCDIC
|ENC_NA
);
4984 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4987 offset
+= dissect_roll(cc_tree
, tvb
, offset
);
4989 case WRITE_SINGLE_STRUCTURED_FIELD
:
4990 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4993 offset
+= dissect_write_single_structured_field(cc_tree
, tvb
, offset
);
4995 case WRITE_STRUCTURED_FIELD
:
4996 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
4999 offset
+= dissect_write_structured_field(cc_tree
, tvb
, offset
);
5001 case COPY_TO_PRINTER
:
5002 proto_tree_add_item(cc_tree
, hf_tn5250_command_code
, tvb
, offset
, 1,
5005 proto_tree_add_item(cc_tree
, hf_tn5250_ctp_lsid
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5007 proto_tree_add_item(cc_tree
, hf_tn5250_ctp_mlpp
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5011 proto_tree_add_text(cc_tree
, tvb
, offset
, 1, "Bogus value: %u", command_code
);
5016 return (offset
- start
);
5020 dissect_inbound_stream(proto_tree
*tn5250_tree
, tvbuff_t
*tvb
, gint offset
, gint sna_flag
)
5022 gint start
= offset
, aid
;
5026 if (sna_flag
& 0x01) { /* Stream contains error code */
5027 proto_tree_add_item(tn5250_tree
, hf_tn5250_error_code
, tvb
, offset
, 2,
5030 return (offset
- start
);
5031 } else if (sna_flag
& 0x80) { /* Stream contains negative response */
5032 proto_tree_add_item(tn5250_tree
, hf_tn5250_negative_response
,
5033 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
5035 return (offset
- start
);
5038 aid
= tvb_get_guint8(tvb
,offset
+2);
5039 if (tn5250_is_valid_aid(aid
)) {
5041 case AID_IMAGE_FAX_REQUEST
:
5042 case AID_UNKNOWN_IMAGE_FAX_FORMAT
:
5043 case AID_IMAGE_FAX_ERROR
:
5044 proto_tree_add_item(tn5250_tree
, hf_tn5250_image_fax_error
, tvb
, offset
,
5049 /*Response must be a normal row/col, aid, field data response */
5050 offset
+= dissect_row_column(tn5250_tree
, tvb
, offset
);
5054 proto_tree_add_item(tn5250_tree
, hf_tn5250_aid
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5057 if (aid
== AID_INBOUND_WRITE_STRUCTURED_FIELD
) {
5058 offset
+= dissect_query_reply(tn5250_tree
, tvb
, offset
);
5059 return (offset
- start
);
5061 /* Check for a response containing order codes */
5062 offset
+= dissect_tn5250_orders_and_data(tn5250_tree
, tvb
, offset
);
5064 /* FIXME: need to know when escape/commands are expected. */
5065 /* Check the response data for commands */
5066 if (tvb_get_guint8(tvb
,offset
) == TN5250_ESCAPE
) {
5067 commands
= dissect_outbound_stream(tn5250_tree
, tvb
, offset
);
5068 /* It if contained commands then we're done. Anything else is unexpected data */
5071 if (tvb_reported_length_remaining(tvb
, offset
)) {
5072 proto_tree_add_item(tn5250_tree
, hf_tn5250_unknown_data
, tvb
, offset
,
5073 tvb_reported_length_remaining(tvb
, offset
), ENC_NA
);
5074 offset
+= tvb_reported_length_remaining(tvb
, offset
);
5076 return (offset
- start
);
5081 /* Anything else is unformatted field data */
5082 if (tvb_reported_length_remaining(tvb
, offset
)) {
5083 proto_tree_add_item(tn5250_tree
, hf_tn5250_field_data
, tvb
, offset
,
5084 tvb_reported_length_remaining(tvb
, offset
),
5086 offset
+= tvb_reported_length_remaining(tvb
, offset
);
5089 return (offset
- start
);
5093 dissect_tn5250(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
5095 proto_tree
*tn5250_tree
;
5098 conversation_t
*conversation
;
5099 tn5250_conv_info_t
*tn5250_info
= NULL
;
5102 pinfo
->fd
->flags
.encoding
= PACKET_CHAR_ENC_CHAR_EBCDIC
;
5104 /* Do we have a conversation for this connection? */
5105 conversation
= find_conversation(pinfo
->fd
->num
, &pinfo
->src
, &pinfo
->dst
,
5106 pinfo
->ptype
, pinfo
->srcport
,
5107 pinfo
->destport
, 0);
5108 if (conversation
!= NULL
) {
5109 /* Do we already have a type and mechanism? */
5110 tn5250_info
= (tn5250_conv_info_t
*)conversation_get_proto_data(conversation
, proto_tn5250
);
5116 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "TN5250");
5118 ti
= proto_tree_add_item(tree
, proto_tn5250
, tvb
, offset
, -1, ENC_NA
);
5119 tn5250_tree
= proto_item_add_subtree(ti
, ett_tn5250
);
5120 if (pinfo
->srcport
== tn5250_info
->outbound_port
) {
5121 col_set_str(pinfo
->cinfo
, COL_INFO
, "TN5250 Data from Mainframe");
5123 col_set_str(pinfo
->cinfo
, COL_INFO
, "TN5250 Data to Mainframe");
5127 sna_flag
= tvb_get_ntohs(tvb
, offset
+6);
5128 offset
+= dissect_tn5250_header(tn5250_tree
, tvb
, offset
);
5130 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
5131 if (pinfo
->srcport
== tn5250_info
->outbound_port
) {
5132 offset
+= dissect_outbound_stream(tn5250_tree
, tvb
, offset
);
5134 offset
+= dissect_inbound_stream(tn5250_tree
, tvb
, offset
, sna_flag
);
5142 add_tn5250_conversation(packet_info
*pinfo
, int tn5250e
)
5144 conversation_t
*conversation
;
5145 tn5250_conv_info_t
*tn5250_info
= NULL
;
5147 conversation
= find_or_create_conversation(pinfo
);
5150 * Do we already have a type and mechanism?
5152 tn5250_info
= (tn5250_conv_info_t
*)conversation_get_proto_data(conversation
, proto_tn5250
);
5153 if (tn5250_info
== NULL
) {
5154 /* No. Attach that information to the conversation, and add
5155 * it to the list of information structures.
5157 tn5250_info
= wmem_new(wmem_file_scope(), tn5250_conv_info_t
);
5158 SE_COPY_ADDRESS(&(tn5250_info
->outbound_addr
),&(pinfo
->dst
));
5159 tn5250_info
->outbound_port
= pinfo
->destport
;
5160 SE_COPY_ADDRESS(&(tn5250_info
->inbound_addr
),&(pinfo
->src
));
5161 tn5250_info
->inbound_port
= pinfo
->srcport
;
5162 conversation_add_proto_data(conversation
, proto_tn5250
, tn5250_info
);
5163 tn5250_info
->next
= tn5250_info_items
;
5164 tn5250_info_items
= tn5250_info
;
5167 tn5250_info
->extended
= tn5250e
;
5172 find_tn5250_conversation(packet_info
*pinfo
)
5174 conversation_t
*conversation
= NULL
;
5175 tn5250_conv_info_t
*tn5250_info
= NULL
;
5178 * Do we have a conversation for this connection?
5180 conversation
= find_conversation(pinfo
->fd
->num
, &pinfo
->src
, &pinfo
->dst
,
5181 pinfo
->ptype
, pinfo
->srcport
,
5182 pinfo
->destport
, 0);
5184 if (conversation
!= NULL
) {
5185 tn5250_info
= (tn5250_conv_info_t
*)conversation_get_proto_data(conversation
, proto_tn5250
);
5187 if (tn5250_info
!= NULL
) {
5189 * Do we already have a type and mechanism?
5198 proto_register_tn5250(void)
5200 static hf_register_info hf
[] = {
5201 { &hf_tn5250_escape_code
,
5202 { "Escape Code", "tn5250.escape_code",
5203 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_escape_codes
), 0x0,
5205 { &hf_tn5250_command_code
,
5206 { "Command Code", "tn5250.command_code",
5207 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_command_codes
), 0x0,
5209 { &hf_tn5250_sf_length
,
5210 { "Structured Field Length", "tn5250.sf_length",
5211 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5213 { &hf_tn5250_sf_class
,
5214 { "Structured Field Class", "tn5250.class",
5215 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_sf_class
), 0,
5217 { &hf_tn5250_sf_type
,
5218 { "Structured Field Type", "tn5250.type",
5219 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_sf_type
), 0,
5222 /* 15.4 - Clear Unit Alternate Command Code*/
5223 { &hf_tn5250_cua_parm
,
5224 { "TN5250 CUA Parameter", "tn5250.cua_parm",
5225 FT_UINT16
, BASE_HEX
, VALS(vals_tn5250_cua_parms
), 0x0,
5228 /* 15.6 Write To Display Command Code */
5229 /* 15.6.1 WTD Control Code */
5230 { &hf_tn5250_wtd_ccc1
,
5231 {"Write To Display Command Control Character Byte 1", "tn5250.wtd_ccc1",
5233 VALS (vals_tn5250_wtd_cc_byteone
), CCBITS
, NULL
, HFILL
}},
5234 { &hf_tn5250_wtd_ccc2
,
5235 { "Write To Display Command Control Character Byte 2", "tn5250.wtd_ccc2",
5236 FT_UINT8
, BASE_HEX
, NULL
, 0,
5238 { &hf_tn5250_wtd_ccc2_res
,
5240 "tn5250.wtd_ccc_reserved", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
5241 { &hf_tn5250_wtd_ccc2_cursor
,
5242 { "Cursor does not move when keyboard unlocks",
5243 "tn5250.wtd_ccc_cursor", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
5244 { &hf_tn5250_wtd_ccc2_reset
,
5245 { "Reset blinking cursor",
5246 "tn5250.wtd_ccc_reset", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
5247 { &hf_tn5250_wtd_ccc2_set
,
5248 { "Set blinking cursor",
5249 "tn5250.wtd_ccc_set", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
5250 { &hf_tn5250_wtd_ccc2_unlock
,
5251 { "Unlock the keyboard and reset any pending AID bytes",
5252 "tn5250.wtd_ccc_unlock", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
5253 { &hf_tn5250_wtd_ccc2_alarm
,
5255 "tn5250.wtd_ccc_alarm", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
5256 { &hf_tn5250_wtd_ccc2_off
,
5257 { "Set Message Waiting indicator off",
5258 "tn5250.wtd_ccc_off", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
5259 { &hf_tn5250_wtd_ccc2_on
,
5260 { "Set Message Waiting indicator on",
5261 "tn5250.wtd_ccc_on", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
5264 /* 15.6.7 Repeat to Address Order */
5265 { &hf_tn5250_repeated_character
,
5266 { "Repeated Character", "tn5250.repeated_character",
5267 FT_STRING
, BASE_NONE
, NULL
, 0x0,
5270 /* 15.6.9 Start of Header Order */
5271 { &hf_tn5250_soh_length
,
5272 { "Length", "tn5250.soh_length",
5273 FT_UINT8
, BASE_DEC
, NULL
, 0,
5275 { &hf_tn5250_soh_flags
,
5276 { "Start of Header Flags", "tn5250.soh_flags",
5277 FT_UINT8
, BASE_HEX
, NULL
, 0,
5279 { &hf_tn5250_soh_cursor_direction
,
5280 { "Right To Left Screen-Level Cursor Direction", "tn5250.soh_cursor_direction",
5281 FT_BOOLEAN
, 8, NULL
, 0x80,
5283 { &hf_tn5250_soh_screen_reverse
,
5284 { "Automatic local screen reverse", "tn5250.soh_screen_reverse",
5285 FT_BOOLEAN
, 8, NULL
, 0x20,
5287 { &hf_tn5250_soh_input_capable_only
,
5288 { "The cursor is allowed to move only to input-capable positions", "tn5250.soh_input_capable_only",
5289 FT_BOOLEAN
, 8, NULL
, 0x10,
5292 { &hf_tn5250_soh_pf24to17
, { "Command Key Switch 1", "tn5250.soh_pf24to17",
5293 FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
5294 { &hf_tn5250_soh_pf24
, { "PF24", "tn5250.soh_pf24",
5295 FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
5296 { &hf_tn5250_soh_pf23
, { "PF22", "tn5250.soh_pf23",
5297 FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
5298 { &hf_tn5250_soh_pf22
, { "PF22", "tn5250.soh_pf22",
5299 FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
5300 { &hf_tn5250_soh_pf21
, { "PF21", "tn5250.soh_pf21",
5301 FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
5302 { &hf_tn5250_soh_pf20
, { "PF20", "tn5250.soh_pf20",
5303 FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
5304 { &hf_tn5250_soh_pf19
, { "PF19", "tn5250.soh_pf19",
5305 FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
5306 { &hf_tn5250_soh_pf18
, { "PF18", "tn5250.soh_pf18",
5307 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
5308 { &hf_tn5250_soh_pf17
, { "PF17", "tn5250.soh_pf17",
5309 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
5311 { &hf_tn5250_soh_pf16to9
, { "Command Key Switch 2", "tn5250.soh_pf16to9",
5312 FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
5313 { &hf_tn5250_soh_pf16
, { "PF16", "tn5250.soh_pf16",
5314 FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
5315 { &hf_tn5250_soh_pf15
, { "PF15", "tn5250.soh_pf15",
5316 FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
5317 { &hf_tn5250_soh_pf14
, { "PF14", "tn5250.soh_pf14",
5318 FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
5319 { &hf_tn5250_soh_pf13
, { "PF13", "tn5250.soh_pf13",
5320 FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
5321 { &hf_tn5250_soh_pf12
, { "PF12", "tn5250.soh_pf12",
5322 FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
5323 { &hf_tn5250_soh_pf11
, { "PF11", "tn5250.soh_pf11",
5324 FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
5325 { &hf_tn5250_soh_pf10
, { "PF10", "tn5250.soh_pf10",
5326 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
5327 { &hf_tn5250_soh_pf9
, { "PF9", "tn5250.soh_pf9",
5328 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
5330 { &hf_tn5250_soh_pf8to1
, { "Command Key Switch 3", "tn5250.soh_pf8to1",
5331 FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
5332 { &hf_tn5250_soh_pf8
, { "PF8", "tn5250.soh_pf8",
5333 FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
5334 { &hf_tn5250_soh_pf7
, { "PF7", "tn5250.soh_pf7",
5335 FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
5336 { &hf_tn5250_soh_pf6
, { "PF6", "tn5250.soh_pf6",
5337 FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
5338 { &hf_tn5250_soh_pf5
, { "PF5", "tn5250.soh_pf5",
5339 FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
5340 { &hf_tn5250_soh_pf4
, { "PF4", "tn5250.soh_pf4",
5341 FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
5342 { &hf_tn5250_soh_pf3
, { "PF3", "tn5250.soh_pf3",
5343 FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
5344 { &hf_tn5250_soh_pf2
, { "PF2", "tn5250.soh_pf2",
5345 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
5346 { &hf_tn5250_soh_pf1
, { "PF1", "tn5250.soh_pf1",
5347 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
5349 { &hf_tn5250_soh_resq
, { "Resequence to Field", "tn5250.soh_resq",
5350 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5351 { &hf_tn5250_soh_err
, { "Error Row", "tn5250.soh_err",
5352 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5355 /* 15.6.11.1 Write Extended Attribute Order - Extended Primary Attribute*/
5356 /* 15.6.12.3 Start of Field Order - Field Attribute*/
5357 { &hf_tn5250_wea_prim_attr
,
5358 { "Extended Primary Attributes", "tn5250.wea_prim_attr",
5359 FT_UINT8
, BASE_HEX
, NULL
, 0,
5361 { &hf_tn5250_wea_prim_attr_flag
,
5362 { "Attribute Change",
5363 "tn5250.wea_prim_attr_flag", FT_BOOLEAN
, 8, NULL
,
5364 0x80, NULL
, HFILL
}},
5365 { &hf_tn5250_wea_prim_attr_col
,
5366 { "Column Separator",
5367 "tn5250.wea_prim_attr_col", FT_BOOLEAN
, 8,
5368 TFS(&tn5250_field_attr_col
), 0x10, NULL
, HFILL
}},
5369 { &hf_tn5250_wea_prim_attr_blink
,
5371 "tn5250.wea_prim_attr_blink", FT_BOOLEAN
, 8,
5372 TFS(&tn5250_field_attr_blink
), 0x08, NULL
, HFILL
}},
5373 { &hf_tn5250_wea_prim_attr_und
,
5375 "tn5250.wea_prim_attr_und", FT_BOOLEAN
, 8,
5376 TFS(&tn5250_field_attr_und
), 0x04, NULL
, HFILL
}},
5377 { &hf_tn5250_wea_prim_attr_int
,
5379 "tn5250.wea_prim_attr_int", FT_BOOLEAN
, 8,
5380 TFS(&tn5250_field_attr_int
), 0x02, NULL
, HFILL
}},
5381 { &hf_tn5250_wea_prim_attr_rev
,
5383 "tn5250.wea_prim_attr_rev", FT_BOOLEAN
, 8,
5384 TFS(&tn5250_field_attr_rev
), 0x01, NULL
, HFILL
}},
5386 /* 15.6.11.2 Write Extended Attribute Order - Foreground Color Attribute*/
5387 { &hf_tn5250_foreground_color_attr
,
5388 { "Foreground Color Attribute", "tn5250.foreground_color_attr",
5389 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_foreground_color_attributes
), 0x0,
5391 /* 15.6.11.3 Write Extended Attribute Order - Ideographic Attribute*/
5392 { &hf_tn5250_ideographic_attr
,
5393 { "Ideographic Attribute", "tn5250.ideographic_attr",
5394 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_ideographic_attributes
), 0x0,
5397 /* 15.6.12 Start of Field Order - Field Format Word */
5399 { "Field Format Word", "tn5250.ffw",
5400 FT_UINT8
, BASE_HEX
, NULL
, 0,
5402 { &hf_tn5250_ffw_id
,
5403 { "Field Format Word ID", "tn5250.ffw_id", FT_UINT8
, BASE_HEX
,
5404 VALS(vals_tn5250_ffw_id
), FFW_ID_BITS
, NULL
, HFILL
}},
5405 { &hf_tn5250_ffw_bypass
,
5406 { "Bypass", "tn5250.ffw_bypass",
5407 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_bypass
),
5408 0x20, NULL
, HFILL
}},
5409 { &hf_tn5250_ffw_dup
,
5410 { "Dupe or Field Mark Enable", "tn5250.ffw_dup",
5411 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_dup
),
5412 0x10, NULL
, HFILL
}},
5413 { &hf_tn5250_ffw_mdt
,
5414 { "Modified Data Tag", "tn5250.ffw_mdt",
5415 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_mdt
),
5416 0x08, NULL
, HFILL
}},
5417 { &hf_tn5250_ffw_shift
,
5418 { "Field Shift/Edit Specification", "tn5250.ffw_shift", FT_UINT8
, BASE_HEX
,
5419 VALS(vals_tn5250_ffw_shift
), FFW_SHIFT_BITS
, NULL
, HFILL
}},
5420 { &hf_tn5250_ffw_auto
,
5421 { "Auto Enter", "tn5250.ffw_auto",
5422 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_auto
),
5423 0x80, NULL
, HFILL
}},
5424 { &hf_tn5250_ffw_fer
,
5425 { "Field Exit Required", "tn5250.ffw_fer",
5426 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_fer
),
5427 0x40, NULL
, HFILL
}},
5428 { &hf_tn5250_ffw_monocase
,
5429 { "Monocase", "tn5250.ffw_monocase",
5430 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_monocase
),
5431 0x20, NULL
, HFILL
}},
5432 { &hf_tn5250_ffw_res
,
5433 { "Reserved", "tn5250.ffw_res",
5434 FT_BOOLEAN
, 8, NULL
,
5435 0x10, NULL
, HFILL
}},
5436 { &hf_tn5250_ffw_me
,
5437 { "Mandatory Enter", "tn5250.ffw_me",
5438 FT_BOOLEAN
, 8, TFS(&tn5250_field_ffw_me
),
5439 0x08, NULL
, HFILL
}},
5440 { &hf_tn5250_ffw_adjust
,
5441 { "Right Adjust/Mandatory Fill", "tn5250.ffw_adjust", FT_UINT8
, BASE_HEX
,
5442 VALS(vals_tn5250_ffw_adjust
), FFW_ADJUST_BITS
, NULL
, HFILL
}},
5445 { "Field Control Word", "tn5250.fcw",
5446 FT_UINT16
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_fcw
), 0,
5449 { &hf_tn5250_fa_color
,
5450 { "Field Attribute (Color)", "tn5250.fa_color",
5451 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5454 { "Field Attributes", "tn5250.sf_fa",
5455 FT_UINT8
, BASE_HEX
, NULL
, 0,
5457 { &hf_tn5250_sf_attr_flag
,
5459 "tn5250.sf_attr_flag", FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_id
), FA_ID_BITS
, NULL
, HFILL
}},
5460 /* Use Attribute Field fields from 14.6.11.1 for rest of attribute fields */
5462 /* 15.6.13 Write to Display Structured Field Order */
5464 /* 15.6.13.1 Write to Display Structured Field Order - Create Window */
5465 { &hf_tn5250_wdsf_cw_flag1
,
5466 { "Flags", "tn5250.wdsf_cw_flag1",
5467 FT_UINT8
, BASE_HEX
, NULL
, 0,
5469 { &hf_tn5250_wdsf_cw_flag1_1
,
5470 { "Flag 1", "tn5250.wdsf_cw_flag1_1",
5471 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_cw_flag1_1
),
5472 0x80, NULL
, HFILL
}},
5473 { &hf_tn5250_wdsf_cw_flag1_2
,
5474 { "Flag 2", "tn5250.wdsf_cw_flag1_2",
5475 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_cw_flag1_2
),
5476 0x40, NULL
, HFILL
}},
5477 { &hf_tn5250_wdsf_cw_flag1_reserved
,
5478 { "Reserved", "tn5250.wdsf_cw_flag1_reserved", FT_UINT8
, BASE_HEX
,
5479 NULL
, 0x3F, NULL
, HFILL
}},
5480 { &hf_tn5250_wdsf_cw_wd
,
5481 { "Window Depth", "tn5250.wdsf_cw_wd",
5482 FT_UINT8
, BASE_DEC
, NULL
, 0,
5484 { &hf_tn5250_wdsf_cw_ww
,
5485 { "Window Width", "tn5250.wdsf_cw_ww",
5486 FT_UINT8
, BASE_DEC
, NULL
, 0,
5489 { &hf_tn5250_wdsf_cw_minor_type
,
5490 { "Minor Structured Field Type", "tn5250.wdsf_cw_minor_type",
5491 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_wdsf_cw_minor_type
), 0,
5494 /* 15.6.13.1 Write to Display Structured Field Order - Create Window - Border Presentation Minor Structure */
5495 { &hf_tn5250_wdsf_cw_bp_flag1
,
5496 { "Flags", "tn5250.wdsf_cw_bp_flag1",
5497 FT_UINT8
, BASE_HEX
, NULL
, 0,
5499 { &hf_tn5250_wdsf_cw_bp_flag1_1
,
5500 { "Flag 1", "tn5250.wdsf_cw_bp_flag1_1",
5501 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_cw_bp_flag1_1
),
5502 0x80, NULL
, HFILL
}},
5503 { &hf_tn5250_wdsf_cw_bp_flag1_reserved
,
5504 { "Reserved", "tn5250.wdsf_cw_bp_flag1_reserved", FT_UINT8
, BASE_HEX
,
5505 NULL
, 0x7F, NULL
, HFILL
}},
5506 { &hf_tn5250_wdsf_cw_bp_mba
,
5507 { "Monochrome Border Attribute", "tn5250.wdsf_cw_bp_mba",
5508 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5510 { &hf_tn5250_wdsf_cw_bp_cba
,
5511 { "Color Border Attribute", "tn5250.wdsf_cw_bp_cba",
5512 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5514 { &hf_tn5250_wdsf_cw_bp_ulbc
,
5515 { "Upper Left Border Character", "tn5250.wdsf_cw_bp_ulbc",
5516 FT_STRING
, BASE_NONE
, NULL
, 0,
5518 { &hf_tn5250_wdsf_cw_bp_tbc
,
5519 { "Top Border Character", "tn5250.wdsf_cw_bp_tbc",
5520 FT_STRING
, BASE_NONE
, NULL
, 0,
5522 { &hf_tn5250_wdsf_cw_bp_urbc
,
5523 { "Upper Right Border Character", "tn5250.wdsf_cw_bp_urbc",
5524 FT_STRING
, BASE_NONE
, NULL
, 0,
5526 { &hf_tn5250_wdsf_cw_bp_lbc
,
5527 { "Left Border Character", "tn5250.wdsf_cw_bp_lbc",
5528 FT_STRING
, BASE_NONE
, NULL
, 0,
5530 { &hf_tn5250_wdsf_cw_bp_rbc
,
5531 { "Right Border Character", "tn5250.wdsf_cw_bp_rbc",
5532 FT_STRING
, BASE_NONE
, NULL
, 0,
5534 { &hf_tn5250_wdsf_cw_bp_llbc
,
5535 { "Lower Left Border Character", "tn5250.wdsf_cw_bp_llbc",
5536 FT_STRING
, BASE_NONE
, NULL
, 0,
5538 { &hf_tn5250_wdsf_cw_bp_bbc
,
5539 { "Bottom Border Character", "tn5250.wdsf_cw_bp_bbc",
5540 FT_STRING
, BASE_NONE
, NULL
, 0,
5542 { &hf_tn5250_wdsf_cw_bp_lrbc
,
5543 { "Lower Right Border Character", "tn5250.wdsf_cw_bp_lrbc",
5544 FT_STRING
, BASE_NONE
, NULL
, 0,
5547 /* 15.6.13.1 Write to Display Structured Field Order - Create Window - Window/Title Footer Minor Structure */
5548 { &hf_tn5250_wdsf_cw_tf_flag
,
5549 { "Flags", "tn5250.wdsf_cw_tf_flag",
5550 FT_UINT8
, BASE_HEX
, NULL
, 0,
5552 { &hf_tn5250_wdsf_cw_tf_flag_orientation
,
5553 { "Orientation", "tn5250.wdsf_cw_tf_flag_orientation", FT_UINT8
, BASE_HEX
,
5554 VALS(vals_tn5250_wdsf_cw_tf_flag_orientation
), WTF_BITS
, NULL
, HFILL
}},
5555 { &hf_tn5250_wdsf_cw_tf_flag_1
,
5556 { "Title/Footer Defined", "tn5250.wdsf_cw_tf_flag_1",
5557 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_cw_tf_flag_1
),
5558 0x20, NULL
, HFILL
}},
5559 { &hf_tn5250_wdsf_cw_tf_flag_reserved
,
5560 { "Reserved", "tn5250.wdsf_cw_tf_flag_reserved", FT_UINT8
, BASE_HEX
,
5561 NULL
, 0xF8, NULL
, HFILL
}},
5562 { &hf_tn5250_wdsf_cw_tf_mba
,
5563 { "Monochrome Title/Footer Attribute", "tn5250.wdsf_cw_tf_mba",
5564 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5566 { &hf_tn5250_wdsf_cw_tf_cba
,
5567 { "Color Title/Footer Attribute", "tn5250.wdsf_cw_tf_cba",
5568 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5570 { &hf_tn5250_wdsf_cw_tf_text
,
5571 { "Title Text", "tn5250.wdsf_cw_tf_text",
5572 FT_STRING
, BASE_NONE
, NULL
, 0,
5575 /* 15.6.13.2 Write to Display Structured Field Order - Unrestricted Window Cursor Movement */
5576 /* Consists of reserved fields only */
5578 /* 15.6.13.3 Write to Display Structured Field Order - Remove GUI Window */
5579 { &hf_tn5250_wdsf_rgw_flag1
,
5580 { "Flags", "tn5250.wdsf_rgw_flag",
5581 FT_UINT8
, BASE_HEX
, NULL
, 0,
5583 { &hf_tn5250_wdsf_rgw_flag1_0
,
5584 { "Reserved", "tn5250.wdsf_rgw_flag1_0",
5585 FT_BOOLEAN
, 8, NULL
,
5586 0x80, NULL
, HFILL
}},
5587 { &hf_tn5250_wdsf_rgw_flag1_1
,
5588 { "Window Pull-Down", "tn5250.wdsf_rgw_flag1_1",
5589 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_cw_flag1_2
),
5590 0x40, NULL
, HFILL
}},
5591 { &hf_tn5250_wdsf_rgw_reserved
,
5592 { "Reserved", "tn5250.wdsf_rgw_flag_reserved", FT_UINT8
, BASE_HEX
,
5593 NULL
, 0x3F, NULL
, HFILL
}},
5595 /* 15.6.13.4 Write to Display Structured Field Order - Remove All GUI Constructs*/
5596 { &hf_tn5250_wdsf_ragc_flag1
,
5597 { "Flags", "tn5250.wdsf_ragc_flag",
5598 FT_UINT8
, BASE_HEX
, NULL
, 0,
5600 { &hf_tn5250_wdsf_ragc_flag1_0
,
5601 { "GUI-Like Characters", "tn5250.wdsf_ragc_flag1_0",
5602 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ragc_flag1_0
),
5603 0x80, NULL
, HFILL
}},
5604 { &hf_tn5250_wdsf_ragc_reserved
,
5605 { "Reserved", "tn5250.wdsf_ragc_flag_reserved", FT_UINT8
, BASE_HEX
,
5606 NULL
, 0x7F, NULL
, HFILL
}},
5608 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field*/
5609 { &hf_tn5250_wdsf_ds_flag1
,
5610 { "Flags", "tn5250.wdsf_ds_flag1",
5611 FT_UINT8
, BASE_HEX
, NULL
, 0,
5613 { &hf_tn5250_wdsf_ds_flag1_mouse_characteristics
,
5614 { "Mouse Characteristics", "tn5250.wdsf_ds_flag1_mouse_characteristics", FT_UINT8
, BASE_HEX
,
5615 VALS(vals_tn5250_wdsf_ds_flag1_mouse_characteristics
), MOUSE_CHARACTERISTICS_BITS
, NULL
, HFILL
}},
5616 { &hf_tn5250_wdsf_ds_flag1_reserved
,
5617 { "Reserved", "tn5250.wdsf_ds_flag1_reserved", FT_UINT8
, BASE_HEX
,
5618 NULL
, 0x0C, NULL
, HFILL
}},
5619 { &hf_tn5250_wdsf_ds_flag1_auto_enter
,
5620 { "Mouse Characteristics", "tn5250.wdsf_ds_flag1_auto_enter", FT_UINT8
, BASE_HEX
,
5621 VALS(vals_tn5250_wdsf_ds_flag1_auto_enter
), DS_AUTO_ENTER_BITS
, NULL
, HFILL
}},
5622 { &hf_tn5250_wdsf_ds_flag1_1
,
5623 { "Auto Select", "tn5250.wdsf_ds_flag1_1",
5624 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag1_1
),
5625 0x40, NULL
, HFILL
}},
5626 { &hf_tn5250_wdsf_ds_flag1_2
,
5627 { "Field MDT", "tn5250.wdsf_ds_flag1_2",
5628 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag1_2
),
5629 0x80, NULL
, HFILL
}},
5631 { &hf_tn5250_wdsf_ds_flag2
,
5632 { "Flags", "tn5250.wdsf_ds_flag2",
5633 FT_UINT8
, BASE_HEX
, NULL
, 0,
5635 { &hf_tn5250_wdsf_ds_flag2_1
,
5636 { "Bit 0", "tn5250.wdsf_ds_flag2_1",
5637 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag2_1
),
5638 0x01, NULL
, HFILL
}},
5639 { &hf_tn5250_wdsf_ds_flag2_2
,
5640 { "Bit 1", "tn5250.wdsf_ds_flag2_2",
5641 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag2_2
),
5642 0x02, NULL
, HFILL
}},
5643 { &hf_tn5250_wdsf_ds_flag2_3
,
5644 { "Bit 2", "tn5250.wdsf_ds_flag2_3",
5645 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag2_3
),
5646 0x04, NULL
, HFILL
}},
5647 { &hf_tn5250_wdsf_ds_flag2_4
,
5648 { "Bit 3", "tn5250.wdsf_ds_flag2_4",
5649 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag2_4
),
5650 0x08, NULL
, HFILL
}},
5651 { &hf_tn5250_wdsf_ds_flag2_5
,
5652 { "Bit 4", "tn5250.wdsf_ds_flag2_5",
5653 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag2_5
),
5654 0x10, NULL
, HFILL
}},
5655 { &hf_tn5250_wdsf_ds_flag2_6
,
5656 { "Bit 5", "tn5250.wdsf_ds_flag2_6",
5657 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag2_6
),
5658 0x20, NULL
, HFILL
}},
5659 { &hf_tn5250_wdsf_ds_flag2_reserved
,
5660 { "Reserved", "tn5250.wdsf_ds_flag2_reserved", FT_UINT8
, BASE_HEX
,
5661 NULL
, 0xC0, NULL
, HFILL
}},
5663 { &hf_tn5250_wdsf_ds_flag3
,
5664 { "Flags", "tn5250.wdsf_ds_flag3",
5665 FT_UINT8
, BASE_HEX
, NULL
, 0,
5667 { &hf_tn5250_wdsf_ds_flag3_1
,
5668 { "Bit 0", "tn5250.wdsf_ds_flag3_1",
5669 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_flag3_1
),
5670 0x01, NULL
, HFILL
}},
5671 { &hf_tn5250_wdsf_ds_flag3_reserved
,
5672 { "Reserved", "tn5250.wdsf_ds_flag3_reserved", FT_UINT8
, BASE_HEX
,
5673 NULL
, 0xFE, NULL
, HFILL
}},
5675 { &hf_tn5250_wdsf_ds_type
,
5676 { "Type of Selection Field", "tn5250.wdsf_ds_type",
5677 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_wdsf_ds_type
), 0,
5680 { &hf_tn5250_wdsf_ds_gdc
,
5681 { "GUI Device Characteristics", "tn5250.wdsf_ds_gdc",
5682 FT_UINT8
, BASE_HEX
, NULL
, 0,
5684 { &hf_tn5250_wdsf_ds_gdc_indicators
,
5685 { "Indicators", "tn5250.wdsf_ds_gdc_indicators", FT_UINT8
, BASE_HEX
,
5686 VALS(vals_tn5250_wdsf_ds_gdc_indicators
), DS_INDICATORS_BITS
, NULL
, HFILL
}},
5687 { &hf_tn5250_wdsf_ds_gdc_reserved
,
5688 { "Reserved", "tn5250.wdsf_ds_gdc_reserved", FT_BOOLEAN
, 8,
5689 NULL
, 0x10, NULL
, HFILL
}},
5690 { &hf_tn5250_wdsf_ds_gdc_selection_techniques
,
5691 { "Selection Techniques", "tn5250.wdsf_ds_gdc_selection_techniques", FT_UINT8
, BASE_HEX
,
5692 VALS(vals_tn5250_wdsf_ds_gdc_selection_techniques
), DS_SELECTION_TECHNIQUES_BITS
, NULL
, HFILL
}},
5694 { &hf_tn5250_wdsf_ds_nws
,
5695 { "NWS With Mnemonic Underscore Characteristics", "tn5250.wdsf_ds_nws",
5696 FT_UINT8
, BASE_HEX
, NULL
, 0,
5698 { &hf_tn5250_wdsf_ds_nws_indicators
,
5699 { "Indicators", "tn5250.wdsf_ds_nws_indicators", FT_UINT8
, BASE_HEX
,
5700 VALS(vals_tn5250_wdsf_ds_nws_indicators
), DS_NWS_INDICATORS_BITS
, NULL
, HFILL
}},
5701 { &hf_tn5250_wdsf_ds_nws_reserved
,
5702 { "Reserved", "tn5250.wdsf_ds_nws_reserved", FT_BOOLEAN
, 8,
5703 NULL
, 0x10, NULL
, HFILL
}},
5704 { &hf_tn5250_wdsf_ds_nws_selection_techniques
,
5705 { "Selection Techniques", "tn5250.wdsf_ds_nws_selection_techniques", FT_UINT8
, BASE_HEX
,
5706 VALS(vals_tn5250_wdsf_ds_nws_selection_techniques
), DS_NWS_SELECTION_TECHNIQUES_BITS
, NULL
, HFILL
}},
5708 { &hf_tn5250_wdsf_ds_nws_wout
,
5709 { "NWS Without Mnemonic Underscore Characteristics", "tn5250.wdsf_ds_nws_wout",
5710 FT_UINT8
, BASE_HEX
, NULL
, 0,
5712 /* hf_tn5250_wdsf_ds_nws_wout uses same bitfields as hf_tn5250_wdsf_ds_nws */
5714 { &hf_tn5250_wdsf_ds_textsize
,
5715 { "Text Size", "tn5250.wdsf_ds_textsize",
5716 FT_UINT8
, BASE_DEC
, NULL
, 0,
5718 { &hf_tn5250_wdsf_ds_rows
,
5719 { "Rows", "tn5250.wdsf_ds_rows",
5720 FT_UINT8
, BASE_DEC
, NULL
, 0,
5722 { &hf_tn5250_wdsf_ds_columns
,
5723 { "Columns/Menu Bar Choices", "tn5250.wdsf_ds_columns",
5724 FT_UINT8
, BASE_DEC
, NULL
, 0,
5726 { &hf_tn5250_wdsf_ds_padding
,
5727 { "Padding Between Choices", "tn5250.wdsf_ds_padding",
5728 FT_UINT8
, BASE_DEC
, NULL
, 0,
5730 { &hf_tn5250_wdsf_ds_numeric_sep
,
5731 { "Numeric Separator Character", "tn5250.wdsf_ds_numeric_sep",
5732 FT_STRING
, BASE_NONE
, NULL
, 0,
5734 { &hf_tn5250_wdsf_ds_country_sel
,
5735 { "Country Specific Selection Character", "tn5250.wdsf_ds_country_sel",
5736 FT_STRING
, BASE_NONE
, NULL
, 0,
5738 { &hf_tn5250_wdsf_ds_cancel_aid
,
5739 { "Mouse Pull-Down Cancel AID", "tn5250.wdsf_ds_cancel_aid",
5740 FT_UINT8
, BASE_HEX
, NULL
, 0,
5742 { &hf_tn5250_wdsf_ds_totalrows
,
5743 { "Total Rows or Minor Structures That Can Be Scrolled", "tn5250.wdsf_ds_totalrows",
5744 FT_UINT32
, BASE_DEC
, NULL
, 0,
5746 { &hf_tn5250_wdsf_ds_sliderpos
,
5747 { "Slider Positions That Can Be Scrolled", "tn5250.wdsf_ds_sliderpos",
5748 FT_UINT32
, BASE_DEC
, NULL
, 0,
5751 { &hf_tn5250_wdsf_ds_minor_type
,
5752 { "Minor Structured Field Type", "tn5250.wdsf_ds_minor_type",
5753 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_wdsf_ds_minor_type
), 0,
5756 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Choice Text Minor Structure*/
5757 { &hf_tn5250_wdsf_ds_ct_flag1
,
5758 { "Flag Byte 1", "tn5250.wdsf_ds_ct_flag1",
5759 FT_UINT8
, BASE_HEX
, NULL
, 0,
5761 { &hf_tn5250_wdsf_ds_ct_flag1_choice_state
,
5762 { "Choice State", "tn5250.wdsf_ds_ct_flag1_choice_state", FT_UINT8
, BASE_HEX
,
5763 VALS(vals_tn5250_wdsf_ds_ct_flag1_choice_state
), DS_CHOICE_STATE_BITS
, NULL
, HFILL
}},
5764 { &hf_tn5250_wdsf_ds_ct_flag1_2
,
5765 { "Bit 2", "tn5250.wdsf_ds_ct_flag1_2",
5766 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag1_2
),
5767 0x04, NULL
, HFILL
}},
5768 { &hf_tn5250_wdsf_ds_ct_flag1_3
,
5769 { "Bit 3", "tn5250.wdsf_ds_ct_flag1_3",
5770 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag1_3
),
5771 0x08, NULL
, HFILL
}},
5772 { &hf_tn5250_wdsf_ds_ct_flag1_4
,
5773 { "Bit 4", "tn5250.wdsf_ds_ct_flag1_4",
5774 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag1_4
),
5775 0x10, NULL
, HFILL
}},
5776 { &hf_tn5250_wdsf_ds_ct_flag1_5
,
5777 { "Bit 5", "tn5250.wdsf_ds_ct_flag1_5",
5778 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag1_5
),
5779 0x20, NULL
, HFILL
}},
5780 { &hf_tn5250_wdsf_ds_ct_flag1_numeric_selection
,
5781 { "Numeric Selection Characters", "tn5250.wdsf_ds_ct_flag1_numeric_selection", FT_UINT8
, BASE_HEX
,
5782 VALS(vals_tn5250_wdsf_ds_ct_flag1_numeric_selection
), DS_NUMERIC_SELECTION_BITS
, NULL
, HFILL
}},
5784 { &hf_tn5250_wdsf_ds_ct_flag2
,
5785 { "Flag Byte 2", "tn5250.wdsf_ds_ct_flag2",
5786 FT_UINT8
, BASE_HEX
, NULL
, 0,
5788 { &hf_tn5250_wdsf_ds_ct_flag2_0
,
5789 { "Bit 0", "tn5250.wdsf_ds_ct_flag2_0",
5790 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_0
),
5791 0x01, NULL
, HFILL
}},
5792 { &hf_tn5250_wdsf_ds_ct_flag2_1
,
5793 { "Bit 1", "tn5250.wdsf_ds_ct_flag2_1",
5794 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_1
),
5795 0x02, NULL
, HFILL
}},
5796 { &hf_tn5250_wdsf_ds_ct_flag2_2
,
5797 { "Bit 2", "tn5250.wdsf_ds_ct_flag2_2",
5798 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_2
),
5799 0x04, NULL
, HFILL
}},
5800 { &hf_tn5250_wdsf_ds_ct_flag2_3
,
5801 { "Bit 3", "tn5250.wdsf_ds_ct_flag2_3",
5802 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_3
),
5803 0x08, NULL
, HFILL
}},
5804 { &hf_tn5250_wdsf_ds_ct_flag2_4
,
5805 { "Bit 4", "tn5250.wdsf_ds_ct_flag2_4",
5806 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_4
),
5807 0x10, NULL
, HFILL
}},
5808 { &hf_tn5250_wdsf_ds_ct_flag2_5
,
5809 { "Bit 5", "tn5250.wdsf_ds_ct_flag2_5",
5810 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_5
),
5811 0x20, NULL
, HFILL
}},
5812 { &hf_tn5250_wdsf_ds_ct_flag2_6
,
5813 { "Bit 6", "tn5250.wdsf_ds_ct_flag2_6",
5814 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_6
),
5815 0x40, NULL
, HFILL
}},
5816 { &hf_tn5250_wdsf_ds_ct_flag2_7
,
5817 { "Bit 7", "tn5250.wdsf_ds_ct_flag2_7",
5818 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag2_7
),
5819 0x80, NULL
, HFILL
}},
5821 { &hf_tn5250_wdsf_ds_ct_flag3
,
5822 { "Flag Byte 3", "tn5250.wdsf_ds_ct_flag3",
5823 FT_UINT8
, BASE_HEX
, NULL
, 0,
5825 { &hf_tn5250_wdsf_ds_ct_flag3_0
,
5826 { "Bit 0", "tn5250.wdsf_ds_ct_flag3_0",
5827 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag3_0
),
5828 0x01, NULL
, HFILL
}},
5829 { &hf_tn5250_wdsf_ds_ct_flag3_1
,
5830 { "Bit 1", "tn5250.wdsf_ds_ct_flag3_1",
5831 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag3_1
),
5832 0x02, NULL
, HFILL
}},
5833 { &hf_tn5250_wdsf_ds_ct_flag3_2
,
5834 { "Bit 2", "tn5250.wdsf_ds_ct_flag3_2",
5835 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ct_flag3_2
),
5836 0x04, NULL
, HFILL
}},
5837 { &hf_tn5250_wdsf_ds_ct_flag3_reserved
,
5838 { "Reserved", "tn5250.wdsf_ds_ct_flag3_reserved", FT_UINT8
, BASE_HEX
,
5839 NULL
, 0xF8, NULL
, HFILL
}},
5841 { &hf_tn5250_wdsf_ds_ct_mnemonic_offset
,
5842 { "Mnemonic Offset", "tn5250.wdsf_ds_ct_mnemonic_offset",
5843 FT_UINT8
, BASE_DEC
, NULL
, 0,
5845 { &hf_tn5250_wdsf_ds_ct_aid
,
5846 { "AID", "tn5250.wdsf_ds_ct_aid",
5847 FT_UINT8
, BASE_HEX
, NULL
, 0,
5849 { &hf_tn5250_wdsf_ds_ct_numeric_onebyte
,
5850 { "Numeric Characters", "tn5250.wdsf_ds_ct_numeric",
5851 FT_UINT8
, BASE_HEX
, NULL
, 0,
5853 { &hf_tn5250_wdsf_ds_ct_numeric_twobyte
,
5854 { "Numeric Characters", "tn5250.wdsf_ds_ct_numeric",
5855 FT_UINT16
, BASE_HEX
, NULL
, 0,
5857 { &hf_tn5250_wdsf_ds_ct_text
,
5858 { "Choice Text", "tn5250.wdsf_ds_ct_text",
5859 FT_STRING
, BASE_NONE
, NULL
, 0,
5862 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Menu Bar Separator Minor Structure*/
5864 { &hf_tn5250_wdsf_ds_mbs_flag
,
5865 { "Flags", "tn5250.wdsf_ds_mbs_flag",
5866 FT_UINT8
, BASE_HEX
, NULL
, 0,
5868 { &hf_tn5250_wdsf_ds_mbs_flag_0
,
5869 { "Bit 0", "tn5250.wdsf_ds_mbs_flag_0",
5870 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_mbs_flag_0
),
5871 0x01, NULL
, HFILL
}},
5872 { &hf_tn5250_wdsf_ds_mbs_flag_1
,
5873 { "Bit 1", "tn5250.wdsf_ds_mbs_flag_1",
5874 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_mbs_flag_1
),
5875 0x02, NULL
, HFILL
}},
5876 { &hf_tn5250_wdsf_ds_mbs_flag_reserved
,
5877 { "Reserved", "tn5250.wdsf_ds_mbs_flag_reserved", FT_UINT8
, BASE_HEX
,
5878 NULL
, 0xF8, NULL
, HFILL
}},
5879 { &hf_tn5250_wdsf_ds_mbs_start_column
,
5880 { "Start Column", "tn5250.wdsf_ds_mbs_start_column",
5881 FT_UINT8
, BASE_DEC
, NULL
, 0,
5883 { &hf_tn5250_wdsf_ds_mbs_end_column
,
5884 { "End Column", "tn5250.wdsf_ds_mbs_end_column",
5885 FT_UINT8
, BASE_DEC
, NULL
, 0,
5887 { &hf_tn5250_wdsf_ds_mbs_monochrome_sep
,
5888 { "Monochrome Separator Emphasis", "tn5250.wdsf_ds_mbs_monochrome_sep",
5889 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5891 { &hf_tn5250_wdsf_ds_mbs_color_sep
,
5892 { "Color Separator Emphasis", "tn5250.wdsf_ds_mbs_color_sep",
5893 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5895 { &hf_tn5250_wdsf_ds_mbs_sep_char
,
5896 { "Separator Character", "tn5250.wdsf_ds_mbs_sep_char",
5897 FT_STRING
, BASE_NONE
, NULL
, 0,
5900 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Choice Presentation Display Attributes Minor Structure*/
5901 { &hf_tn5250_wdsf_ds_cpda_flag1
,
5902 { "Flags", "tn5250.wdsf_ds_cpda_flag1",
5903 FT_UINT8
, BASE_HEX
, NULL
, 0,
5905 { &hf_tn5250_wdsf_ds_cpda_flag1_0
,
5906 { "Bit 0", "tn5250.wdsf_ds_cpda_flag1_0",
5907 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_cpda_flag1_0
),
5908 0x01, NULL
, HFILL
}},
5909 { &hf_tn5250_wdsf_ds_cpda_flag1_1
,
5910 { "Bit 1", "tn5250.wdsf_ds_cpda_flag1_1",
5911 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_cpda_flag1_1
),
5912 0x02, NULL
, HFILL
}},
5913 { &hf_tn5250_wdsf_ds_cpda_flag1_2
,
5914 { "Bit 2", "tn5250.wdsf_ds_cpda_flag1_2",
5915 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_cpda_flag1_2
),
5916 0x04, NULL
, HFILL
}},
5917 { &hf_tn5250_wdsf_ds_cpda_flag1_reserved
,
5918 { "Reserved", "tn5250.wdsf_ds_cpda_flag1_reserved", FT_UINT8
, BASE_HEX
,
5919 NULL
, 0xF8, NULL
, HFILL
}},
5921 { &hf_tn5250_wdsf_ds_cpda_monochrome_sel_avail
,
5922 { "Monochrome Selection Cursor Available Emphasis", "tn5250.wdsf_ds_cpda_monochrome_sel_avail",
5923 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5925 { &hf_tn5250_wdsf_ds_cpda_color_sel_avail
,
5926 { "Color Selection Cursor Available Emphasis", "tn5250.wdsf_ds_cpda_color_sel_avail",
5927 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5929 { &hf_tn5250_wdsf_ds_cpda_monochrome_sel_selected
,
5930 { "Monochrome Selection Cursor Selected Emphasis", "tn5250.wdsf_ds_cpda_monochrome_sel_selected",
5931 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5933 { &hf_tn5250_wdsf_ds_cpda_color_sel_selected
,
5934 { "Color Selection Cursor Selected Emphasis", "tn5250.wdsf_ds_cpda_color_sel_selected",
5935 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5938 { &hf_tn5250_wdsf_ds_cpda_monochrome_sel_unavail
,
5939 { "Monochrome Selection Cursor Unavailable Emphasis", "tn5250.wdsf_ds_cpda_monochrome_sel_unavail",
5940 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5942 { &hf_tn5250_wdsf_ds_cpda_color_sel_unavail
,
5943 { "Color Selection Cursor Unavailable Emphasis", "tn5250.wdsf_ds_cpda_color_sel_unavail",
5944 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5947 { &hf_tn5250_wdsf_ds_cpda_monochrome_avail
,
5948 { "Monochrome Available Emphasis", "tn5250.wdsf_ds_cpda_monochrome_avail",
5949 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5951 { &hf_tn5250_wdsf_ds_cpda_color_avail
,
5952 { "Color Available Emphasis", "tn5250.wdsf_ds_cpda_color_avail",
5953 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5956 { &hf_tn5250_wdsf_ds_cpda_monochrome_selected
,
5957 { "Monochrome Selected Emphasis", "tn5250.wdsf_ds_cpda_monochrome_selected",
5958 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5960 { &hf_tn5250_wdsf_ds_cpda_color_selected
,
5961 { "Color Selected Emphasis", "tn5250.wdsf_ds_cpda_color_selected",
5962 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5965 { &hf_tn5250_wdsf_ds_cpda_monochrome_unavail
,
5966 { "Monochrome Unavailable Emphasis", "tn5250.wdsf_ds_cpda_monochrome_unavail",
5967 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5969 { &hf_tn5250_wdsf_ds_cpda_color_unavail
,
5970 { "Color Unavailable Emphasis", "tn5250.wdsf_ds_cpda_color_unavail",
5971 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5974 { &hf_tn5250_wdsf_ds_cpda_monochrome_indicator
,
5975 { "Monochrome Indicator Emphasis", "tn5250.wdsf_ds_cpda_monochrome_indicator",
5976 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5978 { &hf_tn5250_wdsf_ds_cpda_color_indicator
,
5979 { "Color Indicator Emphasis", "tn5250.wdsf_ds_cpda_color_indicator",
5980 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5983 { &hf_tn5250_wdsf_ds_cpda_monochrome_unavail_indicator
,
5984 { "Monochrome Unavailable Indicator Emphasis", "tn5250.wdsf_ds_cpda_monochrome_unavail_indicator",
5985 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5987 { &hf_tn5250_wdsf_ds_cpda_color_unavail_indicator
,
5988 { "Color Unavailable Indicator Emphasis", "tn5250.wdsf_ds_cpda_color_unavail_indicator",
5989 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
5994 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Choice Indicators Minor Structure*/
5995 { &hf_tn5250_wdsf_ds_ci_flag1
,
5996 { "Flags", "tn5250.wdsf_ds_ci_flag1",
5997 FT_UINT8
, BASE_HEX
, NULL
, 0,
5999 { &hf_tn5250_wdsf_ds_ci_flag1_0
,
6000 { "Bit 0", "tn5250.wdsf_ds_ci_flag1_0",
6001 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_ci_flag1_0
),
6002 0x01, NULL
, HFILL
}},
6003 { &hf_tn5250_wdsf_ds_ci_flag1_reserved
,
6004 { "Reserved", "tn5250.wdsf_ds_ci_flag1_reserved", FT_UINT8
, BASE_HEX
,
6005 NULL
, 0xFE, NULL
, HFILL
}},
6007 { &hf_tn5250_wdsf_ds_ci_left_push
,
6008 { "Empty Indicator or Left Push Button", "tn5250.wdsf_ds_ci_left_push",
6009 FT_STRING
, BASE_NONE
, NULL
, 0,
6011 { &hf_tn5250_wdsf_ds_ci_right_push
,
6012 { "Selected Indicator or Right Push Button", "tn5250.wdsf_ds_ci_right_push",
6013 FT_STRING
, BASE_NONE
, NULL
, 0,
6015 { &hf_tn5250_wdsf_ds_ci_first_choice
,
6016 { "Character That Replaces the First Choice Text Character for Unavailable Choices On a Monochrome Display", "tn5250.wdsf_ds_ci_first_choice",
6017 FT_STRING
, BASE_NONE
, NULL
, 0,
6020 /* 15.6.13.5 Write to Display Structured Field Order - Define Selection Field - Scroll Bar Indicators Minor Structure*/
6021 { &hf_tn5250_wdsf_ds_sbi_flag1
,
6022 { "Flags", "tn5250.wdsf_ds_sbi_flag1",
6023 FT_UINT8
, BASE_HEX
, NULL
, 0,
6025 { &hf_tn5250_wdsf_ds_sbi_flag1_0
,
6026 { "Bit 0", "tn5250.wdsf_ds_sbi_flag1_0",
6027 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_ds_sbi_flag1_0
),
6028 0x01, NULL
, HFILL
}},
6029 { &hf_tn5250_wdsf_ds_sbi_flag1_reserved
,
6030 { "Reserved", "tn5250.wdsf_ds_sbi_flag1_reserved", FT_UINT8
, BASE_HEX
,
6031 NULL
, 0xFE, NULL
, HFILL
}},
6033 { &hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight
,
6034 { "Monochrome Top of ScrollBar Highlighting", "tn5250.wdsf_ds_sbi_monochrome_top_highlight",
6035 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6037 { &hf_tn5250_wdsf_ds_sbi_color_top_highlight
,
6038 { "Color Top of ScrollBar Highlighting", "tn5250.wdsf_ds_sbi_color_top_highlightl",
6039 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6042 { &hf_tn5250_wdsf_ds_sbi_monochrome_top_highlight_shaft
,
6043 { "Monochrome Shaft ScrollBar Highlighting", "tn5250.wdsf_ds_sbi_monochrome_top_highlight_shaft",
6044 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6046 { &hf_tn5250_wdsf_ds_sbi_color_top_highlight_shaft
,
6047 { "Color Shaft ScrollBar Highlighting", "tn5250.wdsf_ds_sbi_color_top_highlight_shaft",
6048 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6051 { &hf_tn5250_wdsf_ds_sbi_top_character
,
6052 { "Top Scroll Bar Character", "tn5250.wdsf_ds_sbi_top_character",
6053 FT_STRING
, BASE_NONE
, NULL
, 0,
6055 { &hf_tn5250_wdsf_ds_sbi_bottom_character
,
6056 { "Bottom Scroll Bar Character", "tn5250.wdsf_ds_sbi_bottom_character",
6057 FT_STRING
, BASE_NONE
, NULL
, 0,
6059 { &hf_tn5250_wdsf_ds_sbi_empty_character
,
6060 { "Empty Scroll Bar Character", "tn5250.wdsf_ds_sbi_empty_character",
6061 FT_STRING
, BASE_NONE
, NULL
, 0,
6063 { &hf_tn5250_wdsf_ds_sbi_slider_character
,
6064 { "Slider Scroll Bar Character", "tn5250.wdsf_ds_sbi_slider_character",
6065 FT_STRING
, BASE_NONE
, NULL
, 0,
6068 /* 15.6.13.6 Write to Display Structured Field Order - Remove GUI Selection Field */
6069 /* Consists of reserved fields only */
6071 /* 15.6.13.7 Write to Display Structured Field Order - Define Scroll Bar Field */
6072 { &hf_tn5250_wdsf_dsb_flag1
,
6073 { "Flags", "tn5250.wdsf_dsb_flag1",
6074 FT_UINT8
, BASE_HEX
, NULL
, 0,
6076 { &hf_tn5250_wdsf_dsb_flag1_0
,
6077 { "Bit 0", "tn5250.wdsf_dsb_flag1_0",
6078 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_dsb_flag1_0
),
6079 0x01, NULL
, HFILL
}},
6080 { &hf_tn5250_wdsf_dsb_flag1_1
,
6081 { "Bit 1", "tn5250.wdsf_dsb_flag1_1",
6082 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_dsb_flag1_0
),
6083 0x02, NULL
, HFILL
}},
6084 { &hf_tn5250_wdsf_dsb_flag1_reserved
,
6085 { "Reserved", "tn5250.wdsf_dsb_flag1_reserved", FT_UINT8
, BASE_HEX
,
6086 NULL
, 0x7C, NULL
, HFILL
}},
6087 { &hf_tn5250_wdsf_dsb_flag1_7
,
6088 { "Bit 7", "tn5250.wdsf_dsb_flag1_7",
6089 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_dsb_flag1_7
),
6090 0x80, NULL
, HFILL
}},
6092 { &hf_tn5250_wdsf_sbi_total_scroll
,
6093 { "TotalRows or TotalCols That Can Be Scrolled", "tn5250.wdsf_sbi_total_scroll",
6094 FT_UINT32
, BASE_DEC
, NULL
, 0,
6096 { &hf_tn5250_wdsf_sbi_sliderpos
,
6097 { "SliderPos", "tn5250.wdsf_sbi_sliderpos",
6098 FT_UINT32
, BASE_DEC
, NULL
, 0,
6100 { &hf_tn5250_wdsf_sbi_rowscols
,
6101 { "Rows or Columns", "tn5250.wdsf_sbi_rowscols",
6102 FT_UINT8
, BASE_DEC
, NULL
, 0,
6105 /* 15.6.13.8 Write to Display Structured Field Order - Remove GUI Scroll Bar Field */
6106 /* Consists of reserved fields only */
6108 /* 15.6.13.9 Write to Display Structured Field Order - Write Data Field */
6109 { &hf_tn5250_wdsf_wdf_flag1
,
6110 { "Flags", "tn5250.wdsf_wdf_flag1",
6111 FT_UINT8
, BASE_HEX
, NULL
, 0,
6113 { &hf_tn5250_wdsf_wdf_flag1_0
,
6114 { "Bit 0", "tn5250.wdsf_wdf_flag1_0",
6115 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_wdf_flag1_0
),
6116 0x01, NULL
, HFILL
}},
6117 { &hf_tn5250_wdsf_wdf_flag1_reserved
,
6118 { "Reserved", "tn5250.wdsf_wdf_flag1_reserved", FT_UINT8
, BASE_HEX
,
6119 NULL
, 0xFE, NULL
, HFILL
}},
6121 /* 15.6.13.10 Write to Display Structured Field Order - Programmable Mouse Buttons */
6122 { &hf_tn5250_wdsf_pmb_flag1
,
6123 { "Flags", "tn5250.wdsf_pmb_flag1",
6124 FT_UINT8
, BASE_HEX
, NULL
, 0,
6126 { &hf_tn5250_wdsf_pmb_flag1_0
,
6127 { "Bit 0", "tn5250.wdsf_pmb_flag1_0",
6128 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_pmb_flag1_0
),
6129 0x01, NULL
, HFILL
}},
6130 { &hf_tn5250_wdsf_pmb_flag1_1
,
6131 { "Bit 1", "tn5250.wdsf_pmb_flag1_1",
6132 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_pmb_flag1_1
),
6133 0x02, NULL
, HFILL
}},
6134 { &hf_tn5250_wdsf_pmb_flag1_2
,
6135 { "Bit 2", "tn5250.wdsf_pmb_flag1_2",
6136 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_pmb_flag1_2
),
6137 0x04, NULL
, HFILL
}},
6138 { &hf_tn5250_wdsf_pmb_flag1_3
,
6139 { "Bit 3", "tn5250.wdsf_pmb_flag1_3",
6140 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_pmb_flag1_3
),
6141 0x08, NULL
, HFILL
}},
6142 { &hf_tn5250_wdsf_pmb_flag1_reserved
,
6143 { "Reserved", "tn5250.wdsf_pmb_flag1_reserved", FT_UINT8
, BASE_HEX
,
6144 NULL
, 0xF0, NULL
, HFILL
}},
6145 { &hf_tn5250_wdsf_pmb_first_mouse_event
,
6146 { "First Mouse Event (Leading Edge Event)", "tn5250.wdsf_pmb_first_mouse_event",
6147 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_mouse_events
), 0,
6149 { &hf_tn5250_wdsf_pmb_second_mouse_event
,
6150 { "Second Mouse Event (Trailing Edge Event)", "tn5250.wdsf_pmb_second_mouse_event",
6151 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_mouse_events
), 0,
6154 /* 15.7 Draw/Erase Grid Lines Structured Field */
6155 { &hf_tn5250_wdsf_deg_partition
,
6156 { "Partition", "tn5250.wdsf_deg_partition",
6157 FT_UINT8
, BASE_HEX
, NULL
, 0,
6159 { &hf_tn5250_wdsf_deg_flag1
,
6160 { "Flags", "tn5250.wdsf_deg_flag1",
6161 FT_UINT8
, BASE_HEX
, NULL
, 0,
6163 { &hf_tn5250_wdsf_deg_flag1_0
,
6164 { "Bit 0", "tn5250.wdsf_deg_flag1_0",
6165 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_deg_flag1_0
),
6166 0x01, NULL
, HFILL
}},
6167 { &hf_tn5250_wdsf_deg_flag1_reserved
,
6168 { "Reserved", "tn5250.wdsf_deg_flag1_reserved", FT_UINT8
, BASE_HEX
,
6169 NULL
, 0xFE, NULL
, HFILL
}},
6170 { &hf_tn5250_wdsf_deg_flag2
,
6171 { "Flags", "tn5250.wdsf_deg_flag2",
6172 FT_UINT8
, BASE_HEX
, NULL
, 0,
6174 { &hf_tn5250_wdsf_deg_flag2_0
,
6175 { "Bit 0", "tn5250.wdsf_deg_flag2_0",
6176 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_deg_flag1_0
),
6177 0x01, NULL
, HFILL
}},
6178 { &hf_tn5250_wdsf_deg_flag2_reserved
,
6179 { "Reserved", "tn5250.wdsf_deg_flag2_reserved", FT_UINT8
, BASE_HEX
,
6180 NULL
, 0xFE, NULL
, HFILL
}},
6181 { &hf_tn5250_wdsf_deg_default_color
,
6182 { "Default Color for Grid Lines", "tn5250.wdsf_deg_default_color",
6183 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6185 { &hf_tn5250_wdsf_deg_default_line
,
6186 { "Default Line Style", "tn5250.wdsf_deg_default_line",
6187 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_deg_lines
), 0,
6190 /* 15.7.1 Draw/Erase Grid Lines Structured Field - Minor Structure*/
6191 { &hf_tn5250_wdsf_deg_minor_type
,
6192 { "Construct", "tn5250.wdsf_deg_minor_type",
6193 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_wdsf_deg_minor_type
), 0,
6195 { &hf_tn5250_wdsf_deg_ms_flag1
,
6196 { "Flags", "tn5250.wdsf_deg_ms_flag1",
6197 FT_UINT8
, BASE_HEX
, NULL
, 0,
6199 { &hf_tn5250_wdsf_deg_ms_flag1_0
,
6200 { "Bit 0", "tn5250.wdsf_deg_ms_flag1_0",
6201 FT_BOOLEAN
, 8, TFS(&tn5250_field_wdsf_deg_ms_flag1_0
),
6202 0x01, NULL
, HFILL
}},
6203 { &hf_tn5250_wdsf_deg_ms_flag1_reserved
,
6204 { "Reserved", "tn5250.wdsf_deg_ms_flag1_reserved", FT_UINT8
, BASE_HEX
,
6205 NULL
, 0xFE, NULL
, HFILL
}},
6206 { &hf_tn5250_wdsf_deg_ms_start_row
,
6207 { "Start Row", "tn5250.wdsf_deg_ms_start_row",
6208 FT_UINT8
, BASE_DEC
, NULL
, 0,
6210 { &hf_tn5250_wdsf_deg_ms_start_column
,
6211 { "Start Column", "tn5250.wdsf_deg_ms_start_column",
6212 FT_UINT8
, BASE_DEC
, NULL
, 0,
6214 { &hf_tn5250_wdsf_deg_ms_horizontal_dimension
,
6215 { "Horizontal Dimenstion", "tn5250.wdsf_deg_ms_horizontal_dimension",
6216 FT_UINT8
, BASE_DEC
, NULL
, 0,
6218 { &hf_tn5250_wdsf_deg_ms_vertical_dimension
,
6219 { "Vertical Dimenstion", "tn5250.wdsf_deg_ms_vertical_dimension",
6220 FT_UINT8
, BASE_DEC
, NULL
, 0,
6222 { &hf_tn5250_wdsf_deg_ms_default_color
,
6223 { "Color", "tn5250.wdsf_deg_ms_default_color",
6224 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_fa_color
), 0,
6226 { &hf_tn5250_wdsf_deg_ms_line_repeat
,
6227 { "Line Repeat", "tn5250.wdsf_deg_ms_line_repeat",
6228 FT_UINT8
, BASE_DEC
, NULL
, 0,
6230 { &hf_tn5250_wdsf_deg_ms_line_interval
,
6231 { "Line Interval", "tn5250.wdsf_deg_ms_line_interval",
6232 FT_UINT8
, BASE_DEC
, NULL
, 0,
6235 /* 15.7.2 Clear Grid Lines Structured Field */
6236 { &hf_tn5250_wdsf_cgl_partition
,
6237 { "Partition", "tn5250.wdsf_cgl_partition",
6238 FT_UINT8
, BASE_HEX
, NULL
, 0,
6240 { &hf_tn5250_wdsf_cgl_start_row
,
6241 { "Start Row", "tn5250.wdsf_cgl_start_row",
6242 FT_UINT8
, BASE_DEC
, NULL
, 0,
6244 { &hf_tn5250_wdsf_cgl_start_column
,
6245 { "Start Column", "tn5250.wdsf_cgl_start_column",
6246 FT_UINT8
, BASE_DEC
, NULL
, 0,
6248 { &hf_tn5250_wdsf_cgl_rectangle_width
,
6249 { "Width of Rectangle", "tn5250.wdsf_cgl_rectangle_width",
6250 FT_UINT8
, BASE_DEC
, NULL
, 0,
6252 { &hf_tn5250_wdsf_cgl_rectangle_height
,
6253 { "Height of Rectangle", "tn5250.wdsf_cgl_rectangle_height",
6254 FT_UINT8
, BASE_DEC
, NULL
, 0,
6257 /* 15.8 WRITE ERROR CODE Command */
6258 /* 15.9 WRITE ERROR CODE TO WINDOW Command */
6259 { &hf_tn5250_wectw_start_column
,
6260 { "Start Column", "tn5250.wectw_start_column",
6261 FT_UINT8
, BASE_DEC
, NULL
, 0,
6263 { &hf_tn5250_wectw_end_column
,
6264 { "End Column", "tn5250.wectw_end_column",
6265 FT_UINT8
, BASE_DEC
, NULL
, 0,
6268 /* 15.22 SAVE PARTIAL SCREEN Command */
6269 { &hf_tn5250_sps_flag1
,
6270 { "Flags", "tn5250.sps_flag1",
6271 FT_UINT8
, BASE_HEX
, NULL
, 0,
6273 { &hf_tn5250_sps_flag1_0
,
6274 { "Bit 0", "tn5250.sps_flag1_0",
6275 FT_BOOLEAN
, 8, TFS(&tn5250_field_sps_flag1_0
),
6276 0x01, NULL
, HFILL
}},
6277 { &hf_tn5250_sps_flag1_reserved
,
6278 { "Reserved", "tn5250.sps_flag1_reserved", FT_UINT8
, BASE_HEX
,
6279 NULL
, 0xFE, NULL
, HFILL
}},
6280 { &hf_tn5250_sps_top_row
,
6281 { "Top Row", "tn5250.sps_top_row",
6282 FT_UINT8
, BASE_DEC
, NULL
, 0,
6284 { &hf_tn5250_sps_left_column
,
6285 { "Left Column", "tn5250.sps_left_column",
6286 FT_UINT8
, BASE_DEC
, NULL
, 0,
6288 { &hf_tn5250_sps_window_depth
,
6289 { "Window Depth", "tn5250.sps_window_depth",
6290 FT_UINT8
, BASE_DEC
, NULL
, 0,
6292 { &hf_tn5250_sps_window_width
,
6293 { "Window Width", "tn5250.sps_window_width",
6294 FT_UINT8
, BASE_DEC
, NULL
, 0,
6297 /* 15.25 ROLL Command */
6298 { &hf_tn5250_roll_flag1
,
6299 { "Byte 1", "tn5250.roll_flag1",
6300 FT_UINT8
, BASE_HEX
, NULL
, 0,
6302 { &hf_tn5250_roll_flag1_0
,
6303 { "Bit 0", "tn5250.roll_flag1_0",
6304 FT_BOOLEAN
, 8, TFS(&tn5250_field_roll_flag1_0
),
6305 0x01, NULL
, HFILL
}},
6306 { &hf_tn5250_roll_flag1_reserved
,
6307 { "Reserved", "tn5250.roll_flag1_reserved", FT_UINT8
, BASE_HEX
,
6308 NULL
, 0x06, NULL
, HFILL
}},
6309 { &hf_tn5250_roll_flag1_lines
,
6310 { "Number of lines that the designated area is to be rolled", "tn5250.roll_flag1_lines", FT_UINT8
, BASE_DEC
,
6311 NULL
, 0xF8, NULL
, HFILL
}},
6312 { &hf_tn5250_roll_top_line
,
6313 { "Line number defining the top line of the area that will participate in the roll", "tn5250.roll_top_line",
6314 FT_UINT8
, BASE_DEC
, NULL
, 0,
6316 { &hf_tn5250_roll_bottom_line
,
6317 { "Line number defining the bottom line of the area that will participate in the roll", "tn5250.roll_bottom_line",
6318 FT_UINT8
, BASE_DEC
, NULL
, 0,
6321 /* 15.26.1 WRITE SINGLE STRUCTURED FIELD Command - 5250 WSC CUSTOMIZATION Command*/
6322 { &hf_tn5250_wssf_wsc_minor_type
,
6323 { "Minor Structured Field Type", "tn5250.wssf_wsc_minor_type",
6324 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_wssf_minor_type
), 0,
6327 { &hf_tn5250_wssf_flag1
,
6328 { "Byte 1", "tn5250.wssf_flag1",
6329 FT_UINT8
, BASE_HEX
, NULL
, 0,
6331 { &hf_tn5250_wssf_flag2
,
6332 { "Byte 2", "tn5250.wssf_flag2",
6333 FT_UINT8
, BASE_HEX
, NULL
, 0,
6335 { &hf_tn5250_wssf_flag2_0
,
6336 { "Bit 0", "tn5250.wssf_flag2_0",
6337 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_0
),
6338 0x01, NULL
, HFILL
}},
6339 { &hf_tn5250_wssf_flag2_1
,
6340 { "Bit 1", "tn5250.wssf_flag2_1",
6341 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_1
),
6342 0x02, NULL
, HFILL
}},
6343 { &hf_tn5250_wssf_flag2_2
,
6344 { "Bit 2", "tn5250.wssf_flag2_2",
6345 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_2
),
6346 0x04, NULL
, HFILL
}},
6347 { &hf_tn5250_wssf_flag2_3
,
6348 { "Bit 3", "tn5250.wssf_flag2_3",
6349 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_3
),
6350 0x08, NULL
, HFILL
}},
6351 { &hf_tn5250_wssf_flag2_4
,
6352 { "Bit 4", "tn5250.wssf_flag2_4",
6353 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_4
),
6354 0x10, NULL
, HFILL
}},
6355 { &hf_tn5250_wssf_flag2_5
,
6356 { "Bit 5", "tn5250.wssf_flag2_5",
6357 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_5
),
6358 0x20, NULL
, HFILL
}},
6359 { &hf_tn5250_wssf_flag2_6
,
6360 { "Bit 6", "tn5250.wssf_flag2_6",
6361 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_6
),
6362 0x40, NULL
, HFILL
}},
6363 { &hf_tn5250_wssf_flag2_7
,
6364 { "Bit 7", "tn5250.wssf_flag2_7",
6365 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_flag2_7
),
6366 0x80, NULL
, HFILL
}},
6368 /* 15.26.1 WRITE SINGLE STRUCTURED FIELD Command - 5250 WSC CUSTOMIZATION Command
6369 - Keystroke Buffering Control Minor Structure*/
6370 { &hf_tn5250_wssf_kbc_flag1
,
6371 { "Byte 1", "tn5250.wssf_kbc_flag1",
6372 FT_UINT8
, BASE_HEX
, NULL
, 0,
6374 { &hf_tn5250_wssf_kbc_flag1_reserved
,
6375 { "Reserved", "tn5250.wssf_kbc_flag1_reserved", FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
,
6376 RVALS(vals_tn5250_reserved
), 0x1F, NULL
, HFILL
}},
6377 { &hf_tn5250_wssf_kbc_flag1_5
,
6378 { "Bit 5", "tn5250.wssf_kbc_flag1_5",
6379 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_kbc_flag1_5
),
6380 0x20, NULL
, HFILL
}},
6381 { &hf_tn5250_wssf_kbc_flag1_6
,
6382 { "Bit 6", "tn5250.wssf_kbc_flag1_6",
6383 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_kbc_flag1_6
),
6384 0x40, NULL
, HFILL
}},
6385 { &hf_tn5250_wssf_kbc_flag1_7
,
6386 { "Bit 7", "tn5250.wssf_kbc_flag1_7",
6387 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_kbc_flag1_7
),
6388 0x80, NULL
, HFILL
}},
6390 /* 15.26.1 WRITE SINGLE STRUCTURED FIELD Command - 5250 WSC CUSTOMIZATION Command
6391 - Cursor Control Minor Structure*/
6392 { &hf_tn5250_wssf_cc_flag1
,
6393 { "Byte 1", "tn5250.wssf_cc_flag1",
6394 FT_UINT8
, BASE_HEX
, NULL
, 0,
6396 { &hf_tn5250_wssf_cc_flag1_reserved
,
6397 { "Reserved", "tn5250.wssf_cc_flag1_reserved", FT_UINT8
, BASE_HEX
,
6398 NULL
, 0x7F, NULL
, HFILL
}},
6399 { &hf_tn5250_wssf_cc_flag1_7
,
6400 { "Bit 7", "tn5250.wssf_cc_flag1_7",
6401 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_cc_flag1_7
),
6402 0x80, NULL
, HFILL
}},
6404 /* 15.26.2 WRITE SINGLE STRUCTURED FIELD Command - IMAGE/FAX CONTROL Command */
6405 { &hf_tn5250_wssf_ifc_flag1
,
6406 { "Byte 1", "tn5250.wssf_ifc_flag1",
6407 FT_UINT8
, BASE_HEX
, NULL
, 0,
6409 { &hf_tn5250_wssf_ifc_flag1_0
,
6410 { "Bit 0 (Cache allowed flag)", "tn5250.wssf_ifc_flag1_0",
6411 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag1_0
),
6412 0x01, NULL
, HFILL
}},
6413 { &hf_tn5250_wssf_ifc_flag1_1to3
,
6414 { "Bits 1-3 (Type of image/fax display)", "tn5250.wssf_ifc_flag1_1to3", FT_UINT8
, BASE_HEX
,
6415 VALS(tn5250_vals_tn5250_wssf_ifc_vals
), 0x0E, NULL
, HFILL
}},
6416 { &hf_tn5250_wssf_ifc_flag1_4
,
6417 { "Bit 4 (Color importance during scaling)", "tn5250.wssf_ifc_flag1_4",
6418 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag1_4
),
6419 0x10, NULL
, HFILL
}},
6420 { &hf_tn5250_wssf_ifc_flag1_5
,
6421 { "Bit 5 (Allow display to control scaling)", "tn5250.wssf_ifc_flag1_5",
6422 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag1_5
),
6423 0x20, NULL
, HFILL
}},
6424 { &hf_tn5250_wssf_ifc_flag1_6
,
6425 { "Bit 6 (Reverse image)", "tn5250.wssf_ifc_flag1_6",
6426 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag1_6
),
6427 0x40, NULL
, HFILL
}},
6428 { &hf_tn5250_wssf_ifc_flag1_7
,
6429 { "Bit 7 (Allow/Inhibit EasyScroll with a mouse)", "tn5250.wssf_ifc_flag1_7",
6430 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag1_7
),
6431 0x80, NULL
, HFILL
}},
6433 { &hf_tn5250_wssf_ifc_flag2
,
6434 { "Byte 2", "tn5250.wssf_ifc_flag2",
6435 FT_UINT8
, BASE_HEX
, NULL
, 0,
6437 { &hf_tn5250_wssf_ifc_flag2_0
,
6438 { "Bit 0 (Duplicate Scan Lines)", "tn5250.wssf_ifc_flag2_0",
6439 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag2_0
),
6440 0x01, NULL
, HFILL
}},
6441 { &hf_tn5250_wssf_ifc_flag2_1
,
6442 { "Bit 1 (Allow/Inhibit Trim Magnify Scaling)", "tn5250.wssf_ifc_flag2_1",
6443 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag2_1
),
6444 0x02, NULL
, HFILL
}},
6445 { &hf_tn5250_wssf_ifc_flag2_reserved
,
6446 { "Reserved", "tn5250.wssf_ifc_flag2_reserved", FT_UINT8
, BASE_HEX
,
6447 NULL
, 0x7C, NULL
, HFILL
}},
6448 { &hf_tn5250_wssf_ifc_flag2_7
,
6449 { "Bit 7", "tn5250.wssf_ifc_flag2_7",
6450 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifc_flag2_7
),
6451 0x80, NULL
, HFILL
}},
6453 { &hf_tn5250_wssf_ifc_image_format
,
6454 { "Image Format", "tn5250.wssf_ifc_image_format",
6455 FT_UINT16
, BASE_DEC
, VALS(vals_tn5250_image_format
), 0,
6458 { &hf_tn5250_wssf_ifc_viewport_location_row
,
6459 { "Viewport Location (Row)", "tn5250.wssf_ifc_viewport_location_row",
6460 FT_UINT8
, BASE_DEC
, NULL
, 0,
6462 { &hf_tn5250_wssf_ifc_viewport_location_col
,
6463 { "Viewport Location (Column)", "tn5250.wssf_ifc_viewport_location_col",
6464 FT_UINT8
, BASE_DEC
, NULL
, 0,
6466 { &hf_tn5250_wssf_ifc_viewport_size_row
,
6467 { "Viewport Size (Row)", "tn5250.wssf_ifc_viewport_size_row",
6468 FT_UINT8
, BASE_DEC
, NULL
, 0,
6470 { &hf_tn5250_wssf_ifc_viewport_size_col
,
6471 { "Viewport Size (Column)", "tn5250.wssf_ifc_viewport_size_col",
6472 FT_UINT8
, BASE_DEC
, NULL
, 0,
6475 { &hf_tn5250_wssf_ifc_scaling
,
6476 { "Scaling", "tn5250.wssf_ifc_scaling",
6477 FT_UINT16
, BASE_HEX
, VALS(vals_tn5250_wssf_ifc_scaling
), 0,
6480 { &hf_tn5250_wssf_ifc_viewimage_location_row
,
6481 { "View Image Location (Vertical Percentage)", "tn5250.wssf_ifc_viewimage_location_row",
6482 FT_UINT8
, BASE_DEC
, NULL
, 0,
6484 { &hf_tn5250_wssf_ifc_viewimage_location_col
,
6485 { "View Image Location (Horizontal Position)", "tn5250.wssf_ifc_viewimage_location_col",
6486 FT_UINT8
, BASE_DEC
, NULL
, 0,
6489 { &hf_tn5250_wssf_ifc_rotation
,
6490 { "Rotation (Degrees)", "tn5250.wssf_ifc_rotation",
6491 FT_UINT16
, BASE_DEC
, NULL
, 0,
6494 { &hf_tn5250_wssf_ifc_foreground_color
,
6495 { "Foreground Color", "tn5250.wssf_ifc_foreground_color",
6496 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_foreground_color_attributes
), 0,
6499 { &hf_tn5250_wssf_ifc_background_color
,
6500 { "Background Color", "tn5250.wssf_ifc_background_color",
6501 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_foreground_color_attributes
), 0,
6504 { &hf_tn5250_wssf_ifc_imagefax_name
,
6505 { "Image/Fax Name", "tn5250.wssf_ifc_imagefax_name",
6506 FT_STRING
, BASE_NONE
, NULL
, 0,
6509 /* 15.26.3 WRITE SINGLE STRUCTURED FIELD Command - IMAGE/FAX DOWNLOAD Command */
6510 { &hf_tn5250_wssf_ifd_flag1
,
6511 { "Byte 1", "tn5250.wssf_ifd_flag1",
6512 FT_UINT8
, BASE_HEX
, NULL
, 0,
6514 { &hf_tn5250_wssf_ifd_flag1_0
,
6515 { "Bit 0 (Last Data Stream flag)", "tn5250.wssf_ifd_flag1_0",
6516 FT_BOOLEAN
, 8, TFS(&tn5250_field_wssf_ifd_flag1_0
),
6517 0x01, NULL
, HFILL
}},
6518 { &hf_tn5250_wssf_ifd_flag1_reserved
,
6519 { "Reserved", "tn5250.wssf_ifd_flag1_reserved", FT_UINT8
, BASE_HEX
,
6520 NULL
, 0xFE, NULL
, HFILL
}},
6522 { &hf_tn5250_wssf_ifd_imagefax_name
,
6523 { "Image/Fax Name", "tn5250.wssf_ifd_imagefax_name",
6524 FT_STRING
, BASE_NONE
, NULL
, 0,
6526 { &hf_tn5250_wssf_ifd_imagefax_data
,
6527 { "Image/Fax Data", "tn5250.wssf_ifd_imagefax_data",
6528 FT_BYTES
, BASE_NONE
, NULL
, 0,
6531 { &hf_tn5250_image_fax_error
,
6532 { "Image/Fax Error", "tn5250.image_fax_error",
6533 FT_UINT16
, BASE_HEX
, VALS(vals_tn5250_image_fax_error
), 0,
6536 /* 15.26.4 WRITE SINGLE STRUCTURED FIELD Command - Video/Audio Controls Command Major Structure */
6537 { &hf_tn5250_vac_prefix
,
6538 { "Video/Audio Control Data Prefix", "tn5250.vac_data_prefix",
6539 FT_UINT16
, BASE_HEX
, NULL
, 0,
6541 { &hf_tn5250_vac_data
,
6542 { "Video/Audio Control Data", "tn5250.vac_data",
6543 FT_UINT32
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_vac_data
), 0,
6546 /* Appendix B.1 WRITE SINGLE STRUCTURED FIELD Command - True Transparency Write Command Major Structure */
6547 { &hf_tn5250_wssf_ttw_flag
,
6548 { "Flag", "tn5250.wssf_ttw_flag",
6549 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_wssf_ttw_flag
), 0,
6551 /* XXX - the document says "Currently, this command is designed
6552 only to pass ASCII data to some type of ASCII device."; should it
6553 be treated as an ASCII string? */
6554 { &hf_tn5250_wssf_ttw_data
,
6555 { "Transparent Data", "tn5250.wssf_ttw_data",
6556 FT_BYTES
, BASE_NONE
, NULL
, 0,
6559 /* 15.27 WRITE STRUCTURED FIELD (WSF) Command */
6560 /* 15.27.3 WRITE STRUCTURED FIELD (WSF) Command - 5250 QUERY STATION STATE Command*/
6561 { &hf_tn5250_wsf_qss_flag1
,
6562 { "Byte 1", "tn5250.wsf_qss_flag1",
6563 FT_UINT8
, BASE_HEX
, NULL
, 0,
6565 { &hf_tn5250_wsf_qss_flag1_0
,
6566 { "Bit 0", "tn5250.wsf_qss_flag1_0",
6567 FT_BOOLEAN
, 8, TFS(&tn5250_field_wsf_qss_flag1_0
),
6568 0x01, NULL
, HFILL
}},
6569 { &hf_tn5250_wsf_qss_flag1_reserved
,
6570 { "Reserved", "tn5250.wsf_qss_flag1_reserved", FT_UINT8
, BASE_HEX
,
6571 NULL
, 0xFE, NULL
, HFILL
}},
6572 { &hf_tn5250_wsf_qss_flag2
,
6573 { "Byte 2", "tn5250.wsf_qss_flag2",
6574 FT_UINT8
, BASE_HEX
, NULL
, 0,
6576 { &hf_tn5250_wsf_qss_flag2_reserved
,
6577 { "Reserved", "tn5250.wsf_qss_flag2_reserved", FT_UINT8
, BASE_HEX
,
6578 NULL
, 0x7F, NULL
, HFILL
}},
6579 { &hf_tn5250_wsf_qss_flag2_7
,
6580 { "Bit 7", "tn5250.wsf_qss_flag2_7",
6581 FT_BOOLEAN
, 8, TFS(&tn5250_field_wsf_qss_flag2_7
),
6582 0x80, NULL
, HFILL
}},
6584 /* 15.27.4.1 DEFINE AUDIT WINDOW TABLE Command */
6585 { &hf_tn5250_dawt_id
,
6586 { "ID", "tn5250.dawt_id",
6587 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dawt_id
), 0,
6589 { &hf_tn5250_dawt_length
,
6590 { "Length", "tn5250.dawt_length",
6591 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dawt_length
), 0,
6594 { &hf_tn5250_dawt_char
,
6595 { "Character", "tn5250.dawt_char",
6596 FT_STRING
, BASE_NONE
, NULL
, 0,
6598 { &hf_tn5250_dawt_message
,
6599 { "Message", "tn5250.dawt_message",
6600 FT_STRING
, BASE_NONE
, NULL
, 0,
6603 /* 15.27.4.2 DEFINE COMMAND KEY FUNCTION Command */
6604 { &hf_tn5250_dckf_id
,
6605 { "ID", "tn5250.dckf_id",
6606 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dckf_id
), 0,
6608 { &hf_tn5250_dckf_length
,
6609 { "Length", "tn5250.dckf_length",
6610 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dckf_length
), 0,
6612 { &hf_tn5250_dckf_key_code
,
6613 { "Key Code", "tn5250.dckf_key_code",
6614 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dckf_key_code
), 0,
6616 { &hf_tn5250_dckf_function_code
,
6617 { "Function Code", "tn5250.dckf_function_code",
6618 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_dckf_function_code
), 0,
6620 { &hf_tn5250_dckf_prompt_text
,
6621 { "Prompt Text", "tn5250.dckf_prompt_text",
6622 FT_STRING
, BASE_NONE
, NULL
, 0,
6625 /* 15.27.4.3 READ TEXT SCREEN Command */
6626 { &hf_tn5250_rts_partition
,
6627 { "Partition", "tn5250.rts_partition",
6628 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
6630 { &hf_tn5250_rts_flag1
,
6631 { "Byte 1", "tn5250.rts_flag1",
6632 FT_UINT8
, BASE_HEX
, NULL
, 0,
6634 { &hf_tn5250_rts_flag1_0
,
6635 { "Bit 0 (Last Data Stream flag)", "tn5250.rts_flag1_0",
6636 FT_BOOLEAN
, 8, TFS(&tn5250_field_rts_flag1_0
),
6637 0x01, NULL
, HFILL
}},
6638 { &hf_tn5250_rts_flag1_reserved
,
6639 { "Reserved", "tn5250.rts_flag1_reserved", FT_UINT8
, BASE_HEX
,
6640 NULL
, 0xFE, NULL
, HFILL
}},
6642 /* 15.27.4.4 DEFINE PENDING OPERATIONS Command */
6643 { &hf_tn5250_dpo_partition
,
6644 { "Partition", "tn5250.dpo_partition",
6645 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
6647 { &hf_tn5250_dpo_flag1
,
6648 { "Byte 1", "tn5250.dpo_flag1",
6649 FT_UINT8
, BASE_HEX
, NULL
, 0,
6651 { &hf_tn5250_dpo_flag1_0
,
6652 { "Bit 0", "tn5250.dpo_flag1_0",
6653 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_0
),
6654 0x01, NULL
, HFILL
}},
6655 { &hf_tn5250_dpo_flag1_1
,
6656 { "Bit 1", "tn5250.dpo_flag1_1",
6657 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_1
),
6658 0x02, NULL
, HFILL
}},
6659 { &hf_tn5250_dpo_flag1_2
,
6660 { "Bit 2", "tn5250.dpo_flag1_2",
6661 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_2
),
6662 0x04, NULL
, HFILL
}},
6663 { &hf_tn5250_dpo_flag1_3
,
6664 { "Bit 3", "tn5250.dpo_flag1_3",
6665 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_3
),
6666 0x08, NULL
, HFILL
}},
6667 { &hf_tn5250_dpo_flag1_4
,
6668 { "Bit 4", "tn5250.dpo_flag1_4",
6669 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_4
),
6670 0x10, NULL
, HFILL
}},
6671 { &hf_tn5250_dpo_flag1_5
,
6672 { "Bit 5", "tn5250.dpo_flag1_5",
6673 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_5
),
6674 0x20, NULL
, HFILL
}},
6675 { &hf_tn5250_dpo_flag1_6
,
6676 { "Bit 6", "tn5250.dpo_flag1_6",
6677 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_6
),
6678 0x40, NULL
, HFILL
}},
6679 { &hf_tn5250_dpo_flag1_7
,
6680 { "Bit 7", "tn5250.dpo_flag1_7",
6681 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag1_7
),
6682 0x80, NULL
, HFILL
}},
6684 { &hf_tn5250_dpo_flag2
,
6685 { "Byte 1", "tn5250.dpo_flag2",
6686 FT_UINT8
, BASE_HEX
, NULL
, 0,
6688 { &hf_tn5250_dpo_flag2_0
,
6689 { "Bit 0", "tn5250.dpo_flag2_0",
6690 FT_BOOLEAN
, 8, TFS(&tn5250_field_dpo_flag2_0
),
6691 0x01, NULL
, HFILL
}},
6692 { &hf_tn5250_dpo_flag2_reserved
,
6693 { "Reserved", "tn5250.dpo_flag2_reserved", FT_UINT8
, BASE_HEX
,
6694 NULL
, 0xFE, NULL
, HFILL
}},
6696 { &hf_tn5250_dpo_displace_characters
,
6697 { "Displaced Characters", "tn5250.dpo_displace_characters",
6698 FT_STRING
, BASE_NONE
, NULL
, 0,
6701 { &hf_tn5250_dpo_start_location_row
,
6702 { "Start Location (Row)", "tn5250.dpo_start_location_row",
6703 FT_UINT16
, BASE_DEC
, NULL
, 0,
6705 { &hf_tn5250_dpo_start_location_col
,
6706 { "Start Location (Column)", "tn5250.dpo_start_location_col",
6707 FT_UINT16
, BASE_DEC
, NULL
, 0,
6710 /* 15.27.4.5 DEFINE TEXT SCREEN FORMAT Command */
6711 { &hf_tn5250_dtsf_partition
,
6712 { "Partition", "tn5250.dtsf_partition",
6713 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
6715 { &hf_tn5250_dtsf_flag1
,
6716 { "Byte 1", "tn5250.dtsf_flag1",
6717 FT_UINT8
, BASE_HEX
, NULL
, 0,
6719 { &hf_tn5250_dtsf_flag1_0
,
6720 { "Bit 0", "tn5250.dtsf_flag1_0",
6721 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_0
),
6722 0x01, NULL
, HFILL
}},
6723 { &hf_tn5250_dtsf_flag1_1
,
6724 { "Bit 1", "tn5250.dtsf_flag1_1",
6725 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_1
),
6726 0x02, NULL
, HFILL
}},
6727 { &hf_tn5250_dtsf_flag1_2
,
6728 { "Bit 2", "tn5250.dtsf_flag1_2",
6729 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_2
),
6730 0x04, NULL
, HFILL
}},
6731 { &hf_tn5250_dtsf_flag1_3
,
6732 { "Bit 3", "tn5250.dtsf_flag1_3",
6733 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_3
),
6734 0x08, NULL
, HFILL
}},
6735 { &hf_tn5250_dtsf_flag1_4
,
6736 { "Bit 4", "tn5250.dtsf_flag1_4",
6737 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_4
),
6738 0x10, NULL
, HFILL
}},
6739 { &hf_tn5250_dtsf_flag1_5
,
6740 { "Bit 5", "tn5250.dtsf_flag1_5",
6741 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_5
),
6742 0x20, NULL
, HFILL
}},
6743 { &hf_tn5250_dtsf_flag1_6
,
6744 { "Bit 6", "tn5250.dtsf_flag1_6",
6745 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_6
),
6746 0x40, NULL
, HFILL
}},
6747 { &hf_tn5250_dtsf_flag1_7
,
6748 { "Bit 7", "tn5250.dtsf_flag1_7",
6749 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag1_7
),
6750 0x80, NULL
, HFILL
}},
6752 { &hf_tn5250_dtsf_flag2
,
6753 { "Byte 1", "tn5250.dtsf_flag2",
6754 FT_UINT8
, BASE_HEX
, NULL
, 0,
6756 { &hf_tn5250_dtsf_flag2_0
,
6757 { "Bit 0", "tn5250.dtsf_flag2_0",
6758 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag2_0
),
6759 0x01, NULL
, HFILL
}},
6760 { &hf_tn5250_dtsf_flag2_1
,
6761 { "Bit 1", "tn5250.dtsf_flag2_1",
6762 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag2_1
),
6763 0x02, NULL
, HFILL
}},
6764 { &hf_tn5250_dtsf_flag2_2
,
6765 { "Bit 2", "tn5250.dtsf_flag2_2",
6766 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag2_2
),
6767 0x04, NULL
, HFILL
}},
6768 { &hf_tn5250_dtsf_flag2_3
,
6769 { "Bit 3", "tn5250.dtsf_flag2_3",
6770 FT_BOOLEAN
, 8, TFS(&tn5250_field_dtsf_flag2_3
),
6771 0x08, NULL
, HFILL
}},
6772 { &hf_tn5250_dtsf_flag2_4to7
,
6773 { "Bits 4 to 7", "tn5250.dtsf_flag2_4to7",
6774 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dtsf_flag2_vals
), 0xF0,
6777 { &hf_tn5250_dtsf_text_body_height
,
6778 { "Text Body Height", "tn5250.dtsf_text_body_height",
6779 FT_UINT16
, BASE_DEC
, NULL
, 0,
6781 { &hf_tn5250_dtsf_text_body_width
,
6782 { "Text Body Width", "tn5250.dtsf_text_body_width",
6783 FT_UINT16
, BASE_DEC
, NULL
, 0,
6786 { &hf_tn5250_dtsf_line_cmd_field_size
,
6787 { "Line Cmd Field Size", "tn5250.dtsf_line_cmd_field_size",
6788 FT_UINT8
, BASE_DEC
, NULL
, 0,
6790 { &hf_tn5250_dtsf_location_of_pitch
,
6791 { "Location of Pitch", "tn5250.dtsf_location_of_pitch",
6792 FT_UINT8
, BASE_DEC
, NULL
, 0,
6794 { &hf_tn5250_dtsf_first_line
,
6795 { "First Line in Text Body", "tn5250.dtsf_first_line",
6796 FT_UINT8
, BASE_DEC
, NULL
, 0,
6799 /* 15.27.4.6 DEFINE SCALE LINE Command */
6800 { &hf_tn5250_dsl_partition
,
6801 { "Partition", "tn5250.dsl_partition",
6802 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
6804 { &hf_tn5250_dsl_rtl_offset
,
6805 { "RTL Offset", "tn5250.dsl_rtl_offset",
6806 FT_UINT8
, BASE_DEC
, NULL
, 0,
6808 { &hf_tn5250_dsl_offset
,
6809 { "Offset", "tn5250.dsl_offset",
6810 FT_UINT8
, BASE_DEC
, NULL
, 0,
6813 { &hf_tn5250_dsl_flag1
,
6814 { "Byte 1", "tn5250.dsl_flag1",
6815 FT_UINT8
, BASE_HEX
, NULL
, 0,
6817 { &hf_tn5250_dsl_flag1_0
,
6818 { "Bit 0", "tn5250.dsl_flag1_0",
6819 FT_BOOLEAN
, 8, TFS(&tn5250_field_dsl_flag1_0
),
6820 0x01, NULL
, HFILL
}},
6821 { &hf_tn5250_dsl_flag1_1
,
6822 { "Bit 1", "tn5250.dsl_flag1_1",
6823 FT_BOOLEAN
, 8, TFS(&tn5250_field_dsl_flag1_1
),
6824 0x02, NULL
, HFILL
}},
6825 { &hf_tn5250_dsl_flag1_2
,
6826 { "Bit 2", "tn5250.dsl_flag1_2",
6827 FT_BOOLEAN
, 8, TFS(&tn5250_field_dsl_flag1_2
),
6828 0x04, NULL
, HFILL
}},
6829 { &hf_tn5250_dsl_flag1_reserved
,
6830 { "Reserved", "tn5250.dsl_flag1_reserved", FT_UINT8
, BASE_HEX
,
6831 NULL
, 0xF8, NULL
, HFILL
}},
6833 { &hf_tn5250_dsl_id
,
6834 { "ID", "tn5250.dsl_id",
6835 FT_UINT8
, BASE_HEX
, NULL
, 0,
6837 { &hf_tn5250_dsl_location
,
6838 { "Location", "tn5250.dsl_location",
6839 FT_UINT8
, BASE_DEC
, NULL
, 0,
6841 { &hf_tn5250_dsl_function
,
6842 { "Function", "tn5250.dsl_function",
6843 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dsl_function
), 0x00,
6846 /* 15.27.4.7 WRITE TEXT SCREEN Command */
6847 { &hf_tn5250_wts_partition
,
6848 { "Partition", "tn5250.wts_partition",
6849 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
6852 { &hf_tn5250_wts_flag1
,
6853 { "Byte 1", "tn5250.wts_flag1",
6854 FT_UINT8
, BASE_HEX
, NULL
, 0,
6856 { &hf_tn5250_wts_flag1_0
,
6857 { "Bit 0", "tn5250.wts_flag1_0",
6858 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag1_0
),
6859 0x01, NULL
, HFILL
}},
6860 { &hf_tn5250_wts_flag1_1
,
6861 { "Bit 1", "tn5250.wts_flag1_1",
6862 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag1_1
),
6863 0x02, NULL
, HFILL
}},
6864 { &hf_tn5250_wts_flag1_2
,
6865 { "Bit 2", "tn5250.wts_flag1_2",
6866 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag1_2
),
6867 0x04, NULL
, HFILL
}},
6868 { &hf_tn5250_wts_flag1_3
,
6869 { "Bit 3", "tn5250.wts_flag1_3",
6870 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag1_3
),
6871 0x08, NULL
, HFILL
}},
6872 { &hf_tn5250_wts_flag1_reserved
,
6873 { "Reserved", "tn5250.wts_flag1_reserved", FT_UINT8
, BASE_HEX
,
6874 NULL
, 0xF0, NULL
, HFILL
}},
6876 { &hf_tn5250_wts_flag2
,
6877 { "Byte 2", "tn5250.wts_flag2",
6878 FT_UINT8
, BASE_HEX
, NULL
, 0,
6880 { &hf_tn5250_wts_flag2_reserved
,
6881 { "Reserved", "tn5250.wts_flag2_reserved", FT_UINT8
, BASE_HEX
,
6882 NULL
, 0x1F, NULL
, HFILL
}},
6883 { &hf_tn5250_wts_flag2_6
,
6884 { "Bit 6", "tn5250.wts_flag2_6",
6885 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag2_6
),
6886 0x20, NULL
, HFILL
}},
6887 { &hf_tn5250_wts_flag2_reserved2
,
6888 { "Reserved", "tn5250.wts_flag2_reserved2", FT_UINT8
, BASE_HEX
,
6889 NULL
, 0xC0, NULL
, HFILL
}},
6891 { &hf_tn5250_wts_flag3
,
6892 { "Byte 3", "tn5250.wts_flag3",
6893 FT_UINT8
, BASE_HEX
, NULL
, 0,
6895 { &hf_tn5250_wts_flag3_0
,
6896 { "Bit 0", "tn5250.wts_flag3_0",
6897 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_0
),
6898 0x01, NULL
, HFILL
}},
6899 { &hf_tn5250_wts_flag3_1
,
6900 { "Bit 1", "tn5250.wts_flag3_1",
6901 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_1
),
6902 0x02, NULL
, HFILL
}},
6903 { &hf_tn5250_wts_flag3_2
,
6904 { "Bit 2", "tn5250.wts_flag3_2",
6905 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_2
),
6906 0x04, NULL
, HFILL
}},
6907 { &hf_tn5250_wts_flag3_3
,
6908 { "Bit 3", "tn5250.wts_flag3_3",
6909 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_3
),
6910 0x08, NULL
, HFILL
}},
6911 { &hf_tn5250_wts_flag3_4
,
6912 { "Bit 4", "tn5250.wts_flag3_4",
6913 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_4
),
6914 0x10, NULL
, HFILL
}},
6915 { &hf_tn5250_wts_flag3_5
,
6916 { "Bit 5", "tn5250.wts_flag3_5",
6917 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_5
),
6918 0x20, NULL
, HFILL
}},
6919 { &hf_tn5250_wts_flag3_6
,
6920 { "Bit 6", "tn5250.wts_flag3_6",
6921 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_6
),
6922 0x40, NULL
, HFILL
}},
6923 { &hf_tn5250_wts_flag3_7
,
6924 { "Bit 7", "tn5250.wts_flag3_7",
6925 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_flag3_7
),
6926 0x80, NULL
, HFILL
}},
6928 { &hf_tn5250_wts_home_position_row
,
6929 { "Home Position (Row)", "tn5250.wts_home_position_row",
6930 FT_UINT16
, BASE_DEC
, NULL
, 0,
6932 { &hf_tn5250_wts_home_position_col
,
6933 { "Home Position (Column)", "tn5250.wts_home_position_col",
6934 FT_UINT16
, BASE_DEC
, NULL
, 0,
6937 /* Structure of the WRITE TEXT SCREEN Command Line Data */
6938 { &hf_tn5250_wts_cld_flag1
,
6939 { "Byte 1", "tn5250.wts_cld_flag1",
6940 FT_UINT8
, BASE_HEX
, NULL
, 0,
6942 { &hf_tn5250_wts_cld_flag1_0
,
6943 { "Bit 0", "tn5250.wts_cld_flag1_0",
6944 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_0
),
6945 0x01, NULL
, HFILL
}},
6946 { &hf_tn5250_wts_cld_flag1_1
,
6947 { "Bit 1", "tn5250.wts_cld_flag1_1",
6948 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_1
),
6949 0x02, NULL
, HFILL
}},
6950 { &hf_tn5250_wts_cld_flag1_2
,
6951 { "Bit 2", "tn5250.wts_cld_flag1_2",
6952 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_2
),
6953 0x04, NULL
, HFILL
}},
6954 { &hf_tn5250_wts_cld_flag1_3
,
6955 { "Bit 3", "tn5250.wts_cld_flag1_3",
6956 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_3
),
6957 0x08, NULL
, HFILL
}},
6958 { &hf_tn5250_wts_cld_flag1_4
,
6959 { "Bit 4", "tn5250.wts_cld_flag1_4",
6960 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_4
),
6961 0x10, NULL
, HFILL
}},
6962 { &hf_tn5250_wts_cld_flag1_5
,
6963 { "Bit 5", "tn5250.wts_cld_flag1_5",
6964 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_5
),
6965 0x20, NULL
, HFILL
}},
6966 { &hf_tn5250_wts_cld_flag1_6
,
6967 { "Bit 6", "tn5250.wts_cld_flag1_6",
6968 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_6
),
6969 0x40, NULL
, HFILL
}},
6970 { &hf_tn5250_wts_cld_flag1_7
,
6971 { "Bit 7", "tn5250.wts_cld_flag1_7",
6972 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag1_7
),
6973 0x80, NULL
, HFILL
}},
6975 { &hf_tn5250_wts_cld_flag2
,
6976 { "Byte 2", "tn5250.wts_cld_flag2",
6977 FT_UINT8
, BASE_HEX
, NULL
, 0,
6979 { &hf_tn5250_wts_cld_flag2_0
,
6980 { "Bit 0", "tn5250.wts_cld_flag2_0",
6981 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag2_0
),
6982 0x01, NULL
, HFILL
}},
6983 { &hf_tn5250_wts_cld_flag2_1
,
6984 { "Bit 1", "tn5250.wts_cld_flag2_1",
6985 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag2_1
),
6986 0x02, NULL
, HFILL
}},
6987 { &hf_tn5250_wts_cld_flag2_2
,
6988 { "Bit 2", "tn5250.wts_cld_flag2_2",
6989 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag2_2
),
6990 0x04, NULL
, HFILL
}},
6991 { &hf_tn5250_wts_cld_flag2_3
,
6992 { "Bit 3", "tn5250.wts_cld_flag2_3",
6993 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag2_3
),
6994 0x08, NULL
, HFILL
}},
6995 { &hf_tn5250_wts_cld_flag2_4
,
6996 { "Bit 4", "tn5250.wts_cld_flag2_4",
6997 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag2_4
),
6998 0x10, NULL
, HFILL
}},
6999 { &hf_tn5250_wts_cld_flag2_line_spacing
,
7000 { "Line Spacing in Half-Units", "tn5250.wts_cld_flag2_line_spacing", FT_UINT8
, BASE_DEC
,
7001 NULL
, 0xE0, NULL
, HFILL
}},
7003 { &hf_tn5250_wts_cld_row
,
7004 { "Row", "tn5250.wts_cld_row",
7005 FT_UINT16
, BASE_DEC
, NULL
, 0,
7008 { &hf_tn5250_wts_cld_flag3
,
7009 { "Byte 3", "tn5250.wts_cld_flag3",
7010 FT_UINT8
, BASE_HEX
, NULL
, 0,
7012 { &hf_tn5250_wts_cld_flag3_0
,
7013 { "Bit 0", "tn5250.wts_cld_flag3_0",
7014 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_0
),
7015 0x01, NULL
, HFILL
}},
7016 { &hf_tn5250_wts_cld_flag3_1
,
7017 { "Bit 1", "tn5250.wts_cld_flag3_1",
7018 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_1
),
7019 0x02, NULL
, HFILL
}},
7020 { &hf_tn5250_wts_cld_flag3_2
,
7021 { "Bit 2", "tn5250.wts_cld_flag3_2",
7022 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_2
),
7023 0x04, NULL
, HFILL
}},
7024 { &hf_tn5250_wts_cld_flag3_3
,
7025 { "Bit 3", "tn5250.wts_cld_flag3_3",
7026 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_3
),
7027 0x08, NULL
, HFILL
}},
7028 { &hf_tn5250_wts_cld_flag3_4
,
7029 { "Bit 4", "tn5250.wts_cld_flag3_4",
7030 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_4
),
7031 0x10, NULL
, HFILL
}},
7032 { &hf_tn5250_wts_cld_flag3_5
,
7033 { "Bit 5", "tn5250.wts_cld_flag3_5",
7034 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_5
),
7035 0x20, NULL
, HFILL
}},
7036 { &hf_tn5250_wts_cld_flag3_6
,
7037 { "Bit 6", "tn5250.wts_cld_flag3_6",
7038 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_6
),
7039 0x40, NULL
, HFILL
}},
7040 { &hf_tn5250_wts_cld_flag3_7
,
7041 { "Bit 7", "tn5250.wts_cld_flag3_7",
7042 FT_BOOLEAN
, 8, TFS(&tn5250_field_wts_cld_flag3_7
),
7043 0x80, NULL
, HFILL
}},
7045 { &hf_tn5250_wts_cld_page_num
,
7046 { "Page Number", "tn5250.wts_cld_page_num",
7047 FT_UINT16
, BASE_DEC
, NULL
, 0,
7050 { &hf_tn5250_wts_cld_lmo
,
7051 { "Left Margin Offset", "tn5250.wts_cld_lmo",
7052 FT_UINT8
, BASE_DEC
, NULL
, 0,
7054 { &hf_tn5250_wts_cld_io
,
7055 { "Indent Offset", "tn5250.wts_cld_io",
7056 FT_UINT8
, BASE_DEC
, NULL
, 0,
7058 { &hf_tn5250_wts_cld_sli
,
7059 { "Scale Line ID", "tn5250.wts_cld_sli",
7060 FT_UINT8
, BASE_DEC
, NULL
, 0,
7062 { &hf_tn5250_wts_cld_li
,
7063 { "Line Image", "tn5250.wts_cld_li",
7064 FT_STRING
, BASE_NONE
, NULL
, 0,
7067 /* 15.27.4.8 DEFINE SPECIAL CHARACTERS Command */
7068 { &hf_tn5250_dsc_partition
,
7069 { "Partition", "tn5250.dsc_partition",
7070 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
7072 { &hf_tn5250_dsc_sk
,
7073 { "Symbol Key", "tn5250.dsc_sk",
7074 FT_UINT8
, BASE_HEX
, NULL
, 0,
7076 { &hf_tn5250_dsc_ev
,
7077 { "EBCDIC Value", "tn5250.dsc_ev",
7078 FT_STRING
, BASE_NONE
, NULL
, 0,
7081 /* 15.27.4.10 DEFINE OPERATOR ERROR MESSAGES Command */
7082 { &hf_tn5250_dorm_id
,
7083 { "ID", "tn5250.dorm_id",
7084 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dorm_id
), 0x00,
7086 { &hf_tn5250_dorm_length
,
7087 { "Length", "tn5250.dorm_length",
7088 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dorm_length
), 0,
7091 { &hf_tn5250_dorm_ec
,
7092 { "Error Code", "tn5250.dorm_ec",
7093 FT_UINT16
, BASE_HEX
, NULL
, 0,
7095 { &hf_tn5250_dorm_mt
,
7096 { "Message Text", "tn5250.dorm_mt",
7097 FT_STRING
, BASE_NONE
, NULL
, 0,
7100 /* 15.27.4.11 DEFINE PITCH TABLE Command */
7101 { &hf_tn5250_dpt_id
,
7102 { "ID", "tn5250.dpt_id",
7103 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dpt_id
), 0x00,
7105 { &hf_tn5250_dpt_ec
,
7106 { "EBCDIC Code", "tn5250.dpt_ec",
7107 FT_STRING
, BASE_NONE
, NULL
, 0,
7110 /* 15.27.4.12 DEFINE FAKE DP COMMAND KEY FUNCTION Command */
7111 { &hf_tn5250_dfdpck_partition
,
7112 { "Partition", "tn5250.dfdpck_partition",
7113 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_rts_partition
), 0,
7116 { &hf_tn5250_dfdpck_data_field
,
7117 { "Data Field", "tn5250.dfdpck_data_field",
7118 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_dfdpck_data_field
), 0,
7121 /* Structure of the DEFINE FAKE DP COMMAND KEY FUNCTION Core Area Command Keys */
7122 { &hf_tn5250_dfdpck_coreflag
,
7123 { "Core Area Flag", "tn5250.dfdpck_coreflag",
7124 FT_UINT8
, BASE_HEX
, NULL
, 0,
7126 { &hf_tn5250_dfdpck_coreflag_0
,
7127 { "Bit 0", "tn5250.dfdpck_coreflag_0",
7128 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_0
),
7129 0x01, NULL
, HFILL
}},
7130 { &hf_tn5250_dfdpck_coreflag_1
,
7131 { "Bit 1", "tn5250.dfdpck_coreflag_1",
7132 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_1
),
7133 0x02, NULL
, HFILL
}},
7134 { &hf_tn5250_dfdpck_coreflag_2
,
7135 { "Bit 2", "tn5250.dfdpck_coreflag_2",
7136 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_2
),
7137 0x04, NULL
, HFILL
}},
7138 { &hf_tn5250_dfdpck_coreflag_3
,
7139 { "Bit 3", "tn5250.dfdpck_coreflag_3",
7140 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_3
),
7141 0x08, NULL
, HFILL
}},
7142 { &hf_tn5250_dfdpck_coreflag_4
,
7143 { "Bit 4", "tn5250.dfdpck_coreflag_4",
7144 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_4
),
7145 0x10, NULL
, HFILL
}},
7146 { &hf_tn5250_dfdpck_coreflag_5
,
7147 { "Bit 5", "tn5250.dfdpck_coreflag_5",
7148 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_5
),
7149 0x20, NULL
, HFILL
}},
7150 { &hf_tn5250_dfdpck_coreflag_6
,
7151 { "Bit 6", "tn5250.dfdpck_coreflag_6",
7152 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_6
),
7153 0x40, NULL
, HFILL
}},
7154 { &hf_tn5250_dfdpck_coreflag_7
,
7155 { "Bit 7", "tn5250.dfdpck_coreflag_7",
7156 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_coreflag_7
),
7157 0x80, NULL
, HFILL
}},
7159 /* Structure of the DEFINE FAKE DP COMMAND KEY FUNCTION Top Row Command Keys */
7161 { &hf_tn5250_dfdpck_toprowflag1
,
7162 { "Top Row Flags", "tn5250.dfdpck_toprowflag1",
7163 FT_UINT8
, BASE_HEX
, NULL
, 0,
7165 { &hf_tn5250_dfdpck_toprowflag1_0
,
7166 { "Bit 0", "tn5250.dfdpck_toprowflag1_0",
7167 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_0
),
7168 0x01, NULL
, HFILL
}},
7169 { &hf_tn5250_dfdpck_toprowflag1_1
,
7170 { "Bit 1", "tn5250.dfdpck_toprowflag1_1",
7171 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_1
),
7172 0x02, NULL
, HFILL
}},
7173 { &hf_tn5250_dfdpck_toprowflag1_2
,
7174 { "Bit 2", "tn5250.dfdpck_toprowflag1_2",
7175 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_2
),
7176 0x04, NULL
, HFILL
}},
7177 { &hf_tn5250_dfdpck_toprowflag1_3
,
7178 { "Bit 3", "tn5250.dfdpck_toprowflag1_3",
7179 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_3
),
7180 0x08, NULL
, HFILL
}},
7181 { &hf_tn5250_dfdpck_toprowflag1_4
,
7182 { "Bit 4", "tn5250.dfdpck_toprowflag1_4",
7183 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_4
),
7184 0x10, NULL
, HFILL
}},
7185 { &hf_tn5250_dfdpck_toprowflag1_5
,
7186 { "Bit 5", "tn5250.dfdpck_toprowflag1_5",
7187 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_5
),
7188 0x20, NULL
, HFILL
}},
7189 { &hf_tn5250_dfdpck_toprowflag1_6
,
7190 { "Bit 6", "tn5250.dfdpck_toprowflag1_6",
7191 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_6
),
7192 0x40, NULL
, HFILL
}},
7193 { &hf_tn5250_dfdpck_toprowflag1_7
,
7194 { "Bit 7", "tn5250.dfdpck_toprowflag1_7",
7195 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag1_7
),
7196 0x80, NULL
, HFILL
}},
7198 { &hf_tn5250_dfdpck_toprowflag2
,
7199 { "Top Row Flags", "tn5250.dfdpck_toprowflag2",
7200 FT_UINT8
, BASE_HEX
, NULL
, 0,
7202 { &hf_tn5250_dfdpck_toprowflag2_0
,
7203 { "Bit 0", "tn5250.dfdpck_toprowflag2_0",
7204 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_0
),
7205 0x01, NULL
, HFILL
}},
7206 { &hf_tn5250_dfdpck_toprowflag2_1
,
7207 { "Bit 1", "tn5250.dfdpck_toprowflag2_1",
7208 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_1
),
7209 0x02, NULL
, HFILL
}},
7210 { &hf_tn5250_dfdpck_toprowflag2_2
,
7211 { "Bit 2", "tn5250.dfdpck_toprowflag2_2",
7212 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_2
),
7213 0x04, NULL
, HFILL
}},
7214 { &hf_tn5250_dfdpck_toprowflag2_3
,
7215 { "Bit 3", "tn5250.dfdpck_toprowflag2_3",
7216 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_3
),
7217 0x08, NULL
, HFILL
}},
7218 { &hf_tn5250_dfdpck_toprowflag2_4
,
7219 { "Bit 4", "tn5250.dfdpck_toprowflag2_4",
7220 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_4
),
7221 0x10, NULL
, HFILL
}},
7222 { &hf_tn5250_dfdpck_toprowflag2_5
,
7223 { "Bit 5", "tn5250.dfdpck_toprowflag2_5",
7224 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_5
),
7225 0x20, NULL
, HFILL
}},
7226 { &hf_tn5250_dfdpck_toprowflag2_6
,
7227 { "Bit 6", "tn5250.dfdpck_toprowflag2_6",
7228 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_6
),
7229 0x40, NULL
, HFILL
}},
7230 { &hf_tn5250_dfdpck_toprowflag2_7
,
7231 { "Bit 7", "tn5250.dfdpck_toprowflag2_7",
7232 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag2_7
),
7233 0x80, NULL
, HFILL
}},
7235 { &hf_tn5250_dfdpck_toprowflag3
,
7236 { "Top Row Flags", "tn5250.dfdpck_toprowflag3",
7237 FT_UINT8
, BASE_HEX
, NULL
, 0,
7239 { &hf_tn5250_dfdpck_toprowflag3_0
,
7240 { "Bit 0", "tn5250.dfdpck_toprowflag3_0",
7241 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_0
),
7242 0x01, NULL
, HFILL
}},
7243 { &hf_tn5250_dfdpck_toprowflag3_1
,
7244 { "Bit 1", "tn5250.dfdpck_toprowflag3_1",
7245 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_1
),
7246 0x02, NULL
, HFILL
}},
7247 { &hf_tn5250_dfdpck_toprowflag3_2
,
7248 { "Bit 2", "tn5250.dfdpck_toprowflag3_2",
7249 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_2
),
7250 0x04, NULL
, HFILL
}},
7251 { &hf_tn5250_dfdpck_toprowflag3_3
,
7252 { "Bit 3", "tn5250.dfdpck_toprowflag3_3",
7253 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_3
),
7254 0x08, NULL
, HFILL
}},
7255 { &hf_tn5250_dfdpck_toprowflag3_4
,
7256 { "Bit 4", "tn5250.dfdpck_toprowflag3_4",
7257 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_4
),
7258 0x10, NULL
, HFILL
}},
7259 { &hf_tn5250_dfdpck_toprowflag3_5
,
7260 { "Bit 5", "tn5250.dfdpck_toprowflag3_5",
7261 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_5
),
7262 0x20, NULL
, HFILL
}},
7263 { &hf_tn5250_dfdpck_toprowflag3_6
,
7264 { "Bit 6", "tn5250.dfdpck_toprowflag3_6",
7265 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_6
),
7266 0x40, NULL
, HFILL
}},
7267 { &hf_tn5250_dfdpck_toprowflag3_7
,
7268 { "Bit 7", "tn5250.dfdpck_toprowflag3_7",
7269 FT_BOOLEAN
, 8, TFS(&tn5250_field_dfdpck_toprowflag3_7
),
7270 0x80, NULL
, HFILL
}},
7272 /* 15.28 COPY-TO-PRINTER Command */
7273 { &hf_tn5250_ctp_lsid
,
7274 { "Printer LSID", "tn5250.ctp_lsid",
7275 FT_UINT8
, BASE_HEX
, NULL
, 0,
7277 { &hf_tn5250_ctp_mlpp
,
7278 { "Max Lines Per Page", "tn5250.ctp_mlpp",
7279 FT_UINT8
, BASE_DEC
, NULL
, 0,
7282 /*TN5250 - RFC1205 - Query Reply Fields */
7283 { &hf_tn5250_qr_flag
,
7284 { "Flag", "tn5250.qr_flag",
7285 FT_UINT8
, BASE_HEX
, NULL
, 0,
7287 { &hf_tn5250_qr_flag_0
,
7288 { "Bit 1", "tn5250.qr_flag_0",
7289 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag_0
),
7290 0x80, NULL
, HFILL
}},
7291 { &hf_tn5250_qr_flag_reserved
,
7292 { "Reserved", "tn5250.qr_flag_reserved", FT_UINT8
, BASE_HEX
,
7293 NULL
, 0x7F, NULL
, HFILL
}},
7294 { &hf_tn5250_qr_chc
,
7295 { "Controller Hardware Class", "tn5250.qr_chc",
7296 FT_UINT16
, BASE_HEX
, VALS(vals_tn5250_chc
), 0x0,
7298 { &hf_tn5250_qr_ccl
,
7299 { "Controller Code Level", "tn5250.qr_ccl",
7300 FT_UINT24
, BASE_HEX
, NULL
, 0x0,
7303 { "Device Type", "tn5250.qr_dt",
7304 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_dt
), 0x0,
7306 { &hf_tn5250_qr_dtc
,
7307 { "Device Type", "tn5250.qr_dtc",
7308 FT_STRING
, BASE_NONE
, NULL
, 0x0,
7311 { "Device Model", "tn5250.qr_dm",
7312 FT_STRING
, BASE_NONE
, NULL
, 0x0,
7315 { "Keyboard ID", "tn5250.qr_ki",
7316 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_qr_ki
), 0x0,
7318 { &hf_tn5250_qr_eki
,
7319 { "Extended Keyboard ID", "tn5250.qr_eki",
7320 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
7322 { &hf_tn5250_qr_dsn
,
7323 { "Display Serial Number", "tn5250.qr_dsn",
7324 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
7326 { &hf_tn5250_qr_mni
,
7327 { "Maximum number of input fields", "tn5250.qr_mni",
7328 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
7331 { &hf_tn5250_qr_flag1
,
7332 { "Flags", "tn5250.qr_flag1",
7333 FT_UINT8
, BASE_HEX
, NULL
, 0,
7335 { &hf_tn5250_qr_flag1_0
,
7336 { "Bit 0 (Reserved)", "tn5250.qr_flag1_0",
7337 FT_BOOLEAN
, 8, NULL
,
7338 0x80, NULL
, HFILL
}},
7339 { &hf_tn5250_qr_flag1_1
,
7340 { "Bit 1", "tn5250.qr_flag1_1",
7341 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_1
),
7342 0x40, NULL
, HFILL
}},
7343 { &hf_tn5250_qr_flag1_2
,
7344 { "Bit 2", "tn5250.qr_flag1_2",
7345 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_2
),
7346 0x20, NULL
, HFILL
}},
7347 { &hf_tn5250_qr_flag1_3
,
7348 { "Bit 3", "tn5250.qr_flag1_3",
7349 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_3
),
7350 0x10, NULL
, HFILL
}},
7351 { &hf_tn5250_qr_flag1_4
,
7352 { "Bit 4", "tn5250.qr_flag1_4",
7353 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_4
),
7354 0x08, NULL
, HFILL
}},
7355 { &hf_tn5250_qr_flag1_5
,
7356 { "Bit 5", "tn5250.qr_flag1_5",
7357 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_5
),
7358 0x04, NULL
, HFILL
}},
7359 { &hf_tn5250_qr_flag1_6
,
7360 { "Bit 6", "tn5250.qr_flag1_6",
7361 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_6
),
7362 0x02, NULL
, HFILL
}},
7363 { &hf_tn5250_qr_flag1_7
,
7364 { "Bit 7", "tn5250.qr_flag1_7",
7365 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag1_7
),
7366 0x01, NULL
, HFILL
}},
7368 { &hf_tn5250_qr_flag2
,
7369 { "Flags", "tn5250.qr_flag2",
7370 FT_UINT8
, BASE_HEX
, NULL
, 0,
7372 { &hf_tn5250_qr_flag2_0to3
,
7373 { "Bits 0 to 3", "tn5250.qr_flag2_0to3", FT_UINT8
, BASE_HEX
,
7374 VALS(vals_tn5250_qr_flag2_0to3
), 0xF0, NULL
, HFILL
}},
7375 { &hf_tn5250_qr_flag2_4
,
7376 { "Bit 4", "tn5250.qr_flag2_4",
7377 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag2_4
),
7378 0x08, NULL
, HFILL
}},
7379 { &hf_tn5250_qr_flag2_5
,
7380 { "Bit 5", "tn5250.qr_flag2_5",
7381 FT_BOOLEAN
, 8, TFS(&tn5250_field_qr_flag2_5
),
7382 0x04, NULL
, HFILL
}},
7383 { &hf_tn5250_qr_flag2_6to7
,
7384 { "Bits 6 to 7", "tn5250.qr_flag2_6to7", FT_UINT8
, BASE_HEX
,
7385 VALS(vals_tn5250_qr_flag2_6to7
), 0x03, NULL
, HFILL
}},
7387 { &hf_tn5250_qr_flag3
,
7388 { "Flags", "tn5250.qr_flag3",
7389 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_qr_flag3
), 0,
7391 { &hf_tn5250_qr_flag4
,
7392 { "Flags", "tn5250.qr_flag4",
7393 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_qr_flag4
), 0,
7398 { &hf_tn5250_order_code
, { "Order Code", "tn5250.order_code",
7399 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_order_codes
), 0x0, NULL
, HFILL
}},
7400 { &hf_tn5250_attribute_type
, { "Attribute Type", "tn5250.attribute",
7401 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_attributes
), 0x0, NULL
, HFILL
}},
7402 { &hf_tn5250_aid
, { "Attention Identification", "tn5250.aid",
7403 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
,
7404 RVALS(vals_tn5250_attention_identification_bytes
), 0x0, NULL
, HFILL
}},
7406 /* Miscellaneous Fields */
7407 { &hf_tn5250_buffer_x
, { "Row Address", "tn5250.buffer_x",
7408 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7409 { &hf_tn5250_buffer_y
, { "Column Address", "tn5250.buffer_y",
7410 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7411 { &hf_tn5250_length
, { "Length", "tn5250.length",
7412 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7413 { &hf_tn5250_length_twobyte
, { "Length", "tn5250.length",
7414 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7415 { &hf_tn5250_field_data
,
7416 { "Field Data", "tn5250.field_data", FT_STRING
, BASE_NONE
, NULL
, 0x0,
7418 { &hf_tn5250_reserved
, { "Flags (Reserved):", "tn5250.reserved",
7419 FT_UINT8
, BASE_HEX
|BASE_RANGE_STRING
, RVALS(vals_tn5250_reserved
), 0,
7421 { &hf_tn5250_unknown_data
,
7422 { "Unknown Data (Possible Mainframe/Emulator Bug)", "tn5250.unknown_data",
7423 FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
7425 /*TN5250 - RFC1205 - SNA Header Fields */
7426 { &hf_tn5250_logical_record_length
,
7427 { "TN5250 Logical Record Length", "tn5250.logical_record_length",
7428 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7429 { &hf_tn5250_sna_record_type
,
7430 { "TN5250 SNA Record Type", "tn5250.sna_record_type",
7431 FT_UINT16
, BASE_HEX
, VALS(vals_tn5250_sna_record_type
), 0x0,
7433 { &hf_tn5250_variable_record_length
,
7434 { "TN5250 Variable Record Length", "tn5250.variable_record_length",
7435 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7436 { &hf_tn5250_header_flags
, { "TN5250 SNA Flags", "tn5250.header_flags",
7437 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7438 { &hf_tn5250_ds_output_error
,
7439 { "Data Stream Output Error",
7440 "tn5250.ds_output_error", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7441 { &hf_tn5250_attn_key
,
7442 { "5250 attention key was pressed.",
7443 "tn5250.attn_key", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7444 { &hf_tn5250_sys_request_key
,
7445 { "5250 System Request key was pressed",
7446 "tn5250.sys_request_key", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7447 { &hf_tn5250_test_request_key
,
7448 { "5250 Test Request key was pressed",
7449 "tn5250.test_request_key", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7450 { &hf_tn5250_error_state
,
7452 "tn5250.error_state", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7453 { &hf_tn5250_operation_code
,
7454 { "TN5250 Operation Code", "tn5250.operation_code",
7455 FT_UINT8
, BASE_HEX
, VALS(vals_tn5250_header_operation_code
), 0x0,
7457 { &hf_tn5250_error_code
,
7458 { "TN5250 Error Code", "tn5250.error_code",
7459 FT_UINT16
, BASE_HEX
, VALS(vals_tn5250_header_error_codes
), 0x0,
7462 /* 13.4 SNA LU 4 and LU 7 Negative Responses */
7463 { &hf_tn5250_negative_response
,
7464 { "Negative Response", "tn5250.negative_response",
7465 FT_UINT32
, BASE_HEX
, VALS(vals_tn5250_negative_responses
), 0x0,
7470 static gint
*ett
[] = {
7474 &ett_tn5250_field_attribute
,
7475 &ett_tn5250_dfdpck_mask
,
7476 &ett_tn5250_field_validation
,
7477 &ett_tn5250_header_flags
,
7478 &ett_tn5250_roll_mask
,
7479 &ett_tn5250_soh_mask
,
7480 &ett_tn5250_soh_pf16to9_mask
,
7481 &ett_tn5250_soh_pf24to17_mask
,
7482 &ett_tn5250_soh_pf8to1_mask
,
7483 &ett_tn5250_sps_mask
,
7484 &ett_tn5250_wdsf_cw_bp_mask
,
7485 &ett_tn5250_wdsf_cw_mask
,
7486 &ett_tn5250_wdsf_cw_tf_mask
,
7487 &ett_tn5250_wdsf_deg_mask
,
7488 &ett_tn5250_wdsf_deg_ms_mask
,
7489 &ett_tn5250_wdsf_ds_ci_mask
,
7490 &ett_tn5250_wdsf_ds_cpda_mask
,
7491 &ett_tn5250_wdsf_ds_ct_mask
,
7492 &ett_tn5250_wdsf_ds_mask
,
7493 &ett_tn5250_wdsf_ds_mbs_mask
,
7494 &ett_tn5250_wdsf_ds_sbi_mask
,
7495 &ett_tn5250_wdsf_dsb_mask
,
7496 &ett_tn5250_wdsf_pmb_mask
,
7497 &ett_tn5250_wdsf_ragc_mask
,
7498 &ett_tn5250_wdsf_rgw_mask
,
7499 &ett_tn5250_wdsf_wdf_mask
,
7500 &ett_tn5250_wsf_dpo_mask
,
7501 &ett_tn5250_wsf_dsl_mask
,
7502 &ett_tn5250_wsf_dtsf_mask
,
7503 &ett_tn5250_wsf_qss_mask
,
7504 &ett_tn5250_wsf_rts_mask
,
7505 &ett_tn5250_wssf_cc_mask
,
7506 &ett_tn5250_wssf_ifc_mask
,
7507 &ett_tn5250_wssf_ifd_mask
,
7508 &ett_tn5250_wssf_kbc_mask
,
7509 &ett_tn5250_wssf_mask
,
7510 &ett_tn5250_wts_mask
,
7511 &ett_tn5250_wea_prim_attr
,
7512 &ett_tn5250_qr_mask
,
7516 proto_tn5250
= proto_register_protocol("TN5250 Protocol", "TN5250", "tn5250");
7517 register_dissector("tn5250", dissect_tn5250
, proto_tn5250
);
7518 proto_register_field_array(proto_tn5250
, hf
, array_length(hf
));
7519 proto_register_subtree_array(ett
, array_length(ett
));