|
The Assimilation Monitoring Project
|
TLV helper interfaces definitions. More...


Go to the source code of this file.
Functions | |
| WINEXPORT guint8 | tlv_get_guint8 (const void *vitem, const void *bufend) |
| Retrieve an unsigned 8 bit integer from the given location with error checking. More... | |
| WINEXPORT guint16 | tlv_get_guint16 (const void *vitem, const void *bufend) |
| Retrieve an unsigned 16 bit integer from the given location with error checking and without caring about byte alignment. More... | |
| WINEXPORT guint32 | tlv_get_guint24 (const void *vitem, const void *bufend) |
| Retrieve an unsigned 24 bit (3-byte) integer from the given location with error checking and without caring about byte alignment. More... | |
| WINEXPORT guint32 | tlv_get_guint32 (const void *vitem, const void *bufend) |
| Retrieve an unsigned 32 bit integer from the given location with error checking and without caring about byte alignment. More... | |
| WINEXPORT guint64 | tlv_get_guint64 (const void *vitem, const void *bufend) |
| Retrieve an unsigned 64 bit integer from the given location with error checking and without caring about byte alignment. More... | |
| WINEXPORT void | tlv_set_guint8 (void *vitem, guint8 item, const void *bufend) |
| Set an unsigned 8 bit integer to the given location with error checking. More... | |
| WINEXPORT void | tlv_set_guint16 (void *vitem, guint16 item, const void *bufend) |
| Set an unsigned 16 bit integer to the given location with error checking and without caring about byte alignment. More... | |
| WINEXPORT void | tlv_set_guint24 (void *vitem, guint32 item, const void *bufend) |
| Set an unsigned 24 bit (3-byte) integer to the given location with error checking and without caring about byte alignment. More... | |
| WINEXPORT void | tlv_set_guint32 (void *vitem, guint32 item, const void *bufend) |
| Set an unsigned 32 bit integer to the given location with error checking and without caring about byte alignment. More... | |
| WINEXPORT void | tlv_set_guint64 (void *vitem, guint64 item, const void *bufend) |
| Set an unsigned 64 bit integer to the given location with error checking and without caring about byte alignment. More... | |
TLV helper interfaces definitions.
Provides a bunch of generic getters and putters for TLV-style integer information. Used by all our TLV implementations (3 of them at this writing)
This file is part of the Assimilation Project.
The Assimilation software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the Assimilation Project software. If not, see http://www.gnu.org/licenses/
Definition in file tlvhelper.h.
| WINEXPORT guint16 tlv_get_guint16 | ( | const void * | vitem, |
| const void * | bufend | ||
| ) |
Retrieve an unsigned 16 bit integer from the given location with error checking and without caring about byte alignment.
| vitem | Location to get int from |
| bufend | one byte past end of buffer |
Definition at line 53 of file tlvhelper.c.
Referenced by _addrframe_default_isvalid(), _decode_packet_get_frameset_data(), _ipportframe_default_isvalid(), addrframe_tlvconstructor(), get_cdp_cksum(), get_cdptlv_len(), get_cdptlv_type(), get_generic_tlv_len(), get_generic_tlv_type(), intframe_tlvconstructor(), ipportframe_tlvconstructor(), seqnoframe_tlvconstructor(), and tlv_get_guint24().

| WINEXPORT guint32 tlv_get_guint24 | ( | const void * | vitem, |
| const void * | bufend | ||
| ) |
Retrieve an unsigned 24 bit (3-byte) integer from the given location with error checking and without caring about byte alignment.
This is used for IEEE OUI values.
| vitem | Location to get int from |
| bufend | one byte past end of buffer |
Definition at line 131 of file tlvhelper.c.
References tlv_get_guint16().
Referenced by intframe_tlvconstructor().


