The Assimilation Project  based on Assimilation version 1.1.7.1474836767
fsprotocol.h File Reference

Implements the FsProtocol object. More...

#include <assimobj.h>
#include <frameset.h>
#include <netaddr.h>
#include <fsqueue.h>
#include <netio.h>
Include dependency graph for fsprotocol.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _FsProtoElem
 Not a full-blown class - just a utility structure. More...
 
struct  _FsProtoElemSearchKey
 It is REQUIRED that these fields are the same as the first two in the FsProtoElem structure. More...
 
struct  _FsProtocol
 This is an FsProtocol class object - implementing a reliable user-level FrameSet class delivery system It is a subclass of the AssimObj class and is managed by our C-Class Management system. More...
 
#define FSPR_INSHUTDOWN(state)   ((state) >= FSPR_SHUT1)
 
#define FSPE_HISTSIZE   8
 
#define DEFAULT_FSP_QID   0
 Default Queue ID. More...
 
#define FSPROTO_WINDOWSIZE   2
 FsProtocol window size. More...
 
#define FSPROTO_REXMITINTERVAL   (2000000)
 FsProtocol rexmit interval in uS = 2 secs. More...
 
#define FSPROTO_ACKTIMEOUTINT   (60*FSPROTO_REXMITINTERVAL)
 ACK timeout interval (2 minutes) More...
 
enum  _FsProtoState {
  FSPR_NONE = 0, FSPR_INIT = 1, FSPR_UP = 2, FSPR_SHUT1 = 3,
  FSPR_SHUT2 = 4, FSPR_SHUT3 = 5, FSPR_INVALID
}
 Note that the startup packet always has packet sequence number 1. More...
 
typedef struct _FsProtocol FsProtocol
 
typedef struct _FsProtoElem FsProtoElem
 
typedef struct _FsProtoElemSearchKey FsProtoElemSearchKey
 
typedef enum _FsProtoState FsProtoState
 
WINEXPORT FsProtocolfsprotocol_new (guint objsize, NetIO *ioobj, guint rexmit_timer_uS)
 Construct an FsProtocol object. More...
 

Detailed Description

Implements the FsProtocol object.

FsProtocol class objects implement a protocol that provides reliable FrameSet class transmission. This sits in the middle of packet transmission and reception.

Incoming packets come into FsQueues, and we make sure we process ACKs, and give them to our clients in sequence number order.

Outgoing packets go out through the FsQueue object, and we schedule retransmissions when ACKs are not forthcoming.

In addition, we manage the initiation and termination of communication to endpoints.

This class is related to FsQueue class and FrameSet class objects.

Author
Copyright © 2012 - Alan Robertson alanr.nosp@m.@uni.nosp@m.x.sh
This file is part of the Assimilation Project. 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 fsprotocol.h.

Macro Definition Documentation

#define FSPE_HISTSIZE   8

Definition at line 71 of file fsprotocol.h.

Referenced by _fsprotocol_fsa_history(), and _fsprotocol_fsa_log_history().

#define FSPR_INSHUTDOWN (   state)    ((state) >= FSPR_SHUT1)

Definition at line 70 of file fsprotocol.h.

Referenced by _fsprotocol_send(), _fsprotocol_send1(), and obey_pingpong().

#define FSPROTO_ACKTIMEOUTINT   (60*FSPROTO_REXMITINTERVAL)

ACK timeout interval (2 minutes)

Definition at line 137 of file fsprotocol.h.

Referenced by fsprotocol_new(), and shutdown_when_outdone().

#define FSPROTO_REXMITINTERVAL   (2000000)

FsProtocol rexmit interval in uS = 2 secs.

Definition at line 136 of file fsprotocol.h.

Referenced by fsprotocol_new().

#define FSPROTO_WINDOWSIZE   2

FsProtocol window size.

Definition at line 135 of file fsprotocol.h.

Referenced by fsprotocol_new().

Typedef Documentation

typedef struct _FsProtoElem FsProtoElem

Definition at line 46 of file fsprotocol.h.

Definition at line 47 of file fsprotocol.h.

Definition at line 48 of file fsprotocol.h.

Enumeration Type Documentation

Note that the startup packet always has packet sequence number 1.

Eventually we need to figure out what we need to do about CMA failover - where the nanoprobes might be in the middle of a connection, and still need to send the packets they have on hand.

Enumerator
FSPR_NONE 

No connection in progress.

FSPR_INIT 

Connection initiated, awaiting first ACK packet from far side.

Unsure if this means we need to send a packet and get an ACK before we come out of this state if the other side initiated the connection. My inclination is to say "not".

FSPR_UP 

Connection fully established - received at least one ACK.

FSPR_SHUT1 

Waiting on CONNSHUT and ACK.

FSPR_SHUT2 

Received a CONNSHUT packet, waiting for output to drain.

FSPR_SHUT3 

Output drained, Waiting for CONNSHUT.

FSPR_INVALID 

End marker - Invalid state.

Definition at line 56 of file fsprotocol.h.