Additional RAP error code for password changes sent to a BDC, from Devin
[obnox/wireshark/wip.git] / packet-ncp-int.h
1 /* packet-ncp-int.h
2  * Structures and functions for NetWare Core Protocol.
3  * Gilbert Ramirez <gram@alumni.rice.edu>
4  *
5  * $Id: packet-ncp-int.h,v 1.6 2002/01/10 04:44:34 gram Exp $
6  *
7  * Ethereal - Network traffic analyzer
8  * By Gerald Combs <gerald@zing.org>
9  * Copyright 2000 Gerald Combs
10  *
11  * 
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.
16  * 
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.
21  * 
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25  */
26
27 #ifndef __PACKET_NCP_INT_H__
28 #define __PACKET_NCP_INT_H__
29
30 typedef struct _ptvc_record ptvc_record;
31 typedef struct _sub_ptvc_record sub_ptvc_record;
32
33 struct _ptvc_record {
34         int                     *hf_ptr;
35         gint                    length;
36         gboolean                endianness;
37         const sub_ptvc_record   *sub_ptvc_rec;
38 };
39
40 struct _sub_ptvc_record {
41         gint                    *ett;
42         const ptvc_record       *ptvc_rec;
43 };
44
45 typedef struct {
46         guint8          error_in_packet;
47         gint            ncp_error_index;
48 } error_equivalency;
49
50 typedef struct {
51         guint8                  func;
52         guint8                  subfunc;
53         guint8                  has_subfunc;
54         gchar*                  name;
55         gint                    group;
56         const ptvc_record       *request_ptvc;
57         void                    *requst_func;
58         const ptvc_record       *reply_ptvc;
59         void                    *reply_func;
60         const error_equivalency *errors;
61 } ncp_record;
62
63
64 void dissect_ncp_request(tvbuff_t*, packet_info*, guint16,
65                 guint8, guint16, proto_tree*, proto_tree*);
66
67 void dissect_ncp_reply(tvbuff_t *, packet_info*, guint16,
68                 guint8, proto_tree*, proto_tree*);
69
70 void ncp_hash_insert(conversation_t *conversation, guint8 nw_sequence,
71                 const ncp_record *ncp_rec);
72
73 const ncp_record* ncp_hash_lookup(conversation_t*, guint8 nw_sequence);
74
75
76 extern int proto_ncp;
77
78 #endif