File: postal.h

package info (click to toggle)
postal 0.62.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 476 kB
  • ctags: 445
  • sloc: cpp: 2,902; sh: 289; ansic: 258; makefile: 86
file content (57 lines) | stat: -rw-r--r-- 1,051 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef POSTAL_H
#define POSTAL_H

typedef enum
{
  eWONT,
  eMUST,
  eNONE
} TRISTATE;

#define VER_STR "0.62"
#define USE_SSL
#define LINUX_PTHREAD


#if 0
#define false 0
#define true 1
#endif

#include <stdio.h>

#define MAX_PROCESSES 200
#define MAX_MSG_SIZE 40960
// The amount of time between updates to the shared memory region for random
// data.
#define RAND_TIME 5
// The allowable amount of time for results to lag behind the actions that
// generated them.  Should be a small fraction of a minute.  The smaller it
// is the more IPC there is.
#define RESULTS_LAG 5
#define MAX_BYTES_UNREPORTED 40960
#define SEM_KEY 4710

#define CHECK_PERCENT(XX) ((XX) == 100 || rand() % 100 < (XX))

typedef const char * PCCHAR;
typedef char * PCHAR;
typedef PCHAR const CPCHAR;
typedef PCCHAR const CPCCHAR;
typedef void * PVOID;
typedef PVOID const CPVOID;
typedef const CPVOID CPCVOID;

typedef enum
{
  eParam = 1,
  eSystem = 2,
  eCtrl_C = 5,
  eNoError = 0,
  eSocket = -1,
  eCorrupt = -2,
  eTimeout = -3,
  eServer = -4
} ERROR_TYPE;

#endif