/* udpcs.h */ typedef struct { unsigned int magic; /* Magic # = 0x1a2b3c4d */ unsigned int ptype; /* Packet type */ unsigned int seq; /* Packet seq # */ } apphdr_t; #define PKT_CONN_REQ 101 #define PKT_CONN_ACK 102 #define PKT_CLOSE_REQ 103 #define PKT_CLOSE_ACK 104 #define PKT_DATA 128 /* This is a pure data frame */ #define PKT_DATA_POLL 129 /* Data frame + poll for status */ #define PKT_STAT_RESP 130 /* Status reply to poll */ #define UDPCS_MAGIC 0x1a2b3c4d /* This structure maps a stat response */ typedef struct { apphdr_t apphdr; unsigned int thisseq; /* Seq # of poll frame */ unsigned int drops; /* Total number of dropped packets */ /* since the start of the conn. */ } statresp_t;