struct XUDPHost { int fdAudio; /* File descriptor of UNIX Stream */ int fdVideo; /* File descriptor of UNIX Stream */ int fdControl; /* File descriptor of UNIX Stream */ struct sockaddr_in hostaddr; struct hostent *pHostent; /* hostent structure for client */ };
XUDPHost structure.
struct XUDPPacket { struct XUDPHeader header; /* Header information */ u_short length; /* Length in bytes of payload + header */ Boolean ack; /* Has packet been ACKed? */ u_char payload[MAXPAYLOAD]; /* Duplicates Header with Network byte ordering */ struct XUDPPacket *prev; struct XUDPPacket *next; };
XUDPPacket structure.
struct XUDPHeader { Options options; /* Options field */ u_char cmds; /* Number of commands present at end of */ /* header */ Window window; /* Advertised window size */ Timestamp timestamp; /* Packet timestamp field */ Timestamp tto; /* Time to obsolescence timestamp field */ Sequence sequence; /* Packet in-parcel sequence number */ Sequence parcel; /* Parcel sequence number */ u_short length; /* Length of payload */ };
XUDPHeader structure.
\begin{center} struct XUDPParcel { Sequence parcel; /* Sequence number of parcel */ Options options; /* High-level options field */ Timestamp tto; /* Time to obsolescence timestamp */ /* field */ Timestamp timestamp; /* Parcel creation timestamp */ u_short length; /* Length of data buffer */ char *buffer; /* Pointer to data buffer */ char *pos; /* Current position in buffer */ struct XUDPParcel *prev; struct XUDPParcel *next; };
XUDPParcel structure.
struct XUDPFragParcel { Sequence parcel; /* Sequence number of the parcel */ Options options; /* High-level options field */ Timestamp tto; /* Time to obsolescence timestamp */ /* field */ Timestamp timestamp; /* Parcel creation timestamp */ Sequence end; /* Ending packet number */ Boolean ack; /* Has parcel been ACKed */ struct XUDPPacket *headPacket; /* Beginning of packet list */ struct XUDPFragParcel *prev; struct XUDPFragParcel *next; };
XUDPFragParcel structure.
struct XUDPCmd { u_char cmd; /* Command ID */ char length; /* Length in bytes of argbuffer */ Timestamp timestamp; char *argbuffer; /* Command argument data */ struct XUDPCmd *next; struct XUDPCmd *prev; };
XUDPCmd structure.
struct XUDPCB { int fdCli; /* Socket fd for UDP Client */ struct sockaddr_in hostaddr; /* Address structure for remote */ struct XUDPFragParcel *pAckWaitQueue; /* head of parcels waiting */ /* for ACKS*/ struct XUDPParcel *pOutHead; /* head of outgoing queue */ struct XUDPFragParcel *pRecvWaitQueue; /* head of received parcels */ struct XUDPParcel *pInHead; /* head of assembled parcels */ struct XUDPPacket *pXmitQueue; /* Outgoing packets */ struct XUDPPacket *pRecvQueue; /* Incoming packets */ struct XUDPCmd *pCmdQueue; /* head of queued up commands to be transmitted over the network */ struct XUDPCmd *pCmdInQueue; /* head of incoming commands */ struct XUDPHost *localclient; /* Local application */ struct sockaddr_un addrAudio_un; /* Address structures for */ struct sockaddr_un addrVideo_un; /* UNIX streams used */ struct sockaddr_un addrControl_un; enum XUDPState state; /* State of the XUDP */ /* connection */ Boolean push; /* XUDP PUSH flag */ u_short mps; /* Current MPS */ Window winAdvertised; /* Local advertised window */ Window winCongestion; /* Local congestion window */ float winFCongestion; /* Floating point version of */ /* congestion window */ Window winRemote; /* Remote advertised window */ Window packetsInPipe; /* Packets in network from us */ Window packetsInPipeRmt; /* Packets in network from */ /* them, we perceive */ Timestamp rtt; /* Current Round Trip Time */ float rttavg; /* Average RTT */ float rttvar; /* Current RTT Variance */ float rttmax; /* Decaying Max RTT */ float rttmin; /* Decaying Min RTT */ Timestamp rto; /* Current Retransmission */ /* Time Out Timer */ unsigned long int bytesSent; /* Bytes sent during this */ /* session */ unsigned long int bytesACKed; /* Bytes ACKed during this */ /* session */ Timestamp timeElapsed; /* Elapsed time for this */ /* session */ unsigned int bandwidth; /* Calculated average bandwidth */ /* usage */ float windowdelta; /* Indicates the rate of */ /* change of the congestion */ /* window */ Boolean usedparcels[MAXPARCEL]; /* Keeps track of used */ /* parcel numbers */ Timestamp closing; /* Gets set upon invocation */ /* of XUDP_CLOSE_WAIT state */ };
XUDPCB ``control block'' structure.
struct XUDPSCB { struct sockaddr_in addrServ_in; /* Local UDP Server */ int fdServ; /* Socket fd for UDP Server */ int fdServAudio; /* Socket fd for UNIX Audio */ /* Stream */ int fdServVideo; /* UNIX Video stream */ int fdServControl; /* UNIX Control data stream */ struct sockaddr_un addrServAudio_un; /* UNIX Address structure for the audio stream server */ struct sockaddr_un addrServVideo_un; /* Video stream server */ struct sockaddr_un addrServControl_un; /* Control stream server */ };
XUDPSCB ``server control block'' structure.