Instead of saying the "manuf" file is in "/usr/local/etc/manuf", say
[obnox/wireshark/wip.git] / packet-dcerpc.h
1 /* packet-dcerpc.h
2  * Copyright 2001, Todd Sabin <tas@webspan.net>
3  *
4  * $Id: packet-dcerpc.h,v 1.2 2001/07/11 01:25:45 guy Exp $
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@ethereal.com>
8  * Copyright 1998 Gerald Combs
9  * 
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  * 
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  * 
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 #ifndef __PACKET_DCERPC_H__
26 #define __PACKET_DCERPC_H__
27
28 typedef struct _e_uuid_t {
29     guint32 Data1;
30     guint16 Data2;
31     guint16 Data3;
32     guint8 Data4[8];
33 } e_uuid_t;
34
35 typedef struct _e_dce_cn_common_hdr_t {
36     guint8 rpc_ver;
37     guint8 rpc_ver_minor;
38     guint8 ptype;
39     guint8 flags;
40     guint8 drep[4];
41     guint16 frag_len;
42     guint16 auth_len;
43     guint32 call_id;
44 } e_dce_cn_common_hdr_t;
45
46 typedef struct _e_dce_dg_common_hdr_t {
47     guint8 rpc_ver;
48     guint8 ptype;
49     guint8 flags1;
50     guint8 flags2;
51     guint8 drep[3];
52     guint8 serial_hi;
53     e_uuid_t obj_id;
54     e_uuid_t if_id;
55     e_uuid_t act_id;
56     guint32 server_boot;
57     guint32 if_ver;
58     guint32 seqnum;
59     guint16 opnum;
60     guint16 ihint;
61     guint16 ahint;
62     guint16 frag_len;
63     guint16 frag_num;
64     guint8 auth_proto;
65     guint8 serial_lo;
66 } e_dce_dg_common_hdr_t;
67
68
69
70 #define PDU_REQ        0
71 #define PDU_PING       1
72 #define PDU_RESP       2
73 #define PDU_FAULT      3
74 #define PDU_WORKING    4
75 #define PDU_NOCALL     5
76 #define PDU_REJECT     6
77 #define PDU_ACK        7
78 #define PDU_FACK       9
79 #define PDU_BIND      11
80 #define PDU_BIND_ACK  12
81 #define PDU_BIND_NAK  13
82 #define PDU_ALTER     14
83 #define PDU_ALTER_ACK 15
84 #define PDU_AUTH3     16
85
86
87 guint16 dcerpc_tvb_get_ntohs (tvbuff_t *tvb, gint offset, char *drep);
88 guint32 dcerpc_tvb_get_ntohl (tvbuff_t *tvb, gint offset, char *drep);
89 void dcerpc_tvb_get_uuid (tvbuff_t *tvb, gint offset, char *drep, e_uuid_t *uuid);
90
91 typedef int (dcerpc_dissect_fnct_t)(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree);
92
93 typedef struct _dcerpc_sub_dissector {
94     guint16 num;
95     gchar   *name;
96     dcerpc_dissect_fnct_t *dissect_rqst;
97     dcerpc_dissect_fnct_t *dissect_resp;
98 } dcerpc_sub_dissector;
99
100 /* registration function for subdissectors */
101 void dcerpc_init_uuid (int proto, int ett, e_uuid_t *uuid, guint16 ver, dcerpc_sub_dissector *procs);
102
103
104 #endif /* packet-dcerpc.h */