| WINEXPORT guint32 tlv_get_guint32 | ( | const void * | vitem, |
| const void * | bufend | ||
| ) |
Retrieve an unsigned 32 bit integer from the given location with error checking and without caring about byte alignment.
| vitem | Location to get int from |
| bufend | one byte past end of buffer |
Definition at line 81 of file tlvhelper.c.
Referenced by intframe_tlvconstructor(), and seqnoframe_tlvconstructor().

| WINEXPORT guint64 tlv_get_guint64 | ( | const void * | vitem, |
| const void * | bufend | ||
| ) |
Retrieve an unsigned 64 bit integer from the given location with error checking and without caring about byte alignment.
| vitem | Location to get int from |
| bufend | one byte past end of buffer |
Definition at line 107 of file tlvhelper.c.
Referenced by intframe_tlvconstructor(), and seqnoframe_tlvconstructor().

| WINEXPORT guint8 tlv_get_guint8 | ( | const void * | vitem, |
| const void * | bufend | ||
| ) |
Retrieve an unsigned 8 bit integer from the given location with error checking.
| vitem | Location to get int from |
| bufend | one byte past end of buffer |
Definition at line 30 of file tlvhelper.c.
Referenced by _signframe_isvalid(), get_cdp_ttl(), get_cdp_vers(), get_lldptlv_len(), get_lldptlv_type(), intframe_tlvconstructor(), and signframe_tlvconstructor().

| WINEXPORT void tlv_set_guint16 | ( | void * | vitem, |
| guint16 | item, | ||
| const void * | bufend | ||
| ) |
Set an unsigned 16 bit integer to the given location with error checking and without caring about byte alignment.
| vitem | Location to stuff the int into |
| item | Value to stuff into 'vitem' |
| bufend | one byte past the end of this buffer |
Definition at line 68 of file tlvhelper.c.
Referenced by _addrframe_setaddr(), _intframe_updatedata(), _ipportframe_setaddr(), _seqnoframe_updatedata(), cast_frameset_tests(), frame_append_to_frameset_packet(), frameset_construct_packet(), set_generic_tlv_len(), set_generic_tlv_type(), and tlv_set_guint24().

| WINEXPORT void tlv_set_guint24 | ( | void * | vitem, |
| guint32 | item, | ||
| const void * | bufend | ||
| ) |
Set an unsigned 24 bit (3-byte) integer to the given location with error checking and without caring about byte alignment.
This is used for IEEE OUI values.
| vitem | Location to stuff the int into |
| item | Value to stuff into 'vitem' |
| bufend | one byte past the end of this buffer |
Definition at line 146 of file tlvhelper.c.
References tlv_set_guint16().
Referenced by _intframe_updatedata().


| WINEXPORT void tlv_set_guint32 | ( | void * | vitem, |
| guint32 | item, | ||
| const void * | bufend | ||
| ) |
Set an unsigned 32 bit integer to the given location with error checking and without caring about byte alignment.
| vitem | Location to stuff the int into |
| item | Value to stuff into 'vitem' |
| bufend | one byte past the end of this buffer |
Definition at line 93 of file tlvhelper.c.
Referenced by _intframe_updatedata(), and _seqnoframe_updatedata().

| WINEXPORT void tlv_set_guint64 | ( | void * | vitem, |
| guint64 | item, | ||
| const void * | bufend | ||
| ) |
Set an unsigned 64 bit integer to the given location with error checking and without caring about byte alignment.
| vitem | Location to stuff the int into |
| item | Value to stuff into 'vitem' |
| bufend | one byte past the end of this buffer |
Definition at line 119 of file tlvhelper.c.
Referenced by _intframe_updatedata(), and _seqnoframe_updatedata().

| WINEXPORT void tlv_set_guint8 | ( | void * | vitem, |
| guint8 | item, | ||
| const void * | bufend | ||
| ) |
Set an unsigned 8 bit integer to the given location with error checking.
| vitem | Location to stuff the int into |
| item | Value to stuff into 'vitem' |
| bufend | one byte past the end of this buffer |
Definition at line 41 of file tlvhelper.c.
Referenced by _intframe_updatedata(), and _signframe_updatedata().
