ProSoft Technology MVI69-ADMNET User Manual

Page 61

Advertising
background image

MVI-ADMNET ♦ 'C' Programmable

Understanding the MVI-ADMNET API

'C' Programmable Application Development Module with Ethernet

Developer's Guide

ProSoft Technology, Inc.

Page 61 of 122

February 20, 2013

word flags; // tcp flags word for last packet
sent

word window; // other guy's window
int datalen; // number of bytes of data to send
// must be signed
int unacked; // unacked data

byte cwindow; // Van Jacobson's algorithm
byte wwindow;

word vj_sa; // VJ's alg, standard average
word vj_sd; // VJ's alg, standard deviation
longword vj_last; // last transmit time
word rto;
byte karn_count; // count of packets
byte tos; // priority
// retransmission timeout
procedure
// these are in clock ticks
longword rtt_lasttran; // last transmission time
longword rtt_smooth; // smoothed round trip time
longword rtt_delay; // delay for next transmission
longword rtt_time; // time of next transmission

word mss;
longword inactive_to; // for the inactive flag
int sock_delay;

byte data[tcp_MaxBufSize+1]; // data to send
} tcp_Socket;

typedef struct _udp_socket {
struct _udp_socket *next;
word ip_type; // always set to UDP_PROTO
char *err_msg; // null when all is ok
char *usr_name;
void (*usr_yield)( void );
byte rigid;
byte stress;
word sock_mode; // a logical OR of bits
longword usertimer; // ip_timer_set, ip_timer_timeout
dataHandler_t dataHandler;
eth_address hisethaddr; // peer's ethernet address
longword hisaddr; // peer's internet address
word hisport; // peer's UDP port
longword myaddr;
word myport;
word locflags;

int queuelen;
byte *queue;

int rdatalen; // must be signed
word maxrdatalen;
byte *rdata;

Advertising