MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | // MorgenGrauen MUDlib |
| 2 | // |
| 3 | // udp.h -- Definitionen fuers udp |
| 4 | // |
| 5 | // $Id: udp.h 9503 2016-02-23 18:27:45Z Zesstra $ |
| 6 | |
| 7 | #ifndef _UDP_H |
| 8 | #define _UDP_H |
| 9 | |
| 10 | /* --- User Configuration. --- */ |
| 11 | |
| 12 | #include "/secure/config.h" |
| 13 | #include <driver_info.h> |
| 14 | |
| 15 | #define INETD "/secure/inetd" |
| 16 | #define UDP_CMD_DIR "/secure/udp/" |
| 17 | |
| 18 | #if !defined(__TESTMUD__) && MUDNAME=="MorgenGrauen" |
| 19 | # define HOST_FILE "/etc/INETD_HOSTS" |
| 20 | #else |
| 21 | # define HOST_FILE "/etc/INETD_HOSTS.TESTMUD" |
| 22 | #endif |
| 23 | |
| 24 | #define INETD_LOG_FILE "INETD" |
| 25 | |
| 26 | #define REPLY_TIME_OUT 12 |
| 27 | #define RETRIES 2 |
| 28 | |
| 29 | /* #define LOCAL_NAME SECURITY->get_mud_name() // CD */ |
| 30 | #if (__HOST_NAME__==MUDHOST) |
| 31 | #define LOCAL_NAME MUDNAME |
| 32 | #else |
| 33 | #define LOCAL_NAME "MG-Test-"+__HOST_NAME__ |
| 34 | #endif |
| 35 | |
| 36 | /* #define LOCAL_UDP_PORT SECURITY->do_debug("udp_port"); // CD */ |
| 37 | #define LOCAL_UDP_PORT driver_info(DI_UDP_PORT) |
| 38 | |
| 39 | /* If you are running another intermud system concurrently and there is a |
| 40 | * clash with the udp.h filename, rename the old udp.h file as appropriate |
| 41 | * and include this line. */ |
| 42 | /* #include <cdudp.h> // CD */ |
| 43 | |
| 44 | /* Include these definitions for CD muds. */ |
| 45 | /* #define CDLIB */ |
| 46 | /* #define CD_UDP "/d/Standard/obj/udp" */ |
| 47 | |
| 48 | /* --- End of config. --- */ |
| 49 | |
| 50 | #define INETD_DIAGNOSTICS |
| 51 | |
| 52 | #define INETD_VERSION "0.7a" |
| 53 | |
| 54 | /* --- Standard header macros. --- */ |
| 55 | |
| 56 | #define RECIPIENT "RCPNT" |
| 57 | #define REQUEST "REQ" |
| 58 | #define SENDER "SND" |
| 59 | /* The DATA field should be used to store the main body of any packet. */ |
| 60 | #define DATA "DATA" |
| 61 | |
| 62 | /* These headers are reserved for system use only. */ |
| 63 | #define HOST "HST" |
| 64 | #define ID "ID" |
| 65 | #ifndef NAME |
| 66 | #define NAME "NAME" |
| 67 | #endif |
| 68 | #define PACKET "PKT" |
| 69 | #define UDP_PORT "UDP" |
| 70 | #define SYSTEM "SYS" |
| 71 | |
| 72 | /* Reserved headers for diagnostics. */ |
| 73 | #define PACKET_LOSS "PKT_LOSS" |
| 74 | #define RESPONSE_TIME "TIME" |
| 75 | |
| 76 | /* --- Standard REQUEST macros. --- */ |
| 77 | |
| 78 | #define PING "ping" |
| 79 | #define QUERY "query" |
| 80 | #define REPLY "reply" |
| 81 | |
| 82 | /* --- Standard SYSTEM macros. --- */ |
| 83 | |
| 84 | #define FAILED "F" |
| 85 | #define REPEAT "R" |
| 86 | #define TIME_OUT "TO" |
| 87 | #define UNAVAILABLE "U" |
| 88 | |
| 89 | /* --- Index macros for host arrays. --- */ |
| 90 | |
| 91 | #define HOST_NAME 0 |
| 92 | #define HOST_IP 1 |
| 93 | #define HOST_UDP_PORT 2 |
| 94 | #define LOCAL_COMMANDS 3 |
| 95 | #define HOST_COMMANDS 4 |
| 96 | #define HOST_STATUS 5 |
| 97 | |
| 98 | #endif |