The Assimilation Project  based on Assimilation version 1.1.7.1474836767
fsqueue.c File Reference

FrameSet queueing class. More...

#include <projectcommon.h>
#include <stdlib.h>
#include <fsqueue.h>
#include <frameset.h>
#include <frametypes.h>
Include dependency graph for fsqueue.c:

Go to the source code of this file.

Functions

DEBUGDECLARATIONS FSTATIC void _fsqueue_finalize (AssimObj *aself)
 Finalize routine for our FsQueue class objects. More...
 
FSTATIC gboolean _fsqueue_enq (FsQueue *self, FrameSet *fs)
 Enqueue a FrameSet class onto an FsQueue class - exclusively for output queues - adds sequence number. More...
 
FSTATIC gboolean _fsqueue_inqsorted (FsQueue *self, FrameSet *fs)
 Enqueue a FrameSet class onto an FsQueue class - sorted by sequence number - NO dups allowed This function is used ONLY for received packets or it could be used for unsequenced output packets. More...
 
FSTATIC FrameSet_fsqueue_qhead (FsQueue *self)
 Return the FrameSet class from the head of the FsQueue class. More...
 
FSTATIC FrameSet_fsqueue_deq (FsQueue *self)
 Return the FrameSet class from the head of the queue - and remove it from the queue. More...
 
FSTATIC gint _fsqueue_ackthrough (FsQueue *self, SeqnoFrame *seq)
 Acknowledge and flush all framesets up through and including the given sequence number This is used exclusively for output queues - and is the result of the application on the other end sending us an ACK packet. More...
 
FSTATIC void _fsqueue_flush (FsQueue *self)
 Flush all framesets from the queue (if any). More...
 
FSTATIC void _fsqueue_flush1 (FsQueue *self)
 Flush only the first frameset from the queue (if any). More...
 
FSTATIC guint _fsqueue_qlen (FsQueue *self)
 Return the current length of this queue. More...
 
FSTATIC void _fsqueue_setmaxqlen (FsQueue *self, guint max)
 Set the maximum number of queue elements. More...
 
FSTATIC guint _fsqueue_getmaxqlen (FsQueue *self)
 Return the maximum number of queue elements. More...
 
FSTATIC gboolean _fsqueue_hasqspace1 (FsQueue *self)
 Does this queue have room for one more element? More...
 
FSTATIC gboolean _fsqueue_hasqspace (FsQueue *self, guint desired)
 Does this queue have room for 'desired' more elements? More...
 
FSTATIC char * _fsqueue_toString (gconstpointer)
 
WINEXPORT FsQueuefsqueue_new (guint objsize, NetAddr *dest, guint16 qid)
 Construct an FsQueue object - from a (far endpoint address, Queue Id) pair. More...
 

Detailed Description

FrameSet queueing class.

This includes code to implement FrameSet queueing for reliable communication

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