Loading ttcn3/EtsiLibrary/LibIpv6/LibCommonRfcs/LibIpv6_Interface_Functions.ttcn +2 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,8 @@ group rfc3775Mipv6_ExtHdrFunctions { if (f_isPresentBindingAuthorizationDataOption(p_mobileHeader.mobileMessage.bindingUpdateMsg, v_position) == e_success) { p_mobileHeader.checksum := c_2ZeroBytes; if (p_mobileHeader.mobileMessage.bindingUpdateMsg.lifeTime != 0) { vc_mobileSec.cnSimuParams.kbm := fx_mac( e_sha1, c_1ZeroByte, bit2oct(vc_mobileSec.cnSimuParams.homeKeygenToken) Loading ttcn3/EtsiLibrary/LibIpv6/LibCore/LibIpv6_Rfc2461NeighborDiscovery_Functions.ttcn +2 −1 Original line number Diff line number Diff line Loading @@ -205,6 +205,7 @@ module LibIpv6_Rfc2461NeighborDiscovery_Functions { c_unspecifiedReachTime, c_unspecifiedRetransTime, m_mobileRtAdvOpt_prefixOpt ( p_prefixLength, // m_mobileRtAdvOpt_prefixOpt_noHaInfo ( p_prefixLength, c_lFlag1, c_aFlag1, c_rtAddrFlag1, Loading ttcn3/EtsiLibrary/LibIpv6/LibCore/LibIpv6_Rfc2461NeighborDiscovery_Templates.ttcn +29 −0 Original line number Diff line number Diff line Loading @@ -1439,6 +1439,35 @@ homeAgentInfo := p_homeAgentInfo, otherOption := omit } /* * @param p_prefixLength Length of the prefix. * @param p_lFlag Value for link flag. * @param p_aFlag Value for autoconfiguration flag. * @param p_validLifetime Value for valid life time duration. * @param p_preferredLifetime Value for preffered life time duration. * @param p_prefix Address prefix to be used */ template RtAdvOptions m_mobileRtAdvOpt_prefixOpt_noHaInfo ( template UInt8 p_prefixLength, UInt1 p_lFlag, UInt1 p_aFlag, UInt1 p_rtAddrFlag, UInt32 p_validLifetime, UInt32 p_preferredLifetime, template Ipv6Address p_prefix, template AdvertisementInterval p_advertisementInterval):={ srcLinkLayerAddr := omit, mtuOption:= omit, prefixInfoList := { m_mobilePrefixInfo( p_prefixLength, p_lFlag, p_aFlag, p_rtAddrFlag, p_validLifetime, p_preferredLifetime, p_prefix) }, advertisementInterval := p_advertisementInterval, homeAgentInfo := omit, otherOption := omit } /* * @param p_prefixLength Length of the prefix. Loading ttcn3/EtsiLibrary/LibIpv6/LibMobility/LibIpv6_Rfc3775Mipv6_Functions.ttcn +133 −21 Original line number Diff line number Diff line Loading @@ -829,45 +829,157 @@ module LibIpv6_Rfc3775Mipv6_Functions { } // end function f_sendRtAdvAndReplyToBindUpOffHome /* * @desc Test Node is Att Home and sends RtAdvertisements and waits for Binding Update * @param p_paramsRt All IPv6 parameters of Test Node * @desc Test Node is At Home and sends RtAdvertisements and waits for Binding Update * @param p_paramsHa All IPv6 parameters of Home Agent * @param p_paramsIut All IPv6 parameters of Node Under Test * @param p_nrOfRtAdv Nr of RTadv to be sent by the Test Node */ function f_sendRtAdvAndReceiveBindUpAtHome( template Ipv6NodeParams p_paramsRt, function f_sendRtAdvAndReplyBindUpAtHome( template Ipv6NodeParams p_paramsHa, template Ipv6NodeParams p_paramsIut, UInt8 p_nrOfRtAdv) runs on Ipv6Node return FncRetCode { //Variables var FncRetCode v_ret := e_success; var FncRetCode v_ret := e_error; var UInt8 v_count := 0; var default localDef := activate(a_receiveBindingUpdateAndReplyAtHome(p_paramsRt, p_paramsIut)); var Ipv6Packet v_ipv6Packet; var UInt16 v_seqNr := 0; var UInt16 v_lifetime := 0; //var default localDef := activate(a_receiveBindingUpdateAndReplyAtHome(p_paramsHa, p_paramsIut)); tc_loop.start; //tc_ac.start; alt { [] tc_loop.timeout { f_sendMipRtAdvWithPrefix( p_paramsRt.lla, // f_sendRtAdvWithPrefix( p_paramsRt.lla, f_sendMipRtAdvWithPrefix( p_paramsHa.lla, c_allNodesMca, p_paramsRt.prefixLength, p_paramsRt.gla ) ; p_paramsHa.prefixLength, p_paramsHa.gla ) ; tc_loop.stop; v_count := v_count + 1; if (v_count <= p_nrOfRtAdv) { tc_loop.start; repeat; } } //1st alternative: m_optPad2 + Coa [] ipPort.receive ( mw_bindingUpdate_srcDst ( c_dstHdr, p_paramsIut.mnHoa, p_paramsHa.gla, m_extHdrList_2Elem ( m_extHdr_dstOptHeader ( c_mobileHdr, c_optLen2, m_dstOptList_2Elem ( m_dstOpt_padN(m_optPad4), mw_dstOpt_homeAddr)), mw_extHdr_mobileHeader ( c_noNextHdr, c_bindingUpdate, mw_bindingUpdateMsg ( c_aFlag1, c_hFlag1, ?, //c_lFlag0, c_kFlag0, m_mobileOptList_2Elem ( m_mobileOpt_padN(m_optPad2), m_mobileOpt_altCoa( m_altCoA( p_paramsIut.mnHoa)))))))) -> value v_ipv6Packet { //Get SeqNr v_seqNr := v_ipv6Packet.extHdrList[1].mobileHeader.mobileMessage.bindingUpdateMsg.sequenceNumber; //Get Lifetime v_lifetime := v_ipv6Packet.extHdrList[1].mobileHeader.mobileMessage.bindingUpdateMsg.lifeTime; v_ret := e_success; v_ret := f_sendBA ( m_bindingAck ( c_routeHdr, p_paramsHa.gla, p_paramsIut.mnHoa, m_extHdrList_2Elem ( m_extHdr_routingHeader ( c_mobileHdr, c_routeHdrLen2, c_routeHdrType2, c_routeHdrSegmentsLeft1, m_routingHeaderData_homeAddress(p_paramsIut.mnHoa)), m_extHdr_mobileHeader ( c_noNextHdr, c_bindingAck, m_bindingAckMsg( v_seqNr, v_lifetime, m_mobileOptList_1Elem ( m_mobileOpt_padN(m_optPad4))))))); repeat; } //2nd alternative: m_optPad4 [] ipPort.receive ( mw_bindingUpdate_srcDst ( c_dstHdr, p_paramsIut.mnHoa, p_paramsHa.gla, m_extHdrList_2Elem ( m_extHdr_dstOptHeader ( c_mobileHdr, c_optLen2, m_dstOptList_2Elem( m_dstOpt_padN(m_optPad4), mw_dstOpt_homeAddr)), mw_extHdr_mobileHeader ( c_noNextHdr, c_bindingUpdate, mw_bindingUpdateMsg( c_aFlag1, c_hFlag1, ?, //c_lFlag0, c_kFlag0, m_mobileOptList_1Elem( m_mobileOpt_padN(m_optPad4))))))) -> value v_ipv6Packet { //Get SeqNr v_seqNr := v_ipv6Packet.extHdrList[1].mobileHeader.mobileMessage.bindingUpdateMsg.sequenceNumber; //Get Lifetime v_lifetime := v_ipv6Packet.extHdrList[1].mobileHeader.mobileMessage.bindingUpdateMsg.lifeTime; v_ret := e_success; v_ret := f_sendBA ( m_bindingAck ( c_routeHdr, p_paramsHa.gla, p_paramsIut.mnHoa, m_extHdrList_2Elem ( m_extHdr_routingHeader ( c_mobileHdr, c_routeHdrLen2, c_routeHdrType2, c_routeHdrSegmentsLeft1, m_routingHeaderData_homeAddress(p_paramsIut.mnHoa)), m_extHdr_mobileHeader ( c_noNextHdr, c_bindingAck, m_bindingAckMsg( v_seqNr, v_lifetime, m_mobileOptList_1Elem ( m_mobileOpt_padN(m_optPad4))))))); repeat; } // TODO DTE add when TT compiler fix // [] a_receiveBindingUpdateAndReply(p_paramsRt.haGlas[0]); // [] a_receiveBindingUpdateAndReply(p_paramsHa.gla); // [] tc_ac.timeout {//Guard timer // v_ret:= e_timeout; // } } deactivate(localDef); //deactivate(localDef); return v_ret; }//end function f_sendRtAdvAndReceiveBindUpAtHome }//end function f_sendRtAdvAndReplyBindUpAtHome }//end group bindingFns Loading Loading @@ -1695,7 +1807,7 @@ group mobileSecurityFns { * @param p_paramsIut All IP params of node under test */ altstep a_receiveBindingUpdateAndReplyAtHome( in template Ipv6NodeParams p_paramsTn, template Ipv6NodeParams p_paramsIut in template Ipv6NodeParams p_paramsIut //in template Ipv6Address p_haGlaTn ) runs on Ipv6Node { Loading @@ -1708,7 +1820,7 @@ group mobileSecurityFns { var Ipv6Address v_receivedTargetAddr := c_16ZeroBytes; var NeighborSolicitation v_nbrSol ; [] ipPort.receive(mw_nbrSol_addressDetermination(p_paramsIut.solNodeMca /*PX_SOL_NODE_MCA_IUT_A*/, ?)) -> value v_nbrSol{ [] ipPort.receive(mw_nbrSol_addressDetermination(p_paramsIut.solNodeMca, ?)) -> value v_nbrSol{ v_receivedTargetAddr := v_nbrSol.ipv6Payload.nbrSolMsg.targetAddr ; f_sendNbrAdv (m_nbrAdv_noExtHdr( p_paramsTn.lla, Loading @@ -1722,7 +1834,7 @@ group mobileSecurityFns { } //1st alternative : m_optPad2 + Coa [] ipPort.receive(mw_bindingUpdate_dst( c_mobileHdr, p_paramsTn.haGlas[0],//p_haGlaTn, p_paramsTn.gla,//p_haGlaTn, m_extHdrList_1Elem( mw_extHdr_mobileHeader (c_noNextHdr, c_bindingUpdate, Loading @@ -1742,7 +1854,7 @@ group mobileSecurityFns { //TODO SMU read v_mnCareOfAddr from MobileOptions v_ret := e_success ; v_ret := f_sendBA(m_bindingAck( c_mobileHdr, p_paramsTn.haGlas[0],//p_haGlaTn, p_paramsTn.gla,//p_haGlaTn, v_mnHomeAddr, m_extHdrList_1Elem( m_extHdr_mobileHeader ( Loading @@ -1757,7 +1869,7 @@ group mobileSecurityFns { } //2nd alternative : m_optPad4 [] ipPort.receive(mw_bindingUpdate_dst( c_mobileHdr, p_paramsTn.haGlas[0],//p_haGlaTn, p_paramsTn.gla,//p_haGlaTn, m_extHdrList_1Elem( mw_extHdr_mobileHeader (c_noNextHdr, c_bindingUpdate, Loading @@ -1775,7 +1887,7 @@ group mobileSecurityFns { v_mnHomeAddr := v_ipv6Packet.ipv6Hdr.sourceAddress; v_ret := e_success ; v_ret := f_sendBA(m_bindingAck( c_mobileHdr, p_paramsTn.haGlas[0],//p_haGlaTn, p_paramsTn.gla,//p_haGlaTn, v_mnHomeAddr, m_extHdrList_1Elem( m_extHdr_mobileHeader ( Loading Loading
ttcn3/EtsiLibrary/LibIpv6/LibCommonRfcs/LibIpv6_Interface_Functions.ttcn +2 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,8 @@ group rfc3775Mipv6_ExtHdrFunctions { if (f_isPresentBindingAuthorizationDataOption(p_mobileHeader.mobileMessage.bindingUpdateMsg, v_position) == e_success) { p_mobileHeader.checksum := c_2ZeroBytes; if (p_mobileHeader.mobileMessage.bindingUpdateMsg.lifeTime != 0) { vc_mobileSec.cnSimuParams.kbm := fx_mac( e_sha1, c_1ZeroByte, bit2oct(vc_mobileSec.cnSimuParams.homeKeygenToken) Loading
ttcn3/EtsiLibrary/LibIpv6/LibCore/LibIpv6_Rfc2461NeighborDiscovery_Functions.ttcn +2 −1 Original line number Diff line number Diff line Loading @@ -205,6 +205,7 @@ module LibIpv6_Rfc2461NeighborDiscovery_Functions { c_unspecifiedReachTime, c_unspecifiedRetransTime, m_mobileRtAdvOpt_prefixOpt ( p_prefixLength, // m_mobileRtAdvOpt_prefixOpt_noHaInfo ( p_prefixLength, c_lFlag1, c_aFlag1, c_rtAddrFlag1, Loading
ttcn3/EtsiLibrary/LibIpv6/LibCore/LibIpv6_Rfc2461NeighborDiscovery_Templates.ttcn +29 −0 Original line number Diff line number Diff line Loading @@ -1439,6 +1439,35 @@ homeAgentInfo := p_homeAgentInfo, otherOption := omit } /* * @param p_prefixLength Length of the prefix. * @param p_lFlag Value for link flag. * @param p_aFlag Value for autoconfiguration flag. * @param p_validLifetime Value for valid life time duration. * @param p_preferredLifetime Value for preffered life time duration. * @param p_prefix Address prefix to be used */ template RtAdvOptions m_mobileRtAdvOpt_prefixOpt_noHaInfo ( template UInt8 p_prefixLength, UInt1 p_lFlag, UInt1 p_aFlag, UInt1 p_rtAddrFlag, UInt32 p_validLifetime, UInt32 p_preferredLifetime, template Ipv6Address p_prefix, template AdvertisementInterval p_advertisementInterval):={ srcLinkLayerAddr := omit, mtuOption:= omit, prefixInfoList := { m_mobilePrefixInfo( p_prefixLength, p_lFlag, p_aFlag, p_rtAddrFlag, p_validLifetime, p_preferredLifetime, p_prefix) }, advertisementInterval := p_advertisementInterval, homeAgentInfo := omit, otherOption := omit } /* * @param p_prefixLength Length of the prefix. Loading
ttcn3/EtsiLibrary/LibIpv6/LibMobility/LibIpv6_Rfc3775Mipv6_Functions.ttcn +133 −21 Original line number Diff line number Diff line Loading @@ -829,45 +829,157 @@ module LibIpv6_Rfc3775Mipv6_Functions { } // end function f_sendRtAdvAndReplyToBindUpOffHome /* * @desc Test Node is Att Home and sends RtAdvertisements and waits for Binding Update * @param p_paramsRt All IPv6 parameters of Test Node * @desc Test Node is At Home and sends RtAdvertisements and waits for Binding Update * @param p_paramsHa All IPv6 parameters of Home Agent * @param p_paramsIut All IPv6 parameters of Node Under Test * @param p_nrOfRtAdv Nr of RTadv to be sent by the Test Node */ function f_sendRtAdvAndReceiveBindUpAtHome( template Ipv6NodeParams p_paramsRt, function f_sendRtAdvAndReplyBindUpAtHome( template Ipv6NodeParams p_paramsHa, template Ipv6NodeParams p_paramsIut, UInt8 p_nrOfRtAdv) runs on Ipv6Node return FncRetCode { //Variables var FncRetCode v_ret := e_success; var FncRetCode v_ret := e_error; var UInt8 v_count := 0; var default localDef := activate(a_receiveBindingUpdateAndReplyAtHome(p_paramsRt, p_paramsIut)); var Ipv6Packet v_ipv6Packet; var UInt16 v_seqNr := 0; var UInt16 v_lifetime := 0; //var default localDef := activate(a_receiveBindingUpdateAndReplyAtHome(p_paramsHa, p_paramsIut)); tc_loop.start; //tc_ac.start; alt { [] tc_loop.timeout { f_sendMipRtAdvWithPrefix( p_paramsRt.lla, // f_sendRtAdvWithPrefix( p_paramsRt.lla, f_sendMipRtAdvWithPrefix( p_paramsHa.lla, c_allNodesMca, p_paramsRt.prefixLength, p_paramsRt.gla ) ; p_paramsHa.prefixLength, p_paramsHa.gla ) ; tc_loop.stop; v_count := v_count + 1; if (v_count <= p_nrOfRtAdv) { tc_loop.start; repeat; } } //1st alternative: m_optPad2 + Coa [] ipPort.receive ( mw_bindingUpdate_srcDst ( c_dstHdr, p_paramsIut.mnHoa, p_paramsHa.gla, m_extHdrList_2Elem ( m_extHdr_dstOptHeader ( c_mobileHdr, c_optLen2, m_dstOptList_2Elem ( m_dstOpt_padN(m_optPad4), mw_dstOpt_homeAddr)), mw_extHdr_mobileHeader ( c_noNextHdr, c_bindingUpdate, mw_bindingUpdateMsg ( c_aFlag1, c_hFlag1, ?, //c_lFlag0, c_kFlag0, m_mobileOptList_2Elem ( m_mobileOpt_padN(m_optPad2), m_mobileOpt_altCoa( m_altCoA( p_paramsIut.mnHoa)))))))) -> value v_ipv6Packet { //Get SeqNr v_seqNr := v_ipv6Packet.extHdrList[1].mobileHeader.mobileMessage.bindingUpdateMsg.sequenceNumber; //Get Lifetime v_lifetime := v_ipv6Packet.extHdrList[1].mobileHeader.mobileMessage.bindingUpdateMsg.lifeTime; v_ret := e_success; v_ret := f_sendBA ( m_bindingAck ( c_routeHdr, p_paramsHa.gla, p_paramsIut.mnHoa, m_extHdrList_2Elem ( m_extHdr_routingHeader ( c_mobileHdr, c_routeHdrLen2, c_routeHdrType2, c_routeHdrSegmentsLeft1, m_routingHeaderData_homeAddress(p_paramsIut.mnHoa)), m_extHdr_mobileHeader ( c_noNextHdr, c_bindingAck, m_bindingAckMsg( v_seqNr, v_lifetime, m_mobileOptList_1Elem ( m_mobileOpt_padN(m_optPad4))))))); repeat; } //2nd alternative: m_optPad4 [] ipPort.receive ( mw_bindingUpdate_srcDst ( c_dstHdr, p_paramsIut.mnHoa, p_paramsHa.gla, m_extHdrList_2Elem ( m_extHdr_dstOptHeader ( c_mobileHdr, c_optLen2, m_dstOptList_2Elem( m_dstOpt_padN(m_optPad4), mw_dstOpt_homeAddr)), mw_extHdr_mobileHeader ( c_noNextHdr, c_bindingUpdate, mw_bindingUpdateMsg( c_aFlag1, c_hFlag1, ?, //c_lFlag0, c_kFlag0, m_mobileOptList_1Elem( m_mobileOpt_padN(m_optPad4))))))) -> value v_ipv6Packet { //Get SeqNr v_seqNr := v_ipv6Packet.extHdrList[1].mobileHeader.mobileMessage.bindingUpdateMsg.sequenceNumber; //Get Lifetime v_lifetime := v_ipv6Packet.extHdrList[1].mobileHeader.mobileMessage.bindingUpdateMsg.lifeTime; v_ret := e_success; v_ret := f_sendBA ( m_bindingAck ( c_routeHdr, p_paramsHa.gla, p_paramsIut.mnHoa, m_extHdrList_2Elem ( m_extHdr_routingHeader ( c_mobileHdr, c_routeHdrLen2, c_routeHdrType2, c_routeHdrSegmentsLeft1, m_routingHeaderData_homeAddress(p_paramsIut.mnHoa)), m_extHdr_mobileHeader ( c_noNextHdr, c_bindingAck, m_bindingAckMsg( v_seqNr, v_lifetime, m_mobileOptList_1Elem ( m_mobileOpt_padN(m_optPad4))))))); repeat; } // TODO DTE add when TT compiler fix // [] a_receiveBindingUpdateAndReply(p_paramsRt.haGlas[0]); // [] a_receiveBindingUpdateAndReply(p_paramsHa.gla); // [] tc_ac.timeout {//Guard timer // v_ret:= e_timeout; // } } deactivate(localDef); //deactivate(localDef); return v_ret; }//end function f_sendRtAdvAndReceiveBindUpAtHome }//end function f_sendRtAdvAndReplyBindUpAtHome }//end group bindingFns Loading Loading @@ -1695,7 +1807,7 @@ group mobileSecurityFns { * @param p_paramsIut All IP params of node under test */ altstep a_receiveBindingUpdateAndReplyAtHome( in template Ipv6NodeParams p_paramsTn, template Ipv6NodeParams p_paramsIut in template Ipv6NodeParams p_paramsIut //in template Ipv6Address p_haGlaTn ) runs on Ipv6Node { Loading @@ -1708,7 +1820,7 @@ group mobileSecurityFns { var Ipv6Address v_receivedTargetAddr := c_16ZeroBytes; var NeighborSolicitation v_nbrSol ; [] ipPort.receive(mw_nbrSol_addressDetermination(p_paramsIut.solNodeMca /*PX_SOL_NODE_MCA_IUT_A*/, ?)) -> value v_nbrSol{ [] ipPort.receive(mw_nbrSol_addressDetermination(p_paramsIut.solNodeMca, ?)) -> value v_nbrSol{ v_receivedTargetAddr := v_nbrSol.ipv6Payload.nbrSolMsg.targetAddr ; f_sendNbrAdv (m_nbrAdv_noExtHdr( p_paramsTn.lla, Loading @@ -1722,7 +1834,7 @@ group mobileSecurityFns { } //1st alternative : m_optPad2 + Coa [] ipPort.receive(mw_bindingUpdate_dst( c_mobileHdr, p_paramsTn.haGlas[0],//p_haGlaTn, p_paramsTn.gla,//p_haGlaTn, m_extHdrList_1Elem( mw_extHdr_mobileHeader (c_noNextHdr, c_bindingUpdate, Loading @@ -1742,7 +1854,7 @@ group mobileSecurityFns { //TODO SMU read v_mnCareOfAddr from MobileOptions v_ret := e_success ; v_ret := f_sendBA(m_bindingAck( c_mobileHdr, p_paramsTn.haGlas[0],//p_haGlaTn, p_paramsTn.gla,//p_haGlaTn, v_mnHomeAddr, m_extHdrList_1Elem( m_extHdr_mobileHeader ( Loading @@ -1757,7 +1869,7 @@ group mobileSecurityFns { } //2nd alternative : m_optPad4 [] ipPort.receive(mw_bindingUpdate_dst( c_mobileHdr, p_paramsTn.haGlas[0],//p_haGlaTn, p_paramsTn.gla,//p_haGlaTn, m_extHdrList_1Elem( mw_extHdr_mobileHeader (c_noNextHdr, c_bindingUpdate, Loading @@ -1775,7 +1887,7 @@ group mobileSecurityFns { v_mnHomeAddr := v_ipv6Packet.ipv6Hdr.sourceAddress; v_ret := e_success ; v_ret := f_sendBA(m_bindingAck( c_mobileHdr, p_paramsTn.haGlas[0],//p_haGlaTn, p_paramsTn.gla,//p_haGlaTn, v_mnHomeAddr, m_extHdrList_1Elem( m_extHdr_mobileHeader ( Loading