root/lang/c/friendsd/friendsd.h @ 32953

Revision 15618, 1.9 kB (checked in by kazuho, 6 years ago)

initial import

Line 
1#define VERSION "ver1.26b11"
2#include "friendsTCPCommands.h"
3#include "tcpcalls.h"
4
5#include <stdio.h>
6#include <stdlib.h>
7#include <ctype.h>
8#include <sys/types.h>
9#include <sys/wait.h>
10#include <sys/param.h>
11#include <signal.h>
12#include <time.h>
13#include <sys/socket.h>
14#include <netinet/in.h>
15#include <netdb.h>
16#include <memory.h>
17#include <sys/stat.h>
18#include <errno.h>
19
20#define DONE (-1)
21#define ERR (-1)
22
23#define SUCCEED (1)
24#define FAIL (0)
25
26#define MAXUSER (3072)
27#define MAXSERVER (512)
28
29#define ERRFILE_PFX "FD"
30
31#define ALIVE_WO_CHILD (120)
32#define WARNING_CONNECTION (32)
33#define MAX_CONNECTION (32)
34
35typedef int flag;
36#define on (1)
37#define off (0)
38
39struct SERVER {
40  char id[ 16 ];
41  char name[ 64 ];
42  int access;
43};
44
45struct USER {
46  char login[ 9 ];
47  char name[ 21 ];
48  char tty[ 4 ];
49  char idle[ 5 ];
50  char when[ 11 ];
51  char where[ 13 ];
52  char server[ 16 ];
53  char dummy[ 5 ];
54};
55
56struct MEM {
57  struct SERVER serverlist[ MAXSERVER ];
58  struct USER userlist[ MAXUSER ];
59  flag ready, debug, dynamic;
60};
61
62extern int MMinitialize( int dProcs, int dThread, int ( *disposeNReqs )() );
63extern int MMterminate( void );
64extern int MMfinger( struct USER *ulist, struct SERVER *svlist, char ( *errsvlist )[ 16 ] );
65extern int disposeNReqs4MMfinger( void );
66extern int friendsManager( int id );
67extern int ischar( int c, char *add, char *sub );
68extern int strshrink( char *str );
69extern int strnshrink( char *str, int maxlen );
70extern int getServer( char *file );
71extern int main( int argc, char **argv );
72extern void termTasks();
73extern int server( int id );
74extern int shmStat( void );
75extern char *shmOpen( int size );
76extern int shmClose( void );
77extern void shmWrite( void );
78extern void shmRead( void );
79extern void shmReset( void );
80extern int getShmVersion( void );
81extern int setShmDebug( int mode );
82extern int getShmDebug( void );
83extern int setShmOwner( int new_id );
84extern int getShmOwner( void );
Note: See TracBrowser for help on using the browser.