The Assimilation Project  based on Assimilation version 1.1.7.1474836767
fsqueue.h
Go to the documentation of this file.
1 
28 #ifndef _FSQUEUE_H
29 #define _FSQUEUE_H
30 #include <assimobj.h>
31 #include <frameset.h>
32 #include <seqnoframe.h>
33 #include <netaddr.h>
34 
37 typedef struct _FsQueue FsQueue;
38 
45 struct _FsQueue {
47  guint64 _nextseqno;
48  guint32 _sessionid;
49  guint _maxqlen;
50  GQueue* _q;
52  guint16 _qid;
53  gboolean isready;
54  gboolean (*enq)(FsQueue* self, FrameSet* fs);
55  gboolean (*inqsorted)(FsQueue*, FrameSet* fs);
59  FrameSet* (*qhead)(FsQueue* self);
63  FrameSet* (*deq)(FsQueue* self);
64  gint (*ackthrough)(FsQueue* self, SeqnoFrame*);
65  void (*flush)(FsQueue* self);
67  void (*flush1)(FsQueue* self);
68  guint (*qlen)(FsQueue* self);
69  void (*setmaxqlen)(FsQueue* self, guint max);
70  guint (*getmaxqlen)(FsQueue* self);
71  gboolean (*hasqspace1)(FsQueue* self);
72  gboolean (*hasqspace)(FsQueue* self, guint);
73 };
74 WINEXPORT FsQueue* fsqueue_new(guint objsize, NetAddr* dest, guint16 qid);
75 #define DEFAULT_FSQMAX 32
76 
77 
79 #endif /* _FSQUEUE_H */
NetAddr * _destaddr
Far endpoint address.
Definition: fsqueue.h:51
guint _maxqlen
Maximum queue length.
Definition: fsqueue.h:49
Implements minimal client-oriented Frame and Frameset capabilities.
gboolean(* hasqspace)(FsQueue *self, guint)
TRUE if space for desired packets available.
Definition: fsqueue.h:72
guint(* qlen)(FsQueue *self)
return current queue length
Definition: fsqueue.h:68
void(* flush)(FsQueue *self)
flush all FrameSet in the queue
Definition: fsqueue.h:66
#define WINEXPORT
Definition: projectcommon.h:45
GQueue * _q
FrameSet class queue
Definition: fsqueue.h:50
This file defines our base object class: AssimObj.
gboolean(* hasqspace1)(FsQueue *self)
TRUE if space for one more FrameSet.
Definition: fsqueue.h:71
gboolean isready
TRUE when ready for I or O (depending)
Definition: fsqueue.h:53
gint(* ackthrough)(FsQueue *self, SeqnoFrame *)
ACK packets through given seqno.
Definition: fsqueue.h:64
This is an FsQueue class object - designed for queueuing up FrameSet class objects for transmission...
Definition: fsqueue.h:45
AssimObj baseclass
base AssimObj class object
Definition: fsqueue.h:46
void(* setmaxqlen)(FsQueue *self, guint max)
set maximum queue length
Definition: fsqueue.h:69
void(* flush1)(FsQueue *self)
flush head FrameSet in the queue
Definition: fsqueue.h:67
guint64 _nextseqno
Next sequence number.
Definition: fsqueue.h:47
WINEXPORT FsQueue * fsqueue_new(guint objsize, NetAddr *dest, guint16 qid)
Construct an FsQueue object - from a (far endpoint address, Queue Id) pair.
Definition: fsqueue.c:347
gboolean(* inqsorted)(FsQueue *, FrameSet *fs)
Enqueue an incoming FrameSet - sorted by sequence # - no dups allowed Used ONLY for input queues...
Definition: fsqueue.h:58
guint(* getmaxqlen)(FsQueue *self)
return max q length
Definition: fsqueue.h:70
The NetAddr class class represents a general network address - whether IP, MAC, or any other type of ...
Definition: netaddr.h:43
Defines interfaces for the NetAddr (network address) object.
guint32 _sessionid
Current session id for this Queue.
Definition: fsqueue.h:48
guint16 _qid
Far endpoint queue id.
Definition: fsqueue.h:52
FrameSet class - used for collecting Frames when not on the wire, and for marshalling/demarshalling t...
Definition: frameset.h:46
Implements the SeqnoFrame class.
This is an SeqnoFrame class TLV (type, length, value) frame.
Definition: seqnoframe.h:43
gboolean(* enq)(FsQueue *self, FrameSet *fs)
Enqueue an outgoing FrameSet - adding seqno ONLY for output queues.
Definition: fsqueue.h:54