/* LarkNet.h
   L. Stewart October 20, 1982  10:06 PM
   L. Stewart November 11, 1982  12:10 PM, IOutN added
   L. Stewart January 14, 1983  4:01 PM, Lark.mesa revisions
   L. Stewart March 16, 1983  10:25 AM, new voice protocol
   LCS April 18, 1983  10:10 AM, Lark and LarkSmarts changes
   LCS April 30, 1983  10:37 AM, stuff moved to Lark.h
   LCS June 5, 1983  5:39 PM, LarkFirstVoiceType
   LCS June 13, 1983  4:35 PM, EchoSupression
   LCS July 15, 1983  3:42 PM, SetHostNumber
 */

/* packet types */
#define BluejayVoiceType 250
#define ProbeReplyType 251
#define LarkVoiceType 254
#define LarkFirstVoiceType 252

/* audio modes */

#define	AMOff	0
#define	AMEcho	1
#define	AMTone	2
#define	AMNet	3

/* These indices must match the Mesa files */

/* RPC Procedure indices, Lark interface */
#define iReset			4
#define iGenerateTones		5
#define iFeep			6
#define iCommands		7
#define iConnect 		8
#define iDisconnect 		9
#define iPleaseRegister		10
#define iWhatIsStatus		11
#define iWhatAreConnections	12
#define iWhatAreTones 		13
#define iSetKeyTable 		14
#define iCommandString 		15
#define iPleaseLogin 		16
#define iEchoSupression 		17
#define iSetHostNumber 		18

/* RPC Procedure indices, LarkSmarts interface */
#define iRegister		4
#define iRecordEvent		5
#define iEventRope		6
#define iLogin		7

/* data structures relevanbt to rpc */

struct Model {
  char hardwareVersion;	/* Swabbed from Mesa version, since */
  char genre;  /*  marshaller will re-Swab */
  int softwareVersion;
  };

#define lenModel (sizeof (struct Model)/2)

/* a command event */
struct Event {
  char device;
  char event;
  };

/* command event sequence */
struct EvSeq {
  int length;
  struct Event evs[2];
  };

/* connection specifications */
struct CSpecs {
  int proto;
  int sampleRate;
  int pktSize;
  int buffer;
  int keyIndex;
  int lsoc[3];
  int rsoc[3];
  };

/* buffer indices */
#define	IIn1	0
#define	IIn2	1
#define	IOut1	2
#define	IOut2	3
#define	IOut3	4

struct SEvent {
  int time;
  char device;
  char event;
  };

struct SEvents {
  int procType;
  int smartsLo;
  int smartsHi;
  int isNil;
  int lenLo;
  int lenHi;
  int length;
  struct SEvent eventseq[16];
  };

struct SEventCB {
  struct SEventCB *next;
  int time;
  char device;
  char event;
  };