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

Implements minimal client-oriented Generic TLV capabilities. More...

#include <string.h>
#include <tlvhelper.h>
#include <frametypes.h>
#include <generic_tlv_min.h>
Include dependency graph for generic_tlv_min.c:

Go to the source code of this file.

Functions

guint16 get_generic_tlv_type (gconstpointer tlv_vp, gconstpointer pktend)
 Return the 'Type' of the given TLV TLV entry (first two bytes) More...
 
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...
 
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...
 
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...
 
gconstpointer get_generic_tlv_value (gconstpointer tlv_vp, gconstpointer pktend)
 Return a const pointer to the 'Value' of the given generic TLV entry. More...
 
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...
 
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...
 
gboolean is_valid_generic_tlv_packet (gconstpointer tlv_vp, gconstpointer pktend)
 Return TRUE if this is a valid generic TLV packet. More...
 
gconstpointer get_generic_tlv_first (gconstpointer packet, gconstpointer pktend)
 
gconstpointer get_generic_tlv_next (gconstpointer tlv_vp, gconstpointer pktend)
 Return pointer to the next generic TLV entry after the current location. More...
 
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...
 

Detailed Description

Implements minimal client-oriented Generic TLV capabilities.

This file implements minimal Generic TLV capabiliies for a client - enough for it to be able to understand and validate a generic TLV packet structure, iterate through these generic TLVs, and return any particular TLV. For the most part, these TLVs correpond to our Frame class objects.

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.c.