2 * Structures and functions for NetWare Core Protocol.
3 * Gilbert Ramirez <gram@alumni.rice.edu>
4 * Modified for NDS support by Greg Morris (gmorris@novell.com)
6 * Portions Copyright (c) Gilbert Ramirez 2000-2002
7 * Portions Copyright (c) Novell, Inc. 2000-2003
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 2000 Gerald Combs
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 #ifndef __PACKET_NCP_INT_H__
31 #define __PACKET_NCP_INT_H__
33 #include <epan/expert.h>
35 typedef struct _ptvc_record ptvc_record
;
36 typedef struct _sub_ptvc_record sub_ptvc_record
;
41 const sub_ptvc_record
*sub_ptvc_rec
;
42 unsigned int endianness
: 1; /* 0=BE, 1=LE */
43 unsigned int var_index
: 2;
44 unsigned int repeat_index
: 2;
45 unsigned int req_cond_index
: 8;
46 unsigned int special_fmt
: 2;
50 * Every NCP packet has this common header (except for burst packets).
52 struct ncp_common_header
{
57 guint8 conn_high
; /* type=0x5555 doesn't have this */
60 #define NCP_FMT_NONE 0
61 #define NCP_FMT_NW_DATE 1
62 #define NCP_FMT_NW_TIME 2
63 #define NCP_FMT_UNICODE 3
65 extern gboolean nds_defragment
;
66 extern gboolean nds_echo_eid
;
67 extern gboolean ncp_echo_err
;
68 extern gboolean ncp_echo_conn
;
69 extern gboolean ncp_echo_server
;
70 extern gboolean ncp_echo_file
;
71 extern gboolean ncp_newstyle
;
73 struct _sub_ptvc_record
{
76 const ptvc_record
*ptvc_rec
;
80 const char *dfilter_text
;
86 const char *first_string
;
87 const char *repeat_string
;
96 typedef struct novell_tap _novell_tap
;
99 guint8 error_in_packet
;
100 gint ncp_error_index
;
109 const ptvc_record
*request_ptvc
;
110 const ptvc_record
*reply_ptvc
;
111 const error_equivalency
*errors
;
112 const int *req_cond_indexes
;
113 unsigned int req_cond_size_type
;
114 const info_string_t
*req_info_str
;
118 const ncp_record
*ncp_rec
;
119 gboolean
*req_cond_results
;
120 guint32 req_frame_num
;
121 nstime_t req_frame_time
;
123 guint32 req_nds_flags
;
124 guint32 req_nds_prot_flags
;
125 guint8 nds_request_verb
;
127 char object_name
[256];
129 guint32 nds_end_frag
;
130 guint32 nds_frag_num
;
132 guint16 req_mask_ext
;
133 guint32 nds_frag_flags
;
134 } ncp_req_hash_value
;
136 void dissect_ncp_request(tvbuff_t
*, packet_info
*, guint32
,
137 guint8
, guint16
, proto_tree
*volatile);
139 void dissect_ncp_reply(tvbuff_t
*, packet_info
*, guint32
, guint8
,
140 guint16
, proto_tree
*, struct novell_tap
*);
142 void dissect_ping_req(tvbuff_t
*, packet_info
*, guint32
, guint8
,
143 guint16
, proto_tree
*);
145 void dissect_nds_request(tvbuff_t
*, packet_info
*, guint32
,
146 guint8
, guint16
, proto_tree
*);
148 void nds_defrag(tvbuff_t
*, packet_info
*, guint32
,
149 guint8
, guint16
, proto_tree
*, struct novell_tap
*);
151 extern int proto_ncp
;
154 extern gint ett_nds_segments
;
155 extern gint ett_nds_segment
;
157 /*extern dissector_handle_t nds_data_handle;*/
162 #define NCP_ALLOCATE_SLOT 0x1111
163 #define NCP_SERVICE_REQUEST 0x2222
164 #define NCP_SERVICE_REPLY 0x3333
165 #define NCP_WATCHDOG 0x3e3e
166 #define NCP_DEALLOCATE_SLOT 0x5555
167 #define NCP_BURST_MODE_XFER 0x7777
168 #define NCP_POSITIVE_ACK 0x9999
169 #define NCP_BROADCAST_SLOT 0xbbbb
170 #define NCP_LIP_ECHO 0x4c69