12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

15.5 Errors in setting address form<strong>at</strong>Errors are returned for both set-address-form<strong>at</strong> <strong>and</strong> exp<strong>and</strong>-port-field-bits primitives in the following cases:* if number of bits specified is less than 0. * if bit positio<strong>ns</strong> clash (contiguous number of requested free bits not *found). * if total number of bits exceed MAXADDRSIZE_. * if exp<strong>and</strong>-port-field-bits is <strong>at</strong>tempted with portbitsless than or * equal to the existing portsize. * if number of hierarchy levels donot m<strong>at</strong>ch with number of bits *specified (for each level).15.6 Comm<strong>and</strong>s <strong>at</strong> a glance<strong>The</strong> following is a list of address-form<strong>at</strong> rel<strong>at</strong>ed comm<strong>and</strong>s used in simul<strong>at</strong>ion scripts:$<strong>ns</strong>_ set-address-form<strong>at</strong> defThis comm<strong>and</strong> is used internally to set the address form<strong>at</strong> to its default value of 32 lower bits for port-id, 1 higher bit formcast <strong>and</strong> the rest 31 higher bits for node-id. However this API has been replaced by the new node API$<strong>ns</strong>_ node-config -addressType fl<strong>at</strong>.$<strong>ns</strong>_ set-address-form<strong>at</strong> hierarchicalThis comm<strong>and</strong> is used to set the address form<strong>at</strong> to the hierarchical configur<strong>at</strong>ion th<strong>at</strong> co<strong>ns</strong>ists of 3 levels with 8bits assignedto each level <strong>and</strong> 32 lower bits for port-id. However this API has been replaced by the new node API$<strong>ns</strong>_ node-config -addressType hierarchical.$<strong>ns</strong>_ set-address-form<strong>at</strong> hierarchical This comm<strong>and</strong> is used to set the address form<strong>at</strong> to a specific hierarchical setting. <strong>The</strong> indic<strong>at</strong>e the number of levelsof hierarchy in the addressing structure, while the args define number of bits for each level. An example would be $<strong>ns</strong>_set-address-form<strong>at</strong> hierachical 3 4 4 16 , where 4, 4 <strong>and</strong> 16 defines the number of bits to be used for theaddress space in level 1 , 2 <strong>and</strong> 3 respectively.$<strong>ns</strong>_ set-address-form<strong>at</strong> exp<strong>and</strong>edTHIS COMMAND IS NOW OBSOLETE This comm<strong>and</strong> was used to exp<strong>and</strong> the address space to 30 bits, alloc<strong>at</strong>ing 22higher bits for node-id <strong>and</strong> lower 8 bits for port-id. However this comm<strong>and</strong> is obsoleted now by 32 bit addressing, i.enode-id field is 32 bit wide.exp<strong>and</strong>-port-field-bits THIS COMMAND IS NOW OBSOLETE Similar to the comm<strong>and</strong> above, this was used to exp<strong>and</strong> the address space for theport-id field to number of bits. However this comm<strong>and</strong> is obsolete now th<strong>at</strong> the ports are 32 bit wide.143

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!