4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
28 #include <sys/types.h>
29 #include <sys/socket.h>
30 #include <sys/ethernet.h>
32 #include <net/trill.h>
36 #define PDUTYPE_OFFSET 4
37 #define PDUTYPE_HELLO1 15
38 #define PDUTYPE_HELLO2 16
39 #define PDUTYPE_HELLOP2P 17
40 #define PDUTYPE_LSP1 18
41 #define PDUTYPE_LSP2 20
42 #define PDUTYPE_CSN1 24
43 #define PDUTYPE_CSN2 25
44 #define PDUTYPE_PSN1 26
45 #define PDUTYPE_PSN2 27
48 interpret_isis(int flags
, char *data
, int dlen
, boolean_t istrill
)
53 pdutypenum
= *(data
+ PDUTYPE_OFFSET
);
59 case PDUTYPE_HELLOP2P
:
60 pdutype
= "P2P Hello";
64 pdutype
= "Link State";
80 (void) snprintf(get_sum_line(), MAXLINE
,
81 "%s %s L:%d", istrill
? "Core TRILL IS-IS" : "IS-IS",
85 if (flags
& F_DTAIL
) {
87 show_header("TRILL-IS-IS: ",
88 "Core TRILL IS-IS Frame", dlen
);
90 show_header("IS-IS: ",
94 (void) snprintf(get_line(0, 0), get_line_remain(),
95 "Frame type = %02X (%s)", pdutypenum
, pdutype
);