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

Describes interfaces to C-String Frame (Compressframe) C-Class It holds conventional zero-terminated byte strings. More...

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

Go to the source code of this file.

Data Structures

struct  _CompressFrame
 This is our CompressFrame class object - used for representing a compression method. More...
 
#define MAXUDPSIZE   65507
 Maximum UDP packet size. More...
 
#define DEFAULT_COMPRESSION_THRESHOLD   (MAXUDPSIZE/3)
 Default value of when to start compressing. More...
 
#define COMPRESS_NONE   0
 Compression methods. More...
 
#define COMPRESS_ZLIB   1
 Compression using 'zlib'. More...
 
typedef struct _CompressFrame CompressFrame
 
WINEXPORT CompressFramecompressframe_new (guint16 frame_type, guint16 compression_method)
 
WINEXPORT CompressFramecompressframe_new_string (guint16 frame_type, const char *compression_name)
 
WINEXPORT Framecompressframe_tlvconstructor (gpointer, gconstpointer, gpointer *, gpointer *)
 

Detailed Description

Describes interfaces to C-String Frame (Compressframe) C-Class It holds conventional zero-terminated byte strings.

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

Macro Definition Documentation

#define COMPRESS_NONE   0

Compression methods.

No compression

Definition at line 37 of file compressframe.h.

#define COMPRESS_ZLIB   1

Compression using 'zlib'.

Definition at line 38 of file compressframe.h.

Referenced by main().

#define DEFAULT_COMPRESSION_THRESHOLD   (MAXUDPSIZE/3)

Default value of when to start compressing.

Definition at line 34 of file compressframe.h.

Referenced by compressframe_new().

#define MAXUDPSIZE   65507

Maximum UDP packet size.

Definition at line 33 of file compressframe.h.

Referenced by _compressframe_updatedata().

Function Documentation

WINEXPORT CompressFrame* compressframe_new_string ( guint16  frame_type,
const char *  compression_name 
)

Definition at line 154 of file compressframe.c.

References compressframe_new(), DIMOF, and cma.store::name.

Here is the call graph for this function:

WINEXPORT Frame* compressframe_tlvconstructor ( gpointer  ,
gconstpointer  ,
gpointer *  ,
gpointer *   
)

< Start of compessed data

< Pointer to TLV Value

< Compressed packet size

< Type of compression from Value

< Size after decompression (from Value)

< Size after decompression (from decompression)

< Which compression method are we using? This is an index into allcompressions

< Frametype of this frame - TLV Type

< Return value

Definition at line 274 of file compressframe.c.

References _compressframe_findmethod(), _CompressFrame::baseclass, compressframe_new(), COMPRESSFRAMEMIN, _CompressFrame::decompressed_size, get_generic_tlv_type(), get_generic_tlv_value(), MAXUNCOMPRESSEDSIZE, tlv_get_guint24(), and tlv_get_guint8().

Here is the call graph for this function: