// // $Copyright$ // // $Name: $ // // $Id: ping.def,v 1.1.1.1 2000/10/31 22:39:10 sekiya Exp $ // #define PING_ID 0xffff #define PING_SN 0x0001 // // ICMP echo request // FEM_icmp6_echo_request( echo_request, _HETHER_tn2nut, {}, { Identifier = PING_ID; SequenceNumber = PING_SN; payload = echo_data8; } ) // // ICMP echo reply // FEM_icmp6_echo_reply( echo_reply, _HETHER_nut2tn, {}, { Identifier = PING_ID; SequenceNumber = PING_SN; payload = echo_data8; } ) // // Neighbor Solicitation // FEM_icmp6_ns( ns, _HETHER_nut2tnsolnode, { _SRC(oneof(nutv6(),nut2v6(_GLOBAL0_UCAST_PRFX,_GLOBAL0_UCAST_PRFXLEN))); _DST(_IPV6_SOLNODE_MCAST(tnv6())); HopLimit = 255; }, { TargetAddress = tnv6(); option = _SLLOPT_nut; } ) // // Neighbor Advertisement // FEM_icmp6_na( na, _HETHER_tn2nut, { _SRC(tnv6()); _DST(nutv6()); HopLimit = 255; }, { SFlag = 1; OFlag = 1; TargetAddress = tnv6(); option = _TLLOPT_tn; } ) // // Payload Data // Payload echo_data8 { data = {1,2,3,4,5,6,7,8}; } // // wrong IPv6 length // FEM_icmp6_echo_request( echo_request_wrong_v6len, _HETHER_tn2nut, {PayloadLength=100;}, { Identifier = PING_ID; SequenceNumber = PING_SN; payload = echo_data8; } ) // // wrong IPv6 version // FEM_icmp6_echo_request( echo_request_wrong_v6ver, _HETHER_tn2nut, {Version=5;}, { Identifier = PING_ID; SequenceNumber = PING_SN; payload = echo_data8; } )