The network utilities function library is a set of OmniMark functions that provides functions for:
Some network applications send or receive messages that contain numbers in binary form. Computers often represent numbers in binary form as 32-bit values.
32-bit numbers consist of 4 bytes or octets. Different kinds of computers may put these bytes in different orders. When a 32-bit number is transmitted from one computer to another (usually as part of a larger message), both computers must agree on the order of the bytes.
Network ordering is a standard way of ordering the bytes in a 32-bit binary number. It means that the first byte will be the most significant (or highest order) byte of the number, and the last will be the least significant (or lowest order) byte.
(To convert integers to and from the native binary format, see the "b" format
command and the binary
operator.)
This function library includes the following files:
The OMNETUTIL library is packaged as a module. To use OMNETUTIL, you must import the OMETUTIL module into your program using a statement like this:
import "omnetutil.xmd" prefixed by netutil.
Note that the prefix "netutil.", which is attached to all functions, constants, and opaque data types exported by this library, is set in this statement and can be changed. For readability, we recommend that you always use the standard prefix when importing modules supplied by OmniMark.