#include <machine_uid.h>


Public Types | |
| enum | known_location_types { INVALID_LOCATION, TCPIP_LOCATION, IPX_LOCATION, NETBIOS_LOCATION } |
Public Member Functions | |
| machine_uid () | |
| machine_uid (known_location_types type, const byte_array &address) | |
| machine_uid (const machine_uid &to_copy) | |
| virtual | ~machine_uid () |
| known_location_types | type () const |
| bool | valid () const |
| machine_uid & | operator= (const machine_uid &to_copy) |
| void | reset (known_location_types type, const byte_array &address) |
| istring | text_form () const |
| istring | compact_form () const |
| byte_array | native () const |
| bool | operator== (const machine_uid &to_compare) const |
| bool | operator!= (const machine_uid &to_compare) const |
| virtual void | pack (byte_array &packed_form) const |
| Creates a packed form of the packable object in "packed_form". | |
| virtual bool | unpack (byte_array &packed_form) |
| Restores the packable from the "packed_form". | |
| const byte_array & | raw () const |
Static Public Member Functions | |
| static const istring & | type_name (known_location_types type) |
| static machine_uid | expand (const istring &compacted) |
Definition at line 41 of file machine_uid.h.
Definition at line 44 of file machine_uid.h.
| machine_uid::machine_uid | ( | ) |
| machine_uid::machine_uid | ( | known_location_types | type, | |
| const byte_array & | address | |||
| ) |
Definition at line 33 of file machine_uid.cpp.
| machine_uid::machine_uid | ( | const machine_uid & | to_copy | ) |
Definition at line 41 of file machine_uid.cpp.
| machine_uid::~machine_uid | ( | ) | [virtual] |
| const istring & machine_uid::type_name | ( | known_location_types | type | ) | [static] |
Definition at line 57 of file machine_uid.cpp.
References IPX_LOCATION, NETBIOS_LOCATION, and TCPIP_LOCATION.
Referenced by text_form().
| machine_uid::known_location_types machine_uid::type | ( | ) | const |
Definition at line 121 of file machine_uid.cpp.
References array< contents >::get(), INVALID_LOCATION, and array< contents >::length().
Referenced by text_form().
| bool machine_uid::valid | ( | ) | const [inline] |
Definition at line 67 of file machine_uid.h.
Referenced by range_limiter::add(), cromp_common::decode_host(), range_limiter::is_allowed(), machine_uid_array::member(), and range_limiter::remove().
| machine_uid & machine_uid::operator= | ( | const machine_uid & | to_copy | ) |
| void machine_uid::reset | ( | known_location_types | type, | |
| const byte_array & | address | |||
| ) |
Definition at line 48 of file machine_uid.cpp.
References array< contents >::reset().
Referenced by internet_machine_uid::internet_machine_uid().
| istring machine_uid::text_form | ( | ) | const |
Definition at line 79 of file machine_uid.cpp.
References array< contents >::get(), array< contents >::length(), TCPIP_LOCATION, type(), and type_name().
Referenced by cromp_common::chew_hostname().
| istring machine_uid::compact_form | ( | ) | const |
Definition at line 95 of file machine_uid.cpp.
References byte_format::bytes_to_shifted_string().
Referenced by cromp_common::chew_hostname().
| machine_uid machine_uid::expand | ( | const istring & | compacted | ) | [static] |
Definition at line 102 of file machine_uid.cpp.
References _contents, array< contents >::reset(), and byte_format::shifted_string_to_bytes().
Referenced by cromp_common::decode_host().
| byte_array machine_uid::native | ( | ) | const |
Definition at line 145 of file machine_uid.cpp.
References array< contents >::last(), array< contents >::length(), and array< contents >::subarray().
| bool machine_uid::operator== | ( | const machine_uid & | to_compare | ) | const |
Definition at line 110 of file machine_uid.cpp.
References _contents, array< contents >::get(), and array< contents >::length().
| bool machine_uid::operator!= | ( | const machine_uid & | to_compare | ) | const [inline] |
Definition at line 91 of file machine_uid.h.
| void machine_uid::pack | ( | byte_array & | packed_form | ) | const [virtual] |
Creates a packed form of the packable object in "packed_form".
This must append to the data in "packed_form" rather than clearing prior contents.
Implements packable.
Definition at line 127 of file machine_uid.cpp.
References basis::attach(), and array< contents >::length().
| bool machine_uid::unpack | ( | byte_array & | packed_form | ) | [virtual] |
Restores the packable from the "packed_form".
This object becomes the unpacked form, and therefore must lose any of its prior contents that depend on the data in "packed_form". This is up to the derived unpack function to figure out. The "packed_form" is modified by extracting all of the pieces that are used for this object; the remainder stays in "packed_form". true is returned if the unpacking was successful.
Implements packable.
Definition at line 133 of file machine_uid.cpp.
References basis::detach(), array< contents >::length(), array< contents >::subarray(), and array< contents >::zap().
| const byte_array & machine_uid::raw | ( | ) | const |
1.5.6