Obscure email addresses and update entries.
[obnox/wireshark/wip.git] / packet-fcct.h
1 /* packet-fcct.h
2  *
3  * $Id: packet-fcct.h,v 1.2 2003/03/06 21:55:26 guy Exp $
4  *
5  * Ethereal - Network traffic analyzer
6  * By Gerald Combs <gerald@ethereal.com>
7  * Copyright 1998 Gerald Combs
8  * 
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  * 
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  * 
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22  */
23
24 #ifndef __PACKET_FCCT_H_
25 #define __PACKET_FCCT_H_
26
27 /* Well-known GSTYPEs */
28 #define FCCT_GSTYPE_KEYSVC   0xF7
29 #define FCCT_GSTYPE_ALIASSVC 0xF8
30 #define FCCT_GSTYPE_MGMTSVC  0xFA
31 #define FCCT_GSTYPE_TIMESVC  0xFB
32 #define FCCT_GSTYPE_DIRSVC   0xFC
33
34 /* Well-known GSSUBTYPES */
35 /* Actual servers serving the directory service type identified by subtype */ 
36 #define FCCT_GSSUBTYPE_DNS  0x02
37 #define FCCT_GSSUBTYPE_IP   0x03
38 #define FCCT_GSSUBTYPE_FCS  0x01
39 #define FCCT_GSSUBTYPE_UNS  0x02
40 #define FCCT_GSSUBTYPE_FZS  0x03
41 #define FCCT_GSSUBTYPE_AS   0x01
42 #define FCCT_GSSUBTYPE_TS   0x01
43
44 /* Derived field: Server servicing the request */
45 #define FCCT_GSRVR_DNS       0x1
46 #define FCCT_GSRVR_IP        0x2
47 #define FCCT_GSRVR_FCS       0x3
48 #define FCCT_GSRVR_UNS       0x4
49 #define FCCT_GSRVR_FZS       0x5
50 #define FCCT_GSRVR_AS        0x6
51 #define FCCT_GSRVR_TS        0x7
52 #define FCCT_GSRVR_KS        0x8
53 #define FCCT_GSRVR_UNKNOWN   0xFF
54
55 /* Reject code definitions */
56 #define FCCT_RJT_INVCMDCODE    0x1
57 #define FCCT_RJT_INVVERSION    0x2
58 #define FCCT_RJT_LOGICALERR    0x3
59 #define FCCT_RJT_INVSIZE       0x4
60 #define FCCT_RJT_LOGICALBSY    0x5
61 #define FCCT_RJT_PROTOERR      0x7
62 #define FCCT_RJT_GENFAIL       0x9
63 #define FCCT_RJT_CMDNOTSUPP    0xB
64
65 #define FCCT_MSG_REQ_MAX       0x8000 /* All opcodes below this are requests */
66 #define FCCT_MSG_RJT           0x8001 /* Reject CT message */
67 #define FCCT_MSG_ACC           0x8002 /* Accept CT message */
68
69 #define FCCT_PRMBL_SIZE        16
70 #define FCCT_EXTPRMBL_SIZE     88
71
72 static const value_string fc_ct_rjt_code_vals [] = {
73     {FCCT_RJT_INVCMDCODE, "Invalid Cmd Code"},
74     {FCCT_RJT_INVVERSION, "Invalid Version Level"},
75     {FCCT_RJT_LOGICALERR, "Logical Error"},
76     {FCCT_RJT_INVSIZE,    "Invalid CT_IU Size"},
77     {FCCT_RJT_LOGICALBSY, "Logical Busy"},
78     {FCCT_RJT_PROTOERR,   "Protocol Error"},
79     {FCCT_RJT_GENFAIL,    "Unable to Perform Cmd"},
80     {FCCT_RJT_CMDNOTSUPP, "Cmd Not Supported"},
81     {0, NULL},
82 };
83
84 static const value_string fc_ct_gstype_vals[] = {
85     {FCCT_GSTYPE_KEYSVC, "Key Service"},
86     {FCCT_GSTYPE_ALIASSVC, "Alias Service"},
87     {FCCT_GSTYPE_MGMTSVC, "Management Service"},
88     {FCCT_GSTYPE_TIMESVC, "Time Service"},
89     {FCCT_GSTYPE_DIRSVC, "Directory Service"},
90     {0, NULL},
91 };
92
93 static const value_string fc_ct_gsserver_vals[] = {
94     {FCCT_GSRVR_DNS, "dNS"},
95     {FCCT_GSRVR_IP,  "IP"},
96     {FCCT_GSRVR_FCS, "Fabric Config Server"},
97     {FCCT_GSRVR_UNS, "Unzoned Name Server"},
98     {FCCT_GSRVR_FZS, "Fabric Zone Server"},
99     {FCCT_GSRVR_TS,  "Time Server"},
100     {FCCT_GSRVR_KS,  "Key Server"},
101     {FCCT_GSRVR_AS,  "Alias Server"},
102     {0, NULL},
103 };
104
105 typedef struct _fc_ct_preamble {
106     guint32 in_id:24,
107             revision:8;
108     guint8  gstype;
109     guint8  gssubtype;
110     guint8  options;
111     guint8  rsvd1;
112     guint16 opcode;
113     guint16 maxres_size;
114     guint8  rsvd2;
115     guint8  rjt_code;
116     guint8  rjt_code_det;
117     guint8  rjt_code_vendor;
118 } fc_ct_preamble;
119
120 typedef struct _fc_ct_ext_hdr {
121     guint32 auth_said;
122     guint32 tid;
123     guint32 req_pname[2];
124     guint32 timestamp[2];
125     guint32 auth_hashblk[15];
126 } fc_ct_ext_hdr;
127
128 #endif