-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrpcdefs.h
More file actions
38 lines (32 loc) · 820 Bytes
/
rpcdefs.h
File metadata and controls
38 lines (32 loc) · 820 Bytes
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
// rpcdefs.h
// Andrew Mauragis
// Due 4/25/13
//
// Provides opcode defines, error definitions, and struct typedefs
// to allow for cleaner code.
#ifndef RPCDEFS_H
#define RPCDEFS_H
// Opcodes for RPCS
#define OPCODE_OPEN 1
#define OPCODE_CLOSE 2
#define OPCODE_READ 3
#define OPCODE_WRITE 4
#define OPCODE_SEEK 5
// Error definitions
#define SOCKET_ERROR -2
#define BIND_ERROR -3
#define LISTEN_ERROR -4
#define ACCEPT_ERROR -5
#define FORKING_ERROR -6
#define READ_ERROR -7
#define CONNECTION_ERROR -8
#define MALLOC_ERROR -9
#define WRITE_ERROR -10
#define ARGS_ERROR -11
#define GETHOST_ERROR -12
#define OPEN_ERROR -13
#define STAT_ERROR -14
#define CLOSE_ERROR -15
typedef struct sockaddr_in sockaddr_in_t;
typedef struct sockaddr sockaddr_t;
#endif