-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.h
64 lines (51 loc) · 1.32 KB
/
server.h
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
58
59
60
61
62
63
#define MAXMSG 81920
struct cctpmsg {
long mtype;
unsigned char mtext [MAXMSG];
};
# include <stdio.h>
# include <stdlib.h> /* fuer 'malloc()', 'exit()' */
# include <string.h> /* fuer 'strlen()', 'memset()' */
# include <limits.h>
# include <sys/socket.h>
# include <netinet/in.h>
#include <netdb.h>
# include <arpa/inet.h>
# include <sys/msg.h> /* fuer 'msgrcv()', msgsnd()' */
# include <fcntl.h>
#include <time.h>
#include <sys/types.h>
#include <unistd.h> /* fuer 'getpid()', 'fork()' */
#include <sys/stat.h>
#ifdef hpux
# include <sys/mknod.h>
#endif
# include <sys/ipc.h>
#include <sys/param.h>
#include <sys/types.h>
# include <signal.h>
# include <errno.h>
extern int errno;
#define MAX_SOCKETS 128
#define MASK(f) (1 << (f))
#define NWORDS howmany(MAX_SOCKETS, NFDBITS)
typedef struct gui_tab {
int addr_port;
int server_port;
int ust_port;
int reception_socket;
int active_socket;
int not_alive;
unsigned long inet_addr;
char name[64];
char host[64];
char display[64];
char title[64];
char process[128];
int is_listed;
struct gui_tab *next;
struct gui_tab *prev;
} GUITAB;
extern int read_tab(char *line, GUITAB *guitab);
extern int sgetline (char *fp, char *buf);
extern int tpopen (int port, u_long ip);