//
// $Copyright$
//
// $Name:  $
//
// $Id: IH_UnrecognizedNextHeader.def,v 1.1.1.1 2000/09/28 00:15:05 sekiya Exp $
//

FEM_hdr_ipv6_exth(
	unrecog,
	_HETHER_tn2nut,
	{
		_SRC(tnv6());
		_DST(nutv6());
		NextHeader = 128;	// unrecognized value
	},
	{
		header = _HDR_IPV6_NAME(unrecog);
		upper = apl;
	}
)

// ICMP error from NUT

FEM_icmp6_parameter_problem(
	icmperr,
	_HETHER_nut2tn,
	{
		_SRC(nutv6());
		_DST(tnv6());
	},
	{
		Code = 1;	// unrecognized Next Header type encounted
		Pointer = 6;	// Next Header field
		payload = err;
	}
)

////////////////////////////////////////////////////////////////////////
// data
//

Payload apl {
	data = {};
}

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

//----------------------------------------------------------------------
// Neighbor Solicitation and Neighbor Advertisement
//----------------------------------------------------------------------

FEM_icmp6_ns(
	ns,
	_HETHER_nut2tnsolnode,
	{
		_SRC(oneof(nutv6(),nut2v6(_GLOBAL0_UCAST_PRFX,_GLOBAL0_UCAST_PRFXLEN,"Link0")));
		_DST(_IPV6_SOLNODE_MCAST(tnv6()));
		HopLimit = 255;
	},
	{
		TargetAddress = tnv6();
		option = _SLLOPT_nut;
	}
)

FEM_icmp6_na(
	na,
	_HETHER_tn2nut,
	{
		_SRC(tnv6());
		_DST(nutv6());
		HopLimit = 255;
	},
	{
		SFlag = 1;
		OFlag = 1;
		TargetAddress = tnv6();
		option = _TLLOPT_tn;
	}
)

