Compare an address against another.
Address comparison is determined first by comparing the associated Transport, then the encapsulated data size, and finally the data itself. The Transport is responsible for being able to correctly compare its own address data.
It is generally unwise to compare addresses associated with different Transports. Nevertheless, the behavior is deterministic and can be used for sorting.
- Note
- If both parameters are NULL, they are considered equal. If only one is NULL, it is considered lesser than the non-NULL address.
- Parameters
-
self | The address to be compared. |
addr | The address with which to compare. |
- Returns
- Indicates how the two transport addresses compare to each other. The return value is a standard integer, and its exact value is irrelevant (and may be platform dependent). It is intended to be used only in comparison, as follows:
- Zero ( == 0 ) if addr1 == addr2
- Positive ( > 0 ) if addr1 > addr2
- Negative ( < 0 ) if addr1 < addr2
- See Also
- DOFAddress_IsEqual