1 /*
2  * This makes sure it's included
3  * first in every file
4  */
5 #include "autoconf.h"
6 
7 typedef struct config {
8 	int restart;
9 	int chkpmon;
10 	int chkromsize;
11 	int chkkernsize;
12 	int restore_defaults;
13 	int xmodemload;
14 	char *ttyport;
15 	char *tmpdir;
16 } CONFIG;
17 
18 #define DEBUG 0
19 
20 /* 5s read/write timeout */
21 #define TIMEOUT        5
22 #define UTIMEOUT       100000
23 #define RETRIES        10
24 
25 /* Line control codes */
26 #define SOH            0x01  /* start of header */
27 #define ETX            0x3
28 #define ACK            0x06  /* Acknowledge */
29 #define NAK            0x15  /* Negative acknowledge */
30 #define CAN            0x18  /* Cancel */
31 #define EOT            0x04  /* end of text */
32 #define XM_EOF         0x1a  /* eof */
33 #define DC1            0x11
34 #define NAK            0x15
35 #define DC3            0x13
36 #define XON            DC1
37 #define XOFF           DC3
38 
39 #define BUFSIZE        1024
40 #define SMBUFSIZE      128
41 #define LOGFILE        "./capture.log"
42 #define PORTLOG        1
43 #define NOPORTLOG      0
44 
45 #define MAX_KERNEL_SIZE      0x200000
46 #define MAX_ROMDISK_SIZE     0xB00000
47 #define MAX_DOWNLOAD_SIZE    0x670000
48 
49 #define SPLITFILE_OFFSET     0x500000
50 
51 #define SECTOR_SIZE          0x20000
52 #define SECTOR_ALIGN(x) (x%SECTOR_SIZE) ? (x + (SECTOR_SIZE-(x%SECTOR_SIZE))) : x
53 
54 #define TMPDIR         "/tmp"
55