NAME
Base - A module that provides basic methods for the creation of perfSONAR XML fragments.
DESCRIPTION
The purpose of this module simplify the creation of valid XML for the various perfSONAR_PS services.
API
createEndPointL4( $doc, $ns, $hash, $role, $protocol )
Creates the following LibXML fragment:
<nmwgt:endPoint role="src" protocol="icmp">
<nmwgt:interface>
<nmwgt:ifHostName>iepm-bw.slac.stanford.edu<nmwgt:ifHostName>
<nmwgt:ipAddress>134.79.240.38</nmwgt:ipAddress>
</nmwgt:interface>
</nmwgt:endPoint>
Where $doc is the libXML document class, $ns is a hash of namespace references, $role is either 'src' or 'dst' and protocol is 'icmp' or 'tcp' or 'udp'. The $hash input is a assoc. hash of key, value pairs that will be inserted as children of the 'interface' element as tagname textContent() pairs.
createSubjectL4( $doc, $ns, $baseNS, $protocol, $source, $dest, $sourceIP, $destIP )
Creates the subject XML fragment as follows:
<pinger:subject id="pingsubject--slac.stanford.edu--frcu.eun.eg"
<nmtl4:endPointPair>
<nmtl4:endPoint role="src" protocol="icpm">
<nmtl3:interface id="#d1">
<nmtl3:ifHostName>iepm-bw.slac.stanford.edu"</nmtl3:ifHostName>
<nmtl3:ipAddress>134.79.240.38</nmtl3:ipAddress>
</nmtl3:interface>
</nmtl4:endPoint>
<nmtl4:endPoint role="dst" protocol="icpm">
<nmtl3:interface id="#a1">
<nmtl3:ifHostName>atlang-hstnng.abilene.ucaid.edu</nmtl3:ifHostName>
<nmtl3:ipAddress>"198.32.8.34</nmtl3:ipAddress>
</nmtl3:interface>
</nmtl4:endPoint>
</nmtl4:endPointPair>
</pinger:subject>
createSubjectL3( $doc, $ns, $baseNS, $protocol, $source, $dest )
Creates the subject XML fragment as follows: