2 * Defines and such for LSP and their CLV decodes
4 * $Id: packet-isis-lsp.h,v 1.2 2000/06/19 08:33:49 guy Exp $
5 * Stuart Stanley <stuarts@mxmail.net>
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@zing.org>
9 * Copyright 1998 Gerald Combs
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.
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.
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.
29 #ifndef _PACKET_ISIS_LSP_H
30 #define _PACKET_ISIS_LSP_H
33 * Declarations for L1/L2 LSP base header.
36 #define ISIS_LSP_PARTITION_MASK 0x80
37 #define ISIS_LSP_ATT_MASK 0x78
38 #define ISIS_LSP_ATT_SHIFT 3
39 #define ISIS_LSP_HIPPITY_MASK 0x04
40 #define ISIS_LSP_IS_TYPE_MASK 0x03
42 #define ISIS_LSP_PARTITION(x) (x&ISIS_LSP_PARTITION_MASK)
43 #define ISIS_LSP_ATT(x) ((x&ISIS_LSP_ATT_MASK)>>ISIS_LSP_ATT_SHIFT)
44 #define ISIS_LSP_HIPPITY(x) (x&ISIS_LSP_HIPPITY_MASK)
45 #define ISIS_LSP_IS_TYPE(x) (x&ISIS_LSP_IS_TYPE_MASK)
47 #define ISIS_LSP_TYPE_UNUSED0 0
48 #define ISIS_LSP_TYPE_LEVEL_1 1
49 #define ISIS_LSP_TYPE_UNUSED2 2
50 #define ISIS_LSP_TYPE_LEVEL_2 3
52 #define ISIS_LSP_CLV_METRIC_SUPPORTED(x) ((x)&0xf0)
53 #define ISIS_LSP_CLV_METRIC_RESERVED(x) ((x)&0x40)
54 #define ISIS_LSP_CLV_METRIC_VALUE(x) ((x)&0x3f)
57 * detail clv information on L1 lsp packets
59 #define ISIS_CLV_L1_LSP_AREA_ADDRESS 1
60 #define ISIS_CLV_L1_LSP_IS_NEIGHBORS 2
61 #define ISIS_CLV_L1_LSP_ES_NEIGHBORS 3
62 #define ISIS_CLV_L1_LSP_IP_INT_REACHABLE 128
63 #define ISIS_CLV_L1_LSP_NLPID 129
64 #define ISIS_CLV_L1_LSP_IP_INTERFACE_ADDR 132
66 * Note, the spec say 133, but everyone seems to use 10. Any clue on why
67 * this is would be appreciated!
69 #define ISIS_CLV_L1_LSP_AUTHENTICATION_NS 10 /* non spec */
70 #define ISIS_CLV_L1_LSP_AUTHENTICATION 133
73 * detail clv information on L2 lsp packets
75 #define ISIS_CLV_L2_LSP_AREA_ADDRESS 1
76 #define ISIS_CLV_L2_LSP_IS_NEIGHBORS 2
77 #define ISIS_CLV_L2_LSP_PARTITION_DIS 4
78 #define ISIS_CLV_L2_LSP_PREFIX_NEIGHBORS 5
79 #define ISIS_CLV_L2_LSP_IP_INT_REACHABLE 128
80 #define ISIS_CLV_L2_LSP_NLPID 129
81 #define ISIS_CLV_L2_LSP_IP_EXT_REACHABLE 130
82 #define ISIS_CLV_L2_LSP_IDRP_INFO 131
83 #define ISIS_CLV_L2_LSP_IP_INTERFACE_ADDR 132
85 * Note, the spec say 133, but everyone seems to use 10. Any clue on why
86 * this is would be appreciated!
88 #define ISIS_CLV_L2_LSP_AUTHENTICATION_NS 10 /*non spec */
89 #define ISIS_CLV_L2_LSP_AUTHENTICATION 133
92 * Published API functions. NOTE, this are "local" API functions and
93 * are only valid from with isis decodes.
95 extern void isis_dissect_isis_lsp(int hello_type, int header_length,
96 int id_length, const u_char *pd, int offset, frame_data *fd,
98 extern void isis_lsp_decode_lsp_id(char *tstr, proto_tree *tree,
99 const u_char *pd, int offset, int id_length);
101 #endif /* _PACKET_ISIS_LSP_H */