Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / apps / drwho / global.h
blobbfba77f2c68d8eac16992f96a113f4241e5438b2
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file global.h
7 * Here are all the declarations that are needed throughout the program.
9 * @author Douglas C. Schmidt
11 //=============================================================================
14 #ifndef _GLOBAL_H
15 #define _GLOBAL_H
17 #include "ace/config-all.h"
18 #include "ace/Basic_Types.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 // These constants are used throughout drwho.
26 enum
28 MAXUSERIDNAMELEN = 8,
29 MAX_USER_TIMEOUT = 300,
30 MAX_HOST_TIMEOUT = 300,
31 UDP_PACKET_SIZE = 1024 * 8,
32 PORT_NUMBER = 12344
35 // Default name of file where friends info is stored.
36 #define FRIEND_FILE ".friends.dta"
38 // Default name where rwho info is stored.
39 #define RWHODIR "/usr/spool/rwho"
41 // Macros for handling message types.
42 #define GET_PACKET_TYPE(P) (ACE_NTOHS (*((short *) P)))
43 #define SET_PACKET_TYPE(P,T) ((*(short *) P) = ACE_NTOHS (T))
44 #define SKIP_PACKET_TYPE(P) ((P) + sizeof (short))
45 #define SUBTRACT_PACKET_TYPE(L) ((L) - sizeof (short))
47 #endif /* _GLOBAL_H */