The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
generic_tlv_min.h File Reference

Provides definitions for using our generic TLV capabilities. More...

#include <projectcommon.h>
Include dependency graph for generic_tlv_min.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GENERICTLV_HDRSZ   (sizeof(guint16)+/*sizeof(guint24)*/3)
 Size of Generic TLV header - ((type + length) == 5) More...
 

Functions

WINEXPORT guint16 get_generic_tlv_type (gconstpointer tlv_vp, gconstpointer pktend)
 Return the 'Type' of the given TLV TLV entry (first two bytes) More...
 
WINEXPORT guint32 get_generic_tlv_len (gconstpointer tlv_vp, gconstpointer pktend)
 Return the 'Length' of the given generic TLV entry (first 3 bytes after type) More...
 
WINEXPORT gconstpointer get_generic_tlv_value (gconstpointer tlv_vp, gconstpointer pktend)
 Return a const pointer to the 'Value' of the given generic TLV entry. More...
 
WINEXPORT gpointer get_generic_tlv_nonconst_value (gpointer tlv_vp, gconstpointer pktend)
 Return a non-const (mutable) pointer to the 'Value' of the given generic TLV entry. More...
 
WINEXPORT guint32 get_generic_tlv_totalsize (gsize datasize)
 
WINEXPORT gboolean is_valid_generic_tlv_packet (gconstpointer tlv_vp, gconstpointer pktend)
 Return TRUE if this is a valid generic TLV packet. More...
 
WINEXPORT gconstpointer get_generic_tlv_first (gconstpointer packet, gconstpointer pktend)
 
WINEXPORT gconstpointer get_generic_tlv_next (gconstpointer tlv_vp, gconstpointer pktend)
 Return pointer to the next generic TLV entry after the current location. More...
 
WINEXPORT gconstpointer find_next_generic_tlv_type (gconstpointer tlv_vp, guint16 tlvtype, gconstpointer pktend)
 Return pointer to the next TLV entry of the given type at or after the current location. More...
 
WINEXPORT void set_generic_tlv_type (gpointer tlv_vp, guint16 newtype, gconstpointer pktend)
 Set the 'Type' of the given TLV TLV entry (first two bytes) More...
 
WINEXPORT void set_generic_tlv_len (gpointer tlv_vp, guint32 newsize, gconstpointer pktend)
 Set the 'Length' of the given generic TLV entry (first 3 bytes after type) More...
 
WINEXPORT void set_generic_tlv_value (gpointer tlv_vp, void *srcdata, guint32 srcsize, gconstpointer pktend)
 Set the TLV data value to the given 'tlv_vp' pointer. More...
 

Detailed Description

Provides definitions for using our generic TLV capabilities.

We structure our packet bodies using this TLV (Type, Length, Value) approach so all the Frame-derived classes make good use of these generic TLV functions.

See Also
Frame

This file is part of the Assimilation Project.

Author
Copyright © 2011, 2012 - Alan Robertson alanr.nosp@m.@uni.nosp@m.x.sh
The Assimilation software is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

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 generic_tlv_min.h.

Macro Definition Documentation

#define GENERICTLV_HDRSZ   (sizeof(guint16)+/*sizeof(guint24)*/3)

Function Documentation

WINEXPORT guint32 get_generic_tlv_totalsize ( gsize  datasize)