//
// $Copyright_v6PC$
//
// $Copyright$
//
// $Name:  $
//
// $TAHI: ct/spec/HL_OneToRouter.def,v 1.10 2004/04/02 03:47:51 kenta Exp $
//

#define HOP_LIMIT		1

#include "./IH_Router.def"

/*
 * HopLimit unchanged (1)
 */

FEM_icmp6_time_exceeded(
	icmp_type3_code0,
	_HETHER_nut2tn,
	{
		_SRC(NUT_GL0_ADDR);
		_DST(TN_GL0_ADDR);
	},
	{
		Code = 0;	// hop limit exeeded in transit
		payload = any;
//		payload = err;
	}
)

FEM_icmp6_time_exceeded(
	icmp_type3_code0_link1,
	_HETHER_nut2tn,
	{
		_SRC(NUT_GL1_ADDR);
		_DST(TN_GL0_ADDR);
	},
	{
		Code = 0;	// hop limit exeeded in transit
		payload = any;
//		payload = err;
	}
)

Payload err {
	data = right(_PACKET_IPV6_NAME(echo_request_to_link0), 0);
}

/*
 * HopLimit changed (0)
 */

FEM_icmp6_echo_request(
	echo_request_from_link1_hoplimit0,
	_HETHER_nut2tn,
	{
		TrafficClass = TRAFFIC_CLASS;
		FlowLabel = FLOW_LABEL;
		HopLimit = 0;
		_SRC(TN_GL0_ADDR);
		_DST(TN_GL1_ADDR);
	},
	{
		Identifier = PING_ID;
		SequenceNumber = PING_SN;
		payload = echo_data8;
	}
)

FEM_icmp6_time_exceeded(
	icmp_type3_code0_hoplimit0,
	_HETHER_nut2tn,
	{
		_SRC(NUT_GL0_ADDR);
		_DST(TN_GL0_ADDR);
	},
	{
		Code = 0;	// hop limit exeeded in transit
		payload = any;
//		payload = err_hoplimit0;
	}
)

FEM_icmp6_time_exceeded(
	icmp_type3_code0_link1_hoplimit0,
	_HETHER_nut2tn,
	{
		_SRC(NUT_GL1_ADDR);
		_DST(TN_GL0_ADDR);
	},
	{
		Code = 0;	// hop limit exeeded in transit
		payload = any;
//		payload = err_hoplimit0;
	}
)

Payload err_hoplimit0 {
	data = right(_PACKET_IPV6_NAME(echo_request_from_link1_hoplimit0), 0);
}
