Auto-Addressing
The Auto-Addressing sub-package (oms_aa) creates and assigns unique network addresses to each object in a network. oms_aa considers both explicit and automatic address assignments to ensure that each type of network address is unique. (In this context, an “address” can be any attribute of type integer.)
The address assignment and resolution process has three distinct phases:
- Each object that needs to obtain or verify a network address must indicate the address type by calling
oms_aa_address_handle_get(). This procedure returns a handle to a specific address list. oms_aa maintains a global set of address lists; each list records all registered addresses of a specific type (such as MAC addresses or server addresses). - Once all objects have obtained address-list handles, each object then registers its network address. If the address is auto-assigned, oms_aa creates a unique address and adds it to the list. If the address is explicitly assigned, oms_aa simply adds the address to the list. If oms_aa encounters two addresses of the same type explicitly assigned the same number, the simulation terminates with an error message.
Most objects register addresses by calling
oms_aa_address_resolve(). Objects in FDDI or Token Ring networks useoms_aa_address_verify_ring()oroms_aa_address_resolve_ring()to register their addresses. Unconnected objects may not require network addresses, but must still register MAC addresses by callingoms_aa_unconnected_mac_register(). - Once all addresses are registered, each object obtains its final address(es) by calling
op_ima_obj_attr_get(). This step is necessary for objects with auto-assigned addresses, because the address initially assigned may have changed—for instance, oms_aa may change an existing auto-assigned address if it later finds that the same address number is explicitly assigned to another object.
oms_aa also includes a set of procedures for obtaining and updating existing addresses after the registration/assignment process has completed. You can call oms_aa_address_find() to locate a specific address in an address list. You can obtain an address at random from a list or part of a list by calling oms_aa_dest_addr_get() or oms_aa_dest_addr_from_range_get(), respectively. You can specify an address as a valid or invalid destination using oms_aa_dest_status_get(), or check its destination status using oms_aa_dest_status_check().
The functions that implement the auto-addressing (oms_aa) operations are described in the following sections.