Commit afd74174 authored by tepelmann's avatar tepelmann
Browse files

New f_buildLinkLayerAddressOption_Ipv4.

parent 3a24fb7b
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -1879,4 +1879,24 @@
	}//end f_sendFragmentedIpv6PacketAndReceiveFragmentedReply


	/**
	 * @desc RFC2529 Creates an Source/Target Link-layer Address option when the link layer is IPv4
	 * @param isSrc Indicator for type of address, true if source address, false if destination address
	 * @param p_address
	 * @return 
	 * @verdict 
	 */
	function f_buildLinkLayerAddressOption_Ipv4(in boolean isSrc, in Ipv4Address p_address) return octetstring {
	    var octetstring v_type;
	    
	    if (isSrc) {
	        v_type := '01'O;
	    }
	    else {
	        v_type := '02'O;
	    }
	    
	    return v_type & '01'O & c_2ZeroBytes & p_address; 
	} // end f_buildIPv4_LinkLayerAddress
	
} // end module LibIpv6_CommonTrans_Functions