// $Copyright$
//
// $Id: sendMcastNS2.def,v 1.1.1.1 2000/10/31 22:39:03 sekiya Exp $

#include "nd.def"

//----------------------------------------------------------------------
// echo-request
//	TN(link-local) ==> NUT(link-local)
//----------------------------------------------------------------------
FEM_icmp6_echo_request(echo_request, _HETHER_tn2nut,
	{
	 _SRC(tnv6());
	 _DST(nutv6());},
	{
	 payload=echo_data;
	}
)

//----------------------------------------------------------------------
Payload echo_data {
	data=repeat(0x11,10);
}

//----------------------------------------------------------------------
// multicast NS
//	NUT(link-local) ==> TN(solicited-node[link-local])
//	target=TN(link-local)
//	w/ SLLA
//----------------------------------------------------------------------
FEM_icmp6_ns(multicast_ns, _HETHER_nut2tnsolnode,
	{
	 _SRC(nutv6());
	 _DST(_IPV6_SOLNODE_MCAST(tnv6()));
	 HopLimit=255;
	},
	{
	 TargetAddress=tnv6();
	 option=_SLLOPT_nut;
	}
)

//----------------------------------------------------------------------
_HETHER_define(hether_x2allnode, ether(A0N_MAC_ADDR),
	v62ethermulti(v6(_ALLNODES_MCAST_ADDR)))
_SLLOPT_define(sllopt_x, ether(A0N_MAC_ADDR))

//----------------------------------------------------------------------
// multicast RA
//	X(link-local) ==> all-node
//	m=0, o=0
//	lifetime=600, reachableTime=0, *retransTimer=3000
//----------------------------------------------------------------------
FEM_icmp6_ra(unsol_ra_set, hether_x2allnode,
	{
	 _SRC(v6ether(A0N_MAC_ADDR));
	 _DST(v6(_ALLNODES_MCAST_ADDR));
	 HopLimit=255;
	},
	{
	 CurHopLimit=0;
	 MFlag=0;
	 OFlag=0;
	 LifeTime=600;
	 ReachableTime=0;
	 RetransTimer=3000;
	 option=sllopt_x;
	}
)

//----------------------------------------------------------------------
// multicast RA
//	X(link-local) ==> all-node
//	m=0, o=0
//	lifetime=600, reachableTime=0, *retransTimer=1000
//----------------------------------------------------------------------
FEM_icmp6_ra(unsol_ra_clrtimer, hether_x2allnode,
	{
	 _SRC(v6ether(A0N_MAC_ADDR));
	 _DST(v6(_ALLNODES_MCAST_ADDR));
	 HopLimit=255;
	},
	{
	 CurHopLimit=0;
	 MFlag=0;
	 OFlag=0;
	 LifeTime=600;
	 ReachableTime=0;
	 RetransTimer=1000;
	}
)

//----------------------------------------------------------------------
// multicast RA
//	X(link-local) ==> all-node
//	m=0, o=0
//	*lifetime=0, reachableTime=0, retransTimer=0
//----------------------------------------------------------------------
FEM_icmp6_ra(unsol_ra_clrrtr, hether_x2allnode,
	{
	 _SRC(v6ether(A0N_MAC_ADDR));
	 _DST(v6(_ALLNODES_MCAST_ADDR));
	 HopLimit=255;
	},
	{
	 CurHopLimit=0;
	 MFlag=0;
	 OFlag=0;
	 LifeTime=0;
	 ReachableTime=0;
	 RetransTimer=0;
	}
)

//----------------------------------------------------------------------
