Give the IPX dissector dissector hash tables for the IPX type and socket
[obnox/wireshark/wip.git] / packet-isis-snp.h
1 /* packet-isis-snp.h
2  * Defines and such for CSNP, PSNP, and their payloads
3  *
4  * $Id: packet-isis-snp.h,v 1.1 1999/12/15 04:34:19 guy Exp $
5  * Stuart Stanley <stuarts@mxmail.net>
6  *
7  * Ethereal - Network traffic analyzer
8  * By Gerald Combs <gerald@zing.org>
9  * Copyright 1998 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  */
28
29 #ifndef _PACKET_ISIS_SNP_H
30 #define _PACKET_ISIS_SNP_H
31
32 /*
33  * Note, the spec say 133 for authentication, but everyone seems to use 10. 
34  * Any clue on why this is would be appreciated!
35  */
36
37 /*
38  * detail cvls information for L1 CSNP packets
39  */
40 #define ISIS_CLV_L1_CSNP_LSP_ENTRIES            9
41 #define ISIS_CLV_L1_CSNP_AUTHENTICATION_NS      10
42 #define ISIS_CLV_L1_CSNP_AUTHENTICATION         133
43
44 /*
45  * detail cvls information for L2 CSNP packets
46  */
47 #define ISIS_CLV_L2_CSNP_LSP_ENTRIES            9
48 #define ISIS_CLV_L2_CSNP_AUTHENTICATION_NS      10
49 #define ISIS_CLV_L2_CSNP_AUTHENTICATION         133
50
51 /*
52  * detail cvls information for L1 PSNP packets
53  */
54 #define ISIS_CLV_L1_PSNP_LSP_ENTRIES            9
55 #define ISIS_CLV_L1_PSNP_AUTHENTICATION_NS      10
56 #define ISIS_CLV_L1_PSNP_AUTHENTICATION         133
57
58 /*
59  * detail cvls information for L2 PSNP packets
60  */
61 #define ISIS_CLV_L2_PSNP_LSP_ENTRIES            9
62 #define ISIS_CLV_L2_PSNP_AUTHENTICATION_NS      10
63 #define ISIS_CLV_L2_PSNP_AUTHENTICATION         133
64
65 /*
66  * Declare L1/L2 CSNP header
67  */
68 typedef struct {
69         guint8  isis_csnp_pdu_length[2];        /* pdu length including hdr */
70         guint8  isis_csnp_source_id[7];         /* source sysid */
71         isis_lsp_id_t isis_csnp_start_lsp_id;           /* start LSP id */
72         isis_lsp_id_t isis_csnp_end_lsp_id;             /* end LSP id */
73 } isis_csnp_t;
74
75 /*
76  * Declare L1/L2 PSNP header
77  */
78 typedef struct {
79         guint8  isis_psnp_pdu_length[2];        /* pdu length including hdr */
80         guint8  isis_psnp_source_id[7];         /* source sysid */
81 } isis_psnp_t;
82
83 /*
84  * Declare SNP payload element
85  */
86 typedef struct {
87         guint8  isis_snp_remaining_lifetime[2]; /* lifetime of LSP */
88         isis_lsp_id_t isis_snp_lsp_id;          /* target LSP id */
89         guint8  isis_snp_sequence_number[4];    /* sequence number of LSP */
90         guint8  isis_snp_checksum[2];           /* checksum of LSP */
91 } isis_snp_t;
92
93 /*
94  * Published API functions.  NOTE, this are "local" API functions and
95  * are only valid from with isis decodes.
96  */
97 extern void isis_dissect_isis_csnp(int type, int header_length,
98         const u_char *pd, int offset, frame_data *fd, proto_tree *tree);
99 extern void isis_dissect_isis_psnp(int type, int header_length,
100         const u_char *pd, int offset, frame_data *fd, proto_tree *tree);
101
102 #endif /* _PACKET_ISIS_CSNP_H */