COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	Copyright (c) Geoworks 1994 -- All Rights Reserved

			GEOWORKS CONFIDENTIAL

PROJECT:	PC GEOS
MODULE:		
FILE:		icmp.def

AUTHOR:		Jennifer Wu, Oct 17, 1994

	
REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	jwu	10/17/94		Initial revision


DESCRIPTION:
	Definitions for ICMP.
		
	$Id: icmp.def,v 1.1 97/04/04 14:26:07 newdeal Exp $

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@

IcmpHeaderFormat	struct
	IHF_type	byte		; ICMP type
	IHF_code	byte		; ICMP code
	IHF_checksum 	word		; ICMP checksum
IcmpHeaderFormat	ends

IcmpAddressMaskFormat	struct
	IAMF_common	IcmpHeaderFormat
	IAMF_id		word		; identification
	IAMF_seq	word		; sequence number
	IAMF_mask	dword		; 0 for addr mask requests
IcmpAddressMaskFormat	ends

IcmpEchoFormat	struct
	IEF_common	IcmpHeaderFormat
	IEF_id		word
	IEF_seq		word
	IEF_data	label byte	; data is optional and length may vary
IcmpEchoFormat	ends

IcmpTimestampFormat	struct
	ITF_common	IcmpHeaderFormat
	ITF_id		word
	ITF_seq		word
	ITF_originate	dword		; originate timestamp
	ITF_receive	dword		; receive timestamp
	ITF_transmit	dword		; transmit timestamp
IcmpTimestampFormat	ends


;---------------------------------------------------------------------------
;		Icmp Types and Codes
;---------------------------------------------------------------------------

ICMP_TYPE_ECHO_REPLY		equ	0
ICMP_TYPE_UNREACH		equ	3
ICMP_TYPE_SOURCE_QUENCH		equ	4
ICMP_TYPE_REDIRECT		equ	5		; only used by gateways
ICMP_TYPE_ECHO_REQUEST		equ	8
ICMP_TYPE_ROUTER_ADV		equ	9		; only used by gateways
ICMP_TYPE_ROUTER_SOLICIT	equ	10		; only used by gateways
ICMP_TYPE_TIME_EXCEEDED		equ	11
ICMP_TYPE_PARAM_PROBLEM		equ	12
ICMP_TYPE_TIMESTAMP_REQUEST	equ	13
ICMP_TYPE_TIMESTAMP_REPLY	equ	14
ICMP_TYPE_INFO_REQUEST		equ	15		; obsolete
ICMP_TYPE_INFO_REPLY		equ	16		; obsolete
ICMP_TYPE_ADDR_MASK_REQUEST	equ	17
ICMP_TYPE_ADDR_MASK_REPLY	equ	18		

IcmpUnreachCode		etype	byte, 0, 1
IUC_NETWORK_UNREACHABLE			enum	IcmpUnreachCode
IUC_HOST_UNREACHABLE			enum	IcmpUnreachCode
IUC_PROTOCOL_UNREACHABLE		enum	IcmpUnreachCode
IUC_PORT_UNREACHABLE			enum	IcmpUnreachCode
IUC_FRAGMENTATION_NEEDED		enum	IcmpUnreachCode
IUC_SOURCE_ROUTE_FAILED			enum	IcmpUnreachCode
IUC_DESTINATION_NETWORK_UNKNOWN		enum	IcmpUnreachCode
IUC_DESTINATION_HOST_UNKNOWN		enum	IcmpUnreachCode
IUC_SOURCE_HOST_ISOLATED		enum	IcmpUnreachCode	; obsolete
IUC_DESTINATION_NETWORK_PROHIBITED	enum	IcmpUnreachCode
IUC_DESTINATION_HOST_PROHIBITED		enum	IcmpUnreachCode
IUC_NETWORK_UNREACHABLE_FOR_TOS		enum	IcmpUnreachCode
IUC_HOST_UNREACHABLE_FOR_TOS		enum	IcmpUnreachCode
IUC_COMMUNICATION_PROHIBITED		enum	IcmpUnreachCode
IUC_HOST_PRECEDENCE_VIOLATION		enum	IcmpUnreachCode
IUC_PRECEDENCE_CUTOFF			enum	IcmpUnreachCode

IcmpTimeExceededCode	etype	byte, 0, 1
ITEC_TTL_ZERO_DURING_TRANSIT		enum	IcmpTimeExceededCode
ITEC_TTL_ZERO_DURING_REASSEMBLY		enum	IcmpTimeExceededCode

IcmpParamProblemCode	etype	byte, 0, 1
IPPC_IP_HEADER_BAD			enum	IcmpParamProblemCode
IPPC_REQUIRED_OPTION_MISSING		enum	IcmpParamProblemCode

ICMP_ECHO_CODE		equ	0
ICMP_SOURCE_QUENCH_CODE	equ	0
ICMP_ROUTER_CODE	equ	0
ICMP_TIMESTAMP_CODE	equ	0
ICMP_PARAM_PROB_CODE	equ	0
ICMP_INFO_CODE		equ	0
ICMP_ADDR_MASK_CODE	equ	0
