Use "tvb_get_ntohieee_float()" to fetch floating-point numbers.
[obnox/wireshark/wip.git] / packet-osi.h
1 /* packet-osi.h
2  *
3  * $Id: packet-osi.h,v 1.10 2002/02/28 19:24:24 gram 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_OSI_H
25 #define _PACKET_OSI_H
26
27 #include <epan/osi-utils.h>
28
29 #define PDU_TYPE_ESIS_ESH       100
30 #define PDU_TYPE_ESIS_ISH       101
31 #define PDU_TYPE_ESIS_RD        102
32
33 #define PDU_TYPE_ISIS_L1_HELLO  201
34 #define PDU_TYPE_ISIS_L2_HELLO  202
35 #define PDU_TYPE_ISIS_PTP_HELLO 203
36 #define PDU_TYPE_ISIS_L1_CSNP   204
37 #define PDU_TYPE_ISIS_L1_PSNP   205
38 #define PDU_TYPE_ISIS_L2_CSNP   206
39 #define PDU_TYPE_ISIS_L2_PSNP   207
40
41
42
43
44
45 #define PROTO_STRING_ISIS "ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol" 
46 #define PROTO_STRING_IDRP "ISO 10747 IDRP InTER Domain Routeing Information Exchange Protocol" 
47 #define PROTO_STRING_ESIS "ISO 9542 ESIS Routeing Information Exchange Protocol"
48 #define PROTO_STRING_CLNP "ISO 8473 CLNP ConnectionLess Network Protocol" 
49 #define PROTO_STRING_COTP "ISO 8073 COTP Connection-Oriented Transport Protocol"
50 #define PROTO_STRING_CLTP "ISO 8602 CLTP ConnectionLess Transport Protocol"
51 #define PROTO_STRING_LSP  "ISO 10589 ISIS Link State Protocol Data Unit"
52 #define PROTO_STRING_CSNP "ISO 10589 ISIS Complete Sequence Numbers Protocol Data Unit"
53 #define PROTO_STRING_PSNP "ISO 10589 ISIS Partial Sequence Numbers Protocol Data Unit"
54
55 #define OSI_PDU_TYPE_MASK 0x1f
56 #define BIS_PDU_TYPE MASK 0xff
57                              
58
59 #define BIT_1   0x01
60 #define BIT_2   0x02
61 #define BIT_3   0x04
62 #define BIT_4   0x08
63 #define BIT_5   0x10
64 #define BIT_6   0x20
65 #define BIT_7   0x40
66 #define BIT_8   0x80
67
68 #define BIT_9   0x0100
69 #define BIT_10  0x0200
70 #define BIT_11  0x0400
71 #define BIT_12  0x0800
72 #define BIT_13  0x1000
73 #define BIT_14  0x2000
74 #define BIT_15  0x4000
75 #define BIT_16  0x8000
76
77 /*
78  * Dissector table for NLPIDs for protocols whose packets begin with
79  * the NLPID.
80  */
81 extern dissector_table_t osinl_subdissector_table;
82
83 /*
84  * published API functions
85  */
86
87 typedef enum {
88         NO_CKSUM,       /* checksum field is 0 */
89         DATA_MISSING,   /* not all the data covered by the checksum was captured */
90         CKSUM_OK,       /* checksum is OK */
91         CKSUM_NOT_OK    /* checksum is not OK */
92 } cksum_status_t;
93
94 extern cksum_status_t calc_checksum(tvbuff_t *, int, u_int, u_int);
95
96 #endif /* _PACKET_OSI_H */