|
|
1.1 root 1: /*
2: ** Configuration data required by packet protocol driver
3: */
4:
5: typedef unsigned char uchar;
6:
7: struct Pconfig
8: {
9: int (*xfuncp)(); /* Function to be called for output */
10: int (*rfuncp)(); /* Function to be called for input */
11: void (*rcfuncp)(); /* Function to be called for control input */
12: short xfdesc; /* File descriptor for output */
13: short xtimo; /* Transmit timeout in tscan units */
14: uchar rtimo; /* Receive timeout in tscan units */
15: uchar cdata; /* Control information for reply packet */
16: uchar tscan; /* Timeout scan rate */
17: uchar tflag; /* Timeout running flag */
18: };
19:
20: extern struct Pconfig pconfig;
21:
22: #define MAXTIMORETRYS 1 /* Maximum packets retransmitted per timeout */
23: #define Pscanrate pconfig.tscan
24: #define Prtimeout pconfig.rtimo
25: #define Pxtimeout pconfig.xtimo
26: #define Pxfdesc pconfig.xfdesc
27: #ifndef Blit
28: #define Pxfunc(p, n) (*pconfig.xfuncp)(pconfig.xfdesc, (char *)(p), (n))
29: #else
30: #define Pxfunc(p, n) (*pconfig.xfuncp)((char *)(p), (n))
31: #endif
32: #define Prfuncp pconfig.rfuncp
33: #define Prcfuncp pconfig.rcfuncp
34: #define Pcdata pconfig.cdata
35: #define Ptflag pconfig.tflag
36:
37: /*
38: ** Default timeout settings for 1200 baud
39: */
40:
41: #define PSCANRATE 1 /* Scan once a second */
42: #define PRTIMEOUT 2 /* Packet should complete arrival in less than 1 second */
43: #define PXTIMEOUT 9 /* Time to transmit 16 full sized packets */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.