2000-02-15 21:06:58 +00:00
|
|
|
/* packet-osi.h
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2000-02-15 21:06:58 +00:00
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2000-02-15 21:06:58 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-02-15 21:06:58 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-02-15 21:06:58 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-02-15 21:06:58 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2000-04-15 22:11:26 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _PACKET_OSI_H
|
|
|
|
#define _PACKET_OSI_H
|
|
|
|
|
2002-01-21 07:37:49 +00:00
|
|
|
#include <epan/osi-utils.h>
|
2000-04-15 22:11:26 +00:00
|
|
|
|
|
|
|
#define PDU_TYPE_ESIS_ESH 100
|
|
|
|
#define PDU_TYPE_ESIS_ISH 101
|
|
|
|
#define PDU_TYPE_ESIS_RD 102
|
|
|
|
|
|
|
|
#define PDU_TYPE_ISIS_L1_HELLO 201
|
|
|
|
#define PDU_TYPE_ISIS_L2_HELLO 202
|
|
|
|
#define PDU_TYPE_ISIS_PTP_HELLO 203
|
|
|
|
#define PDU_TYPE_ISIS_L1_CSNP 204
|
|
|
|
#define PDU_TYPE_ISIS_L1_PSNP 205
|
|
|
|
#define PDU_TYPE_ISIS_L2_CSNP 206
|
|
|
|
#define PDU_TYPE_ISIS_L2_PSNP 207
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
#define PROTO_STRING_ISIS "ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol"
|
|
|
|
#define PROTO_STRING_IDRP "ISO 10747 IDRP InTER Domain Routeing Information Exchange Protocol"
|
2000-04-15 22:11:26 +00:00
|
|
|
#define PROTO_STRING_ESIS "ISO 9542 ESIS Routeing Information Exchange Protocol"
|
2002-08-28 21:04:11 +00:00
|
|
|
#define PROTO_STRING_CLNP "ISO 8473 CLNP ConnectionLess Network Protocol"
|
2000-04-15 22:11:26 +00:00
|
|
|
#define PROTO_STRING_COTP "ISO 8073 COTP Connection-Oriented Transport Protocol"
|
2000-07-01 08:55:28 +00:00
|
|
|
#define PROTO_STRING_CLTP "ISO 8602 CLTP ConnectionLess Transport Protocol"
|
2000-06-19 04:49:36 +00:00
|
|
|
#define PROTO_STRING_LSP "ISO 10589 ISIS Link State Protocol Data Unit"
|
|
|
|
#define PROTO_STRING_CSNP "ISO 10589 ISIS Complete Sequence Numbers Protocol Data Unit"
|
|
|
|
#define PROTO_STRING_PSNP "ISO 10589 ISIS Partial Sequence Numbers Protocol Data Unit"
|
2000-04-15 22:11:26 +00:00
|
|
|
|
|
|
|
#define OSI_PDU_TYPE_MASK 0x1f
|
|
|
|
#define BIS_PDU_TYPE MASK 0xff
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2000-04-15 22:11:26 +00:00
|
|
|
|
|
|
|
#define BIT_1 0x01
|
|
|
|
#define BIT_2 0x02
|
|
|
|
#define BIT_3 0x04
|
|
|
|
#define BIT_4 0x08
|
|
|
|
#define BIT_5 0x10
|
|
|
|
#define BIT_6 0x20
|
|
|
|
#define BIT_7 0x40
|
|
|
|
#define BIT_8 0x80
|
|
|
|
|
|
|
|
#define BIT_9 0x0100
|
|
|
|
#define BIT_10 0x0200
|
|
|
|
#define BIT_11 0x0400
|
|
|
|
#define BIT_12 0x0800
|
|
|
|
#define BIT_13 0x1000
|
|
|
|
#define BIT_14 0x2000
|
|
|
|
#define BIT_15 0x4000
|
|
|
|
#define BIT_16 0x8000
|
|
|
|
|
|
|
|
/*
|
|
|
|
* published API functions
|
2000-02-15 21:06:58 +00:00
|
|
|
*/
|
|
|
|
|
2001-06-05 09:06:19 +00:00
|
|
|
typedef enum {
|
|
|
|
NO_CKSUM, /* checksum field is 0 */
|
|
|
|
DATA_MISSING, /* not all the data covered by the checksum was captured */
|
|
|
|
CKSUM_OK, /* checksum is OK */
|
|
|
|
CKSUM_NOT_OK /* checksum is not OK */
|
|
|
|
} cksum_status_t;
|
|
|
|
|
2002-08-02 23:36:07 +00:00
|
|
|
extern cksum_status_t calc_checksum(tvbuff_t *, int, guint, guint);
|
2003-05-15 06:35:02 +00:00
|
|
|
extern cksum_status_t check_and_get_checksum( tvbuff_t *, int, guint, guint, int, guint16*);
|
2000-04-15 22:11:26 +00:00
|
|
|
|
|
|
|
#endif /* _PACKET_OSI_H */
|