2 * Routines for Novell Modular Authentication Service
3 * Greg Morris <gmorris@novell.com>
4 * Copyright (c) Novell, Inc. 2002-2004
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 #include <epan/packet.h>
31 #include <epan/wmem/wmem.h>
32 #include "packet-ncp-int.h"
33 #include "packet-ncp-nmas.h"
35 static gint ett_nmas
= -1;
37 static int proto_nmas
= -1;
38 /* static int hf_func = -1; */
39 /* static int hf_subfunc = -1; */
40 static int hf_ping_version
= -1;
41 static int hf_ping_flags
= -1;
42 static int hf_frag_handle
= -1;
43 static int hf_length
= -1;
44 static int hf_subverb
= -1;
45 static int hf_tree
= -1;
46 static int hf_user
= -1;
47 static int hf_nmas_version
= -1;
48 static int hf_msg_version
= -1;
49 static int hf_session_ident
= -1;
50 static int hf_msg_verb
= -1;
51 /* static int hf_attribute = -1; */
52 static int hf_clearance
= -1;
53 static int hf_login_sequence
= -1;
54 static int hf_opaque
= -1;
55 static int hf_data
= -1;
56 static int hf_return_code
= -1;
57 static int hf_lsm_verb
= -1;
58 static int hf_squeue_bytes
= -1;
59 static int hf_cqueue_bytes
= -1;
60 static int hf_num_creds
= -1;
61 static int hf_cred_type
= -1;
62 static int hf_login_state
= -1;
63 static int hf_enc_cred
= -1;
64 static int hf_enc_data
= -1;
65 static int hf_reply_buffer_size
= -1;
66 static int hf_encrypt_error
= -1;
68 static expert_field ei_encrypt_error
= EI_INIT
;
69 static expert_field ei_return_error
= EI_INIT
;
71 static const value_string nmas_func_enum
[] = {
78 static const value_string nmas_subverb_enum
[] = {
79 { 0, "Fragmented Ping" },
80 { 2, "Client Put Data" },
81 { 4, "Client Get Data" },
82 { 6, "Client Get User NDS Credentials" },
83 { 8, "Login Store Management" },
84 { 10, "Writable Object Check" },
85 { 1242, "Message Handler" },
89 static const value_string nmas_msgverb_enum
[] = {
91 { 3, "Start Session" },
92 { 5, "Client Write Data" },
93 { 7, "Client Read Data" },
99 static const value_string nmas_attribute_enum
[] = {
103 { 11, "Login Sequence" },
108 static const value_string nmas_lsmverb_enum
[] = {
109 { 1, "Put Login Configuration" },
110 { 2, "Get Login Configuration" },
111 { 3, "Get All Configurations" },
112 { 4, "Delete Login Configuration" },
113 { 5, "Put Login Secret" },
114 { 6, "Delete Login Secret" },
115 { 7, "Set Password" },
116 { 8, "Change Password" },
117 { 9, "Delete Password" },
118 { 10, "Get Password" },
119 { 11, "Check Password Policy" },
123 static const value_string nmas_errors_enum
[] = {
124 { 0xFFFFF9A1, "(-1631) FRAGMENT FAILURE" },
125 { 0xFFFFF9A0, "(-1632) BAD REQUEST SYNTAX" },
126 { 0xFFFFF99F, "(-1633) BUFFER OVERFLOW" },
127 { 0xFFFFF99E, "(-1634) SYSTEM RESOURCES" },
128 { 0xFFFFF99D, "(-1635) INSUFFICIENT MEMORY" },
129 { 0xFFFFF99C, "(-1636) NOT SUPPORTED" },
130 { 0xFFFFF99B, "(-1637) BUFFER UNDERFLOW" },
131 { 0xFFFFF99A, "(-1638) NOT FOUND" },
132 { 0xFFFFF999, "(-1639) INVALID OPERATION" },
133 { 0xFFFFF998, "(-1640) ASN1 DECODE" },
134 { 0xFFFFF997, "(-1641) ASN1 ENCODE" },
135 { 0xFFFFF996, "(-1642) LOGIN FAILED" },
136 { 0xFFFFF995, "(-1643) INVALID PARAMETER" },
137 { 0xFFFFF994, "(-1644) TIMED OUT RECOVERABLE" },
138 { 0xFFFFF993, "(-1645) TIMED OUT NOT RECOVERABLE" },
139 { 0xFFFFF992, "(-1646) TIMED OUT UNKNOWN" },
140 { 0xFFFFF991, "(-1647) AUTHORIZATION FAILURE" },
141 { 0xFFFFF990, "(-1648) INVALID DISTINGUISHED NAME" },
142 { 0xFFFFF98F, "(-1649) CANNOT RESOLVE DISTINGUISHED NAME" },
143 { 0xFFFFF98E, "(-1650) CANNOT RESOLVE CONNECTION" },
144 { 0xFFFFF98D, "(-1651) NO CRYPTOGRAPHY" },
145 { 0xFFFFF98C, "(-1652) INVALID VERSION" },
146 { 0xFFFFF98B, "(-1653) SYNC NEEDED" },
147 { 0xFFFFF98A, "(-1654) PROTOCOL STATE" },
148 { 0xFFFFF989, "(-1655) INVALID HANDLE" },
149 { 0xFFFFF988, "(-1656) INVALID METHOD" },
150 { 0xFFFFF987, "(-1657) DEVELOPMENT VERSION" },
151 { 0xFFFFF986, "(-1658) MISSING KEY" },
152 { 0xFFFFF985, "(-1659) ACCESS NOT ALLOWED" },
153 { 0xFFFFF984, "(-1660) SEQUENCE NOT FOUND" },
154 { 0xFFFFF983, "(-1661) CLEARANCE NOT FOUND" },
155 { 0xFFFFF982, "(-1662) LOGIN SERVER METHOD NOT FOUND" },
156 { 0xFFFFF981, "(-1663) LOGIN CLIENT METHOD NOT FOUND" },
157 { 0xFFFFF980, "(-1664) SERVER NOT FOUND" },
158 { 0xFFFFF97F, "(-1665) LOGIN ATTRIBUTE NOT FOUND" },
159 { 0xFFFFF97E, "(-1666) LEGACY INVALID PASSWORD" },
160 { 0xFFFFF97D, "(-1667) ACCOUNT DISABLED" },
161 { 0xFFFFF97C, "(-1668) ACCOUNT LOCKED" },
162 { 0xFFFFF97B, "(-1669) ADDRESS RESTRICTION" },
163 { 0xFFFFF97A, "(-1670) CONNECTION CLEARED" },
164 { 0xFFFFF979, "(-1671) TIME RESTRICTION" },
165 { 0xFFFFF978, "(-1672) SHORT TERM SECRET" },
166 { 0xFFFFF977, "(-1673) NO NMAS ON TREE" },
167 { 0xFFFFF976, "(-1674) NO NMAS ON SERVER" },
168 { 0xFFFFF975, "(-1675) REQUEST CHALLENGED" },
169 { 0xFFFFF974, "(-1676) LOGIN CANCELED" },
170 { 0xFFFFF973, "(-1677) LOCAL CREDENTIAL STORE" },
171 { 0xFFFFF972, "(-1678) REMOTE CREDENTIAL STORE" },
172 { 0xFFFFF971, "(-1679) SMC NICM" },
173 { 0xFFFFF970, "(-1680) SEQUENCE NOT AUTHORIZED" },
174 { 0xFFFFF96F, "(-1681) TRANSPORT" },
175 { 0xFFFFF96E, "(-1682) CRYPTO FAILED INIT" },
176 { 0xFFFFF96D, "(-1683) DOUBLEBYTE FAILED INIT" },
177 { 0xFFFFF96C, "(-1684) CODEPAGE FAILED INIT" },
178 { 0xFFFFF96B, "(-1685) UNICODE FAILED INIT" },
179 { 0xFFFFF96A, "(-1686) DLL FAILED LOADING" },
180 { 0xFFFFF969, "(-1687) EVALUATION VERSION WARNING" },
181 { 0xFFFFF968, "(-1688) CONCURRENT LOGIN" },
182 { 0xFFFFF969, "(-1689) THREAD CREATE" },
183 { 0xFFFFF96A, "(-1690) SECURE CHANNEL REQUIRED" },
184 { 0xFFFFF96B, "(-1691) NO DEFAULT USER SEQUENCE" },
185 { 0xFFFFF96C, "(-1692) NO TREENAME" },
186 { 0xFFFFF96D, "(-1693) MECHANISM NOT FOUND" },
192 align_4(tvbuff_t
*tvb
, int aoffset
)
194 if (tvb_length_remaining(tvb
, aoffset
) > 4 ) {
202 nmas_string(tvbuff_t
* tvb
, int hfinfo
, proto_tree
*nmas_tree
, int offset
, gboolean little
)
204 int foffset
= offset
;
209 guint32 length_remaining
= 0;
211 buffer
= (char *)wmem_alloc(wmem_packet_scope(), ITEM_LABEL_LENGTH
+1);
213 str_length
= tvb_get_letohl(tvb
, foffset
);
215 str_length
= tvb_get_ntohl(tvb
, foffset
);
218 if (str_length
>= ITEM_LABEL_LENGTH
) {
219 proto_tree_add_string(nmas_tree
, hfinfo
, tvb
, foffset
,
220 length_remaining
+ 4, "<String too long to process>");
221 foffset
+= length_remaining
;
224 if (str_length
== 0) {
225 proto_tree_add_string(nmas_tree
, hfinfo
, tvb
, offset
, 4,
230 * XXX - other than the special-casing of null bytes,
231 * we could just use "proto_tree_add_item()", as for
232 * FT_STRING, FT_STRINGZ, and FT_UINT_STRING fields,
233 * the display representation of an item is generated
234 * using "format_text()", so it handles non-printable
237 for ( i
= 0; i
< str_length
; i
++ ) {
238 c_char
= tvb_get_guint8(tvb
, foffset
);
239 if (c_char
<0x20 || c_char
>0x7e) {
240 if (c_char
!= 0x00) {
242 buffer
[i
] = c_char
& 0xff;
248 buffer
[i
] = c_char
& 0xff;
253 if (length_remaining
==1) {
261 str_length
= tvb_get_letohl(tvb
, offset
);
263 str_length
= tvb_get_ntohl(tvb
, offset
);
265 proto_tree_add_string(nmas_tree
, hfinfo
, tvb
, offset
+4, str_length
, buffer
);
270 dissect_nmas_request(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*ncp_tree
, ncp_req_hash_value
*request_value
)
272 guint8
/*func,*/ subfunc
;
273 guint32 msg_length
=0, cur_string_len
=0;
282 /*func = tvb_get_guint8(tvb, foffset);*/
284 subfunc
= tvb_get_guint8(tvb
, foffset
);
287 /* Fill in the INFO column. */
288 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NMAS");
289 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "C NMAS - %s",
290 val_to_str(subfunc
, nmas_func_enum
, "Unknown (0x%02x)"));
292 aitem
= proto_tree_add_text(ncp_tree
, tvb
, foffset
, -1, "Packet Type: %s",
293 val_to_str(subfunc
, nmas_func_enum
, "Unknown (0x%02x)"));
294 atree
= proto_item_add_subtree(aitem
, ett_nmas
);
297 proto_tree_add_item(atree
, hf_ping_version
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
299 proto_tree_add_item(atree
, hf_ping_flags
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
303 proto_tree_add_item(atree
, hf_frag_handle
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
304 /* Check for Fragment packet */
305 if (tvb_get_letohl(tvb
, foffset
)!=0xffffffff) {
309 foffset
+= 4; /* Dont know what this is */
310 proto_tree_add_item(atree
, hf_length
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
311 msg_length
= tvb_get_letohl(tvb
, foffset
);
315 proto_tree_add_item(atree
, hf_subverb
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
316 subverb
= tvb_get_letohl(tvb
, foffset
);
318 request_value
->req_nds_flags
=subverb
; /* Store the NMAS fragment verb */
322 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", %s",
323 val_to_str(subverb
, nmas_subverb_enum
, "Unknown subverb (%u)"));
325 case 0: /* Fragmented Ping */
326 proto_tree_add_item(atree
, hf_ping_version
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
328 proto_tree_add_item(atree
, hf_ping_flags
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
331 case 2: /* Client Put Data */
332 proto_tree_add_item(atree
, hf_opaque
, tvb
, foffset
, msg_length
, ENC_NA
);
333 /*foffset += msg_length;*/
335 case 4: /* Client Get Data */
336 case 6: /* Client Get User NDS Credentials */
339 case 8: /* Login Store Management */
340 proto_tree_add_item(atree
, hf_reply_buffer_size
, tvb
, foffset
, 1, ENC_LITTLE_ENDIAN
);
342 msgverb
= tvb_get_guint8(tvb
, foffset
);
344 request_value
->nds_request_verb
=msgverb
; /* Use nds_request_verb for passed subverb */
346 proto_tree_add_item(atree
, hf_lsm_verb
, tvb
, foffset
, 1, ENC_LITTLE_ENDIAN
);
348 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", %s",
349 val_to_str(msgverb
, nmas_lsmverb_enum
, "Unknown (%u)"));
366 case 10: /* Writable Object Check */
367 /* The first GUINT32 value is the len of the header? */
369 /* The next two GUINT32 values are reserved and always 0 */
371 foffset
= nmas_string(tvb
, hf_tree
, atree
, foffset
, TRUE
);
372 /*foffset = */nmas_string(tvb
, hf_user
, atree
, foffset
, TRUE
);
374 case 1242: /* Message Handler */
376 proto_tree_add_item(atree
, hf_msg_version
, tvb
, foffset
, 4, ENC_BIG_ENDIAN
);
378 proto_tree_add_item(atree
, hf_session_ident
, tvb
, foffset
, 4, ENC_BIG_ENDIAN
);
381 msgverb
= tvb_get_guint8(tvb
, foffset
);
383 request_value
->nds_request_verb
=msgverb
; /* Use nds_request_verb for passed verb */
385 proto_tree_add_item(atree
, hf_msg_verb
, tvb
, foffset
, 1, ENC_BIG_ENDIAN
);
387 /*msg_length -= 12;*/
388 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", %s",
389 val_to_str(msgverb
, nmas_msgverb_enum
, "Unknown (%u)"));
393 msg_length
= tvb_get_ntohl(tvb
, foffset
);
394 proto_tree_add_item(atree
, hf_length
, tvb
, foffset
, 4, ENC_BIG_ENDIAN
);
396 proto_tree_add_item(atree
, hf_data
, tvb
, foffset
, msg_length
, ENC_NA
);
397 /*foffset += msg_length;*/
400 msg_length
= tvb_get_ntohl(tvb
, foffset
);
402 proto_tree_add_item(atree
, hf_length
, tvb
, foffset
, 4, ENC_BIG_ENDIAN
);
404 while (msg_length
> 0) {
405 attribute
= tvb_get_ntohl(tvb
, foffset
);
407 cur_string_len
=tvb_get_ntohl(tvb
, foffset
);
410 foffset
= nmas_string(tvb
, hf_user
, atree
, foffset
, FALSE
);
413 foffset
= nmas_string(tvb
, hf_tree
, atree
, foffset
, FALSE
);
416 foffset
= nmas_string(tvb
, hf_clearance
, atree
, foffset
, FALSE
);
419 foffset
= nmas_string(tvb
, hf_login_sequence
, atree
, foffset
, FALSE
);
424 msg_length
-= cur_string_len
;
425 if (tvb_reported_length_remaining(tvb
, foffset
)<5) {
431 proto_tree_add_item(atree
, hf_opaque
, tvb
, foffset
,
432 tvb_reported_length_remaining(tvb
, foffset
), ENC_NA
);
433 /*foffset += msg_length;*/
456 dissect_nmas_reply(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*ncp_tree
, guint8 func _U_
, guint8 subfunc
, ncp_req_hash_value
*request_value
)
458 guint32 foffset
=0, roffset
=0;
461 guint32 msg_length
=0;
462 guint32 return_code
=0, encrypt_error
=0;
465 proto_item
*expert_item
;
471 subverb
= request_value
->req_nds_flags
;
472 msgverb
= request_value
->nds_request_verb
;
474 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "NMAS");
475 if (tvb_reported_length_remaining(tvb
, foffset
)<4) {
479 aitem
= proto_tree_add_text(ncp_tree
, tvb
, foffset
, -1, "Packet Type: %s",
480 val_to_str(subfunc
, nmas_func_enum
, "Unknown (0x%02x)"));
481 atree
= proto_item_add_subtree(aitem
, ett_nmas
);
484 proto_tree_add_item(atree
, hf_ping_flags
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
486 proto_tree_add_item(atree
, hf_nmas_version
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
490 proto_tree_add_text(atree
, tvb
, foffset
, -1, "Verb: %s",
491 val_to_str(subverb
, nmas_subverb_enum
, "Unknown (%u)"));
492 proto_tree_add_item(atree
, hf_length
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
493 msg_length
= tvb_get_letohl(tvb
, foffset
);
495 proto_tree_add_item(atree
, hf_frag_handle
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
496 /* Check for a fragment packet */
497 if (tvb_get_letohl(tvb
, foffset
)!=0xffffffff) {
501 return_code
= tvb_get_letohl(tvb
, foffset
);
505 if (return_code
== 0 && msg_length
> 0) {
507 case 0: /* Fragmented Ping */
508 proto_tree_add_item(atree
, hf_session_ident
, tvb
, foffset
, 4, ENC_BIG_ENDIAN
);
510 /*proto_tree_add_item(atree, hf_nmas_version, tvb, foffset, 4, ENC_LITTLE_ENDIAN);
513 case 2: /* Client Put Data */
514 proto_tree_add_item(atree
, hf_squeue_bytes
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
516 proto_tree_add_item(atree
, hf_cqueue_bytes
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
519 case 4: /* Client Get Data */
520 proto_tree_add_item(atree
, hf_opaque
, tvb
, foffset
, msg_length
, ENC_NA
);
521 /*foffset += msg_length;*/
523 case 6: /* Client Get User NDS Credentials */
524 proto_tree_add_item(atree
, hf_num_creds
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
526 proto_tree_add_item(atree
, hf_cred_type
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
528 proto_tree_add_item(atree
, hf_login_state
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
531 proto_tree_add_item(atree
, hf_enc_cred
, tvb
, foffset
, msg_length
, ENC_NA
);
532 /*foffset += msg_length;*/
534 case 8: /* Login Store Management */
535 proto_tree_add_text(atree
, tvb
, foffset
, -1, "Subverb: %s",
536 val_to_str(msgverb
, nmas_lsmverb_enum
, "Unknown (%u)"));
538 /* The data within these structures is all encrypted. */
544 proto_tree_add_item(atree
, hf_enc_data
, tvb
, foffset
, msg_length
, ENC_NA
);
545 /*foffset += msg_length;*/
551 case 10: /* Writable Object Check */
552 proto_tree_add_item(atree
, hf_nmas_version
, tvb
, foffset
, 4, ENC_LITTLE_ENDIAN
);
555 case 1242: /* Message Handler */
556 proto_tree_add_text(atree
, tvb
, foffset
, -1, "Subverb: %s",
557 val_to_str(msgverb
, nmas_msgverb_enum
, "Unknown (%u)"));
560 msg_length
= tvb_get_ntohl(tvb
, foffset
);
561 proto_tree_add_item(atree
, hf_length
, tvb
, foffset
, 4, ENC_BIG_ENDIAN
);
563 proto_tree_add_item(atree
, hf_data
, tvb
, foffset
, msg_length
, ENC_NA
);
564 /*foffset += msg_length;*/
567 proto_tree_add_item(atree
, hf_session_ident
, tvb
, foffset
, 4, ENC_BIG_ENDIAN
);
574 encrypt_error
= tvb_get_ntohl(tvb
, foffset
);
575 str
= try_val_to_str(encrypt_error
, nmas_errors_enum
);
577 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "R Payload Error - %s", str
);
578 expert_item
= proto_tree_add_item(atree
, hf_encrypt_error
, tvb
, foffset
, 4, ENC_BIG_ENDIAN
);
579 expert_add_info_format(pinfo
, expert_item
, &ei_encrypt_error
, "NMAS Payload Error: %s", str
);
581 proto_tree_add_item(atree
, hf_opaque
, tvb
, foffset
, msg_length
, ENC_NA
);
583 /*foffset += msg_length;*/
596 str
= try_val_to_str(return_code
, nmas_errors_enum
);
598 expert_item
= proto_tree_add_item(atree
, hf_return_code
, tvb
, roffset
, 4, ENC_LITTLE_ENDIAN
);
599 expert_add_info_format(pinfo
, expert_item
, &ei_return_error
, "NMAS Error: 0x%08x %s", return_code
, str
);
600 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "R Error - %s", str
);
602 if (return_code
!=0) {
603 expert_item
= proto_tree_add_item(atree
, hf_return_code
, tvb
, roffset
, 4, ENC_LITTLE_ENDIAN
);
604 expert_add_info_format(pinfo
, expert_item
, &ei_return_error
, "NMAS Error: 0x%08x is unknown", return_code
);
605 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "R Unknown NMAS Error - 0x%08x", return_code
);
609 if (return_code
== 0) {
610 proto_tree_add_text(atree
, tvb
, roffset
, 4, "Return Code: Success (0x00000000)");
621 proto_register_nmas(void)
623 static hf_register_info hf_nmas
[] = {
626 { "Function", "nmas.func",
627 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
632 { "Subfunction", "nmas.subfunc",
633 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
637 { "Ping Version", "nmas.ping_version",
638 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
641 { "Flags", "nmas.ping_flags",
642 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
645 { "Fragment Handle", "nmas.frag_handle",
646 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
649 { "Length", "nmas.length",
650 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
653 { "Sub Verb", "nmas.subverb",
654 FT_UINT32
, BASE_HEX
, VALS(nmas_subverb_enum
), 0x0, NULL
, HFILL
}},
657 { "Tree", "nmas.tree",
658 FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
661 { "User", "nmas.user",
662 FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
665 { "NMAS Protocol Version", "nmas.version",
666 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
669 { "Message Version", "nmas.msg_version",
670 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
673 { "Session Identifier", "nmas.session_ident",
674 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
677 { "Message Verb", "nmas.msg_verb",
678 FT_UINT8
, BASE_HEX
, VALS(nmas_msgverb_enum
), 0x0, NULL
, HFILL
}},
682 { "Attribute Type", "nmas.attribute",
683 FT_UINT32
, BASE_DEC
, VALS(nmas_attribute_enum
), 0x0, NULL
, HFILL
}},
687 { "Requested Clearance", "nmas.clearance",
688 FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
690 { &hf_login_sequence
,
691 { "Requested Login Sequence", "nmas.login_seq",
692 FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
695 { "Opaque Data", "nmas.opaque",
696 FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
699 { "Data", "nmas.data",
700 FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
703 { "Return Code", "nmas.return_code",
704 FT_UINT32
, BASE_HEX
, VALS(nmas_errors_enum
), 0x0, NULL
, HFILL
}},
707 { "Login Store Message Verb", "nmas.lsm_verb",
708 FT_UINT8
, BASE_HEX
, VALS(nmas_lsmverb_enum
), 0x0, NULL
, HFILL
}},
711 { "Server Queue Number of Bytes", "nmas.squeue_bytes",
712 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
715 { "Client Queue Number of Bytes", "nmas.cqueue_bytes",
716 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
719 { "Number of Credentials", "nmas.num_creds",
720 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
723 { "Credential Type", "nmas.cred_type",
724 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
727 { "Login State", "nmas.login_state",
728 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
731 { "Encrypted Credential", "nmas.enc_cred",
732 FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
735 { "Encrypted Data", "nmas.enc_data",
736 FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
738 { &hf_reply_buffer_size
,
739 { "Reply Buffer Size", "nmas.buf_size",
740 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
743 { "Payload Error", "nmas.encrypt_error",
744 FT_UINT32
, BASE_HEX
, VALS(nmas_errors_enum
), 0x0,
745 "Payload/Encryption Return Code", HFILL
}}
748 static gint
*ett
[] = {
752 static ei_register_info ei
[] = {
753 { &ei_encrypt_error
, { "nmas.encrypt_error.expert", PI_RESPONSE_CODE
, PI_NOTE
, "NMAS Payload Erro", EXPFILL
}},
754 { &ei_return_error
, { "nmas.return_code.expert", PI_RESPONSE_CODE
, PI_NOTE
, "NMAS Error", EXPFILL
}},
757 expert_module_t
* expert_nmas
;
759 proto_nmas
= proto_register_protocol("Novell Modular Authentication Service", "NMAS", "nmas");
760 proto_register_field_array(proto_nmas
, hf_nmas
, array_length(hf_nmas
));
761 proto_register_subtree_array(ett
, array_length(ett
));
762 expert_nmas
= expert_register_protocol(proto_nmas
);
763 expert_register_field_array(expert_nmas
, ei
, array_length(ei
));
767 * Editor modelines - http://www.wireshark.org/tools/modelines.html
772 * indent-tabs-mode: nil
775 * vi: set shiftwidth=4 tabstop=4 expandtab:
776 * :indentSize=4:tabSize=4:noTabs=true: