mirror of
git://git.psyced.org/git/psyclpc
synced 2024-08-15 03:20:16 +00:00
initial git creation
This commit is contained in:
commit
2ede0de60e
278 changed files with 230984 additions and 0 deletions
11
mudlib/sys/comm.h
Normal file
11
mudlib/sys/comm.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef LPC_COMM_H_
|
||||
#define LPC_COMM_H_
|
||||
|
||||
/* Mode values recognized by the efun get_combine_charset()
|
||||
* and get_connection_charset() */
|
||||
|
||||
#define CHARSET_VECTOR 0 /* Return the charset as bitvector array */
|
||||
#define CHARSET_STRING 1 /* Return the charset as string */
|
||||
#define CHARSET_QUOTE_IAC 2 /* Return the status of the IAC quoting */
|
||||
|
||||
#endif /* LPC_COMM_H_ */
|
50
mudlib/sys/commands.h
Normal file
50
mudlib/sys/commands.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
#ifndef LPC_COMMANDS_H_
|
||||
#define LPC_COMMANDS_H_
|
||||
|
||||
/* Flags accepted by add_action(fun, verb, flag).
|
||||
* (Below, VERB is what the player enters).
|
||||
* Negative flag values allow VERB to be just the first -<flag>
|
||||
* characters of <verb> (abbreviated verb).
|
||||
*/
|
||||
|
||||
#define AA_VERB 0 /* VERB must be <verb> */
|
||||
#define AA_SHORT 1 /* VERB must start with <verb>,
|
||||
* args do not include extra characters */
|
||||
#define AA_NOSPACE 2 /* VERB must start with <verb>,
|
||||
* args and verb do include extra characters */
|
||||
#define AA_IMM_ARGS 3 /* VERB must start with <verb>,
|
||||
* args do include extra characters */
|
||||
|
||||
/* Bitflags accepted by query_actions(object ob, int mask)
|
||||
*/
|
||||
|
||||
#define QA_VERB 1
|
||||
#define QA_TYPE 2
|
||||
#define QA_SHORT_VERB 4
|
||||
#define QA_OBJECT 8
|
||||
#define QA_FUNCTION 16
|
||||
|
||||
|
||||
/* Indices in the arrays returned from command_stack()
|
||||
*/
|
||||
|
||||
#define CMD_VERB 0
|
||||
#define CMD_TEXT 1
|
||||
#define CMD_ORIGIN 2
|
||||
#define CMD_PLAYER 3
|
||||
#define CMD_FAIL 4
|
||||
#define CMD_FAILOBJ 5
|
||||
|
||||
#define CMD_SIZE 6
|
||||
|
||||
|
||||
/* Indices into the subarrays returned from match_command()
|
||||
*/
|
||||
#define CMDM_VERB 0
|
||||
#define CMDM_ARG 1
|
||||
#define CMDM_OBJECT 2
|
||||
#define CMDM_FUN 3
|
||||
|
||||
#define CMDM_SIZE 4
|
||||
|
||||
#endif /* LPC_COMMANDS_H_ */
|
240
mudlib/sys/debug_info.h
Normal file
240
mudlib/sys/debug_info.h
Normal file
|
@ -0,0 +1,240 @@
|
|||
#ifndef LPC_DEBUG_INFO_H_
|
||||
#define LPC_DEBUG_INFO_H_ 1
|
||||
|
||||
/* Request values for efun debug_info().
|
||||
*/
|
||||
|
||||
#define DINFO_OBJECT 0 /* Print information about an object */
|
||||
#define DINFO_MEMORY 1 /* Print memory usage of an object */
|
||||
#define DINFO_OBJLIST 2 /* Return an object from the global list */
|
||||
#define DINFO_MALLOC 3 /* Print the information from the 'malloc' cmd */
|
||||
#define DINFO_STATUS 4 /* Return the 'status' information */
|
||||
#define DINFO_DUMP 5 /* Dump some special information into files */
|
||||
#define DINFO_DATA 6 /* Return internal information */
|
||||
#define DINFO_TRACE 7 /* Return the current call trace */
|
||||
|
||||
/* Sub-request values for debug_info(DINFO_DATA) */
|
||||
|
||||
#define DID_STATUS 0 /* Return the 'status' and 'status tables' information */
|
||||
#define DID_SWAP 1 /* Return the 'status swap' information */
|
||||
#define DID_MEMORY 2 /* Return the 'status malloc' information */
|
||||
|
||||
/* Sub-request values for debug_info(DINFO_TRACE) */
|
||||
|
||||
#define DIT_CURRENT 0 /* Return the current call chain as an array */
|
||||
#define DIT_ERROR 1 /* Return the last error call chain as an array */
|
||||
#define DIT_UNCAUGHT_ERROR 2 /* Return the last uncaught error call chain */
|
||||
#define DIT_STR_CURRENT 3 /* Return the current call chain as a string */
|
||||
|
||||
/* Indices into the array resulting from debug_info(DINFO_DATA, DID_STATUS)
|
||||
*/
|
||||
|
||||
#define DID_ST_ACTIONS 0
|
||||
#define DID_ST_ACTIONS_SIZE 1
|
||||
#define DID_ST_SHADOWS 2
|
||||
#define DID_ST_SHADOWS_SIZE 3
|
||||
|
||||
#define DID_ST_OBJECTS 4
|
||||
#define DID_ST_OBJECTS_SIZE 5
|
||||
#define DID_ST_OBJECTS_SWAPPED 6
|
||||
#define DID_ST_OBJECTS_SWAP_SIZE 7
|
||||
#define DID_ST_OBJECTS_LIST 8
|
||||
#define DID_ST_OBJECTS_NEWLY_DEST 9
|
||||
#define DID_ST_OBJECTS_DESTRUCTED 10
|
||||
#define DID_ST_OBJECTS_PROCESSED 11
|
||||
#define DID_ST_OBJECTS_AVG_PROC 12
|
||||
|
||||
#define DID_ST_OTABLE 13
|
||||
#define DID_ST_OTABLE_SLOTS 14
|
||||
#define DID_ST_OTABLE_SIZE 15
|
||||
|
||||
#define DID_ST_HBEAT_OBJS 16
|
||||
#define DID_ST_HBEAT_CALLS 17
|
||||
#define DID_ST_HBEAT_CALLS_TOTAL 18
|
||||
#define DID_ST_HBEAT_SLOTS 19
|
||||
#define DID_ST_HBEAT_SIZE 20
|
||||
#define DID_ST_HBEAT_PROCESSED 21
|
||||
#define DID_ST_HBEAT_AVG_PROC 22
|
||||
|
||||
#define DID_ST_CALLOUTS 23
|
||||
#define DID_ST_CALLOUT_SIZE 24
|
||||
|
||||
#define DID_ST_ARRAYS 25
|
||||
#define DID_ST_ARRAYS_SIZE 26
|
||||
|
||||
#define DID_ST_MAPPINGS 27
|
||||
#define DID_ST_MAPPINGS_SIZE 28
|
||||
#define DID_ST_HYBRID_MAPPINGS 51
|
||||
#define DID_ST_HASH_MAPPINGS 54
|
||||
|
||||
#define DID_ST_STRUCTS 29
|
||||
#define DID_ST_STRUCTS_SIZE 30
|
||||
#define DID_ST_STRUCT_TYPES 31
|
||||
#define DID_ST_STRUCT_TYPES_SIZE 32
|
||||
|
||||
#define DID_ST_PROGS 33
|
||||
#define DID_ST_PROGS_SIZE 34
|
||||
|
||||
#define DID_ST_PROGS_SWAPPED 35
|
||||
#define DID_ST_PROGS_SWAP_SIZE 36
|
||||
|
||||
#define DID_ST_USER_RESERVE 37
|
||||
#define DID_ST_MASTER_RESERVE 38
|
||||
#define DID_ST_SYSTEM_RESERVE 39
|
||||
|
||||
#define DID_ST_ADD_MESSAGE 40
|
||||
#define DID_ST_PACKETS 41
|
||||
#define DID_ST_PACKET_SIZE 42
|
||||
#define DID_ST_PACKETS_IN 43
|
||||
#define DID_ST_PACKET_SIZE_IN 44
|
||||
|
||||
#define DID_ST_APPLY 45
|
||||
#define DID_ST_APPLY_HITS 46
|
||||
|
||||
#define DID_ST_STRINGS 47
|
||||
#define DID_ST_STRING_SIZE 48
|
||||
#define DID_ST_STR_TABLE_SIZE 49
|
||||
#define DID_ST_STR_OVERHEAD 50
|
||||
#define DID_ST_UNTABLED 52
|
||||
#define DID_ST_UNTABLED_SIZE 53
|
||||
#define DID_ST_UNUSED54 54 /* UNUSED */
|
||||
#define DID_ST_UNUSED55 55 /* UNUSED */
|
||||
#define DID_ST_TABLED 56
|
||||
#define DID_ST_TABLED_SIZE 57
|
||||
#define DID_ST_STR_SEARCHES 58
|
||||
#define DID_ST_STR_SEARCHLEN 59
|
||||
#define DID_ST_STR_SEARCHES_BYVALUE 60
|
||||
#define DID_ST_STR_SEARCHLEN_BYVALUE 61
|
||||
#define DID_ST_STR_CHAINS 62
|
||||
#define DID_ST_STR_ADDED 63
|
||||
#define DID_ST_STR_DELETED 64
|
||||
#define DID_ST_STR_COLLISIONS 65
|
||||
#define DID_ST_STR_FOUND 66
|
||||
#define DID_ST_STR_FOUND_BYVALUE 67
|
||||
|
||||
#define DID_ST_RX_CACHED 68
|
||||
#define DID_ST_RX_TABLE 69
|
||||
#define DID_ST_RX_TABLE_SIZE 70
|
||||
#define DID_ST_RX_REQUESTS 71
|
||||
#define DID_ST_RX_REQ_FOUND 72
|
||||
#define DID_ST_RX_REQ_COLL 73
|
||||
|
||||
#define DID_ST_MB_FILE 74
|
||||
#define DID_ST_MB_SWAP 75
|
||||
|
||||
#define DID_ST_BOOT_TIME 76
|
||||
|
||||
#define DID_STATUS_MAX 77 /* Total number of entries */
|
||||
|
||||
|
||||
/* Indices into the array resulting from debug_info(DINFO_DATA, DID_SWAP)
|
||||
*/
|
||||
|
||||
#define DID_SW_PROGS 0
|
||||
#define DID_SW_PROG_SIZE 1
|
||||
#define DID_SW_PROG_UNSWAPPED 2
|
||||
#define DID_SW_PROG_U_SIZE 3
|
||||
#define DID_SW_VARS 4
|
||||
#define DID_SW_VAR_SIZE 5
|
||||
#define DID_SW_FREE 6
|
||||
#define DID_SW_FREE_SIZE 7
|
||||
#define DID_SW_FILE_SIZE 8
|
||||
#define DID_SW_REUSED 9
|
||||
#define DID_SW_SEARCHES 10
|
||||
#define DID_SW_SEARCH_LEN 11
|
||||
#define DID_SW_F_SEARCHES 12
|
||||
#define DID_SW_F_SEARCH_LEN 13
|
||||
#define DID_SW_COMPACT 14
|
||||
#define DID_SW_RECYCLE_FREE 15
|
||||
|
||||
#define DID_SWAP_MAX 16
|
||||
|
||||
|
||||
/* Indices into the array resulting from debug_info(DINFO_DATA, DID_MEMORY)
|
||||
*/
|
||||
|
||||
#define DID_MEM_NAME 0
|
||||
#define DID_MEM_SBRK 1
|
||||
#define DID_MEM_SBRK_SIZE 2
|
||||
#define DID_MEM_LARGE 3
|
||||
#define DID_MEM_LARGE_SIZE 4
|
||||
#define DID_MEM_MMAP (DID_MEM_LARGE)
|
||||
#define DID_MEM_MMAP_SIZE (DID_MEM_LARGE_SIZE)
|
||||
#define DID_MEM_LFREE 5
|
||||
#define DID_MEM_FREE_CHUNKS (DID_MEM_LFREE)
|
||||
#define DID_MEM_LFREE_SIZE 6
|
||||
#define DID_MEM_LWASTED 7
|
||||
#define DID_MEM_LWASTED_SIZE 8
|
||||
#define DID_MEM_KEEP_COST (DID_MEM_LWASTED_SIZE)
|
||||
#define DID_MEM_CHUNK 9
|
||||
#define DID_MEM_CHUNK_SIZE 10
|
||||
#define DID_MEM_SLAB (DID_MEM_CHUNK)
|
||||
#define DID_MEM_SLAB_SIZE (DID_MEM_CHUNK_SIZE)
|
||||
#define DID_MEM_MAX_ALLOCATED (DID_MEM_CHUNK_SIZE)
|
||||
#define DID_MEM_SMALL 11
|
||||
#define DID_MEM_SMALL_SIZE 12
|
||||
#define DID_MEM_SFREE 13
|
||||
#define DID_MEM_SFREE_SIZE 14
|
||||
#define DID_MEM_FFREE (DID_MEM_SFREE)
|
||||
#define DID_MEM_FFREE_SIZE (DID_MEM_SFREE_SIZE)
|
||||
#define DID_MEM_SWASTED 15
|
||||
#define DID_MEM_SWASTED_SIZE 16
|
||||
#define DID_MEM_SMALL_OVERHEAD_SIZE (DID_MEM_SWASTED_SIZE)
|
||||
#define DID_MEM_MINC_CALLS 17
|
||||
#define DID_MEM_MINC_SUCCESS 19
|
||||
#define DID_MEM_MINC_SIZE 19
|
||||
#define DID_MEM_PERM 20
|
||||
#define DID_MEM_PERM_SIZE 21
|
||||
#define DID_MEM_CLIB 22
|
||||
#define DID_MEM_CLIB_SIZE 23
|
||||
#define DID_MEM_OVERHEAD 24
|
||||
#define DID_MEM_ALLOCATED 25
|
||||
#define DID_MEM_USED 26
|
||||
#define DID_MEM_TOTAL_UNUSED 27
|
||||
#define DID_MEM_DEFRAG_CALLS 28
|
||||
#define DID_MEM_DEFRAG_CALLS_REQ 29
|
||||
#define DID_MEM_SLAB_FREE (DID_MEM_DEFRAG_CALLS)
|
||||
#define DID_MEM_SLAB_FREE_SIZE (DID_MEM_DEFRAG_CALLS_REQ)
|
||||
#define DID_MEM_DEFRAG_REQ_SUCCESS 30
|
||||
#define DID_MEM_DEFRAG_BLOCKS_INSPECTED 31
|
||||
#define DID_MEM_DEFRAG_BLOCKS_MERGED 32
|
||||
#define DID_MEM_DEFRAG_BLOCKS_RESULT 33
|
||||
#define DID_MEM_AVL_NODES 34
|
||||
#define DID_MEM_EXT_STATISTICS 35
|
||||
|
||||
#define DID_MEMORY_MAX 36
|
||||
|
||||
/* Indices into the subarrays of DID_MEM_EXT_STATISTICS (if given) */
|
||||
|
||||
#define DID_MEM_ES_MAX_ALLOC 0
|
||||
#define DID_MEM_ES_CUR_ALLOC 1
|
||||
#define DID_MEM_ES_MAX_FREE 2
|
||||
#define DID_MEM_ES_CUR_FREE 3
|
||||
#define DID_MEM_ES_AVG_XALLOC 4
|
||||
#define DID_MEM_ES_AVG_XFREE 5
|
||||
#define DID_MEM_ES_FULL_SLABS 6
|
||||
#define DID_MEM_ES_FREE_SLABS 7
|
||||
#define DID_MEM_ES_TOTAL_SLABS 8
|
||||
|
||||
#define DID_MEM_ES_MAX 9
|
||||
|
||||
/* Indices into the subarrays resulting from debug_info(DINFO_TRACE, 0)
|
||||
*/
|
||||
|
||||
#define TRACE_TYPE 0
|
||||
#define TRACE_NAME 1
|
||||
#define TRACE_PROGRAM 2
|
||||
#define TRACE_OBJECT 3
|
||||
#define TRACE_LOC 4
|
||||
|
||||
#define TRACE_MAX 5
|
||||
|
||||
/* Values for entry TRACE_TYPE */
|
||||
|
||||
#define TRACE_TYPE_SYMBOL 0
|
||||
#define TRACE_TYPE_SEFUN 1
|
||||
#define TRACE_TYPE_EFUN 2
|
||||
#define TRACE_TYPE_LAMBDA 3
|
||||
#define TRACE_TYPE_LFUN 4
|
||||
|
||||
#endif /* LPC_DEBUG_INFO_H_ */
|
18
mudlib/sys/debug_message.h
Normal file
18
mudlib/sys/debug_message.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef LPC_DEBUG_MESSAGE_H_
|
||||
#define LPC_DEBUG_MESSAGE_H_ 1
|
||||
|
||||
/* Definitions and macros for the debug_message() */
|
||||
|
||||
#define DMSG_DEFAULT 0 /* log to stdout and .debug.log */
|
||||
#define DMSG_STDOUT (1 << 0) /* log to stdout */
|
||||
#define DMSG_STDERR (1 << 1) /* log to stderr */
|
||||
#define DMSG_LOGFILE (1 << 2) /* log to .debug.log */
|
||||
|
||||
#define DMSG_STAMP (1 << 3) /* Prepend the timestamp */
|
||||
|
||||
/* Derived macros */
|
||||
|
||||
#define DMSG_TARGET (DMSG_STDOUT|DMSG_STDERR|DMSG_LOGFILE)
|
||||
/* Mask for all target bitflags */
|
||||
|
||||
#endif /* LPC_DEBUG_MESSAGE_H_ */
|
35
mudlib/sys/driver_hook.h
Normal file
35
mudlib/sys/driver_hook.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
#ifndef LPC_DRIVER_HOOK_H_
|
||||
#define LPC_DRIVER_HOOK_H_ 1
|
||||
|
||||
/* --- Driver Hooks ---
|
||||
*/
|
||||
|
||||
#define H_MOVE_OBJECT0 0
|
||||
#define H_MOVE_OBJECT1 1
|
||||
#define H_LOAD_UIDS 2
|
||||
#define H_CLONE_UIDS 3
|
||||
#define H_CREATE_SUPER 4
|
||||
#define H_CREATE_OB 5
|
||||
#define H_CREATE_CLONE 6
|
||||
#define H_RESET 7
|
||||
#define H_CLEAN_UP 8
|
||||
#define H_MODIFY_COMMAND 9
|
||||
#define H_NOTIFY_FAIL 10
|
||||
#define H_NO_IPC_SLOT 11
|
||||
#define H_INCLUDE_DIRS 12
|
||||
#define H_TELNET_NEG 13
|
||||
#define H_NOECHO 14
|
||||
#define H_ERQ_STOP 15
|
||||
#define H_MODIFY_COMMAND_FNAME 16
|
||||
#define H_COMMAND 17
|
||||
#define H_SEND_NOTIFY_FAIL 18
|
||||
#define H_AUTO_INCLUDE 19
|
||||
#define H_DEFAULT_METHOD 20
|
||||
#define H_DEFAULT_PROMPT 21
|
||||
#define H_PRINT_PROMPT 22
|
||||
#define H_REGEXP_PACKAGE 23
|
||||
|
||||
#define NUM_DRIVER_HOOKS 24 /* Number of hooks */
|
||||
|
||||
#endif /* LPC_DRIVER_HOOK_ */
|
||||
|
59
mudlib/sys/erq.h
Normal file
59
mudlib/sys/erq.h
Normal file
|
@ -0,0 +1,59 @@
|
|||
/* external request demon interface definitions */
|
||||
|
||||
#ifndef LPC__ERQ_H__
|
||||
#define LPC__ERQ_H__ 1
|
||||
|
||||
/* servive request types */
|
||||
|
||||
#define ERQ_RLOOKUP 0 /* Lookup ip -> name */
|
||||
#define ERQ_EXECUTE 1 /* Execute a program */
|
||||
#define ERQ_FORK 2 /* Fork a program */
|
||||
#define ERQ_AUTH 3 /* Connect to a remote authd */
|
||||
#define ERQ_SPAWN 4 /* Spawn a program */
|
||||
#define ERQ_SEND 5 /* Send data to a program or connection */
|
||||
#define ERQ_KILL 6 /* Kill a program or connection */
|
||||
#define ERQ_OPEN_UDP 7 /* Open a UDP socket */
|
||||
#define ERQ_OPEN_TCP 8 /* Open a TCP connection */
|
||||
#define ERQ_LISTEN 9 /* Open a TCP accept-socket */
|
||||
#define ERQ_ACCEPT 10 /* Accept a connection from a accept-socket */
|
||||
#define ERQ_LOOKUP 11 /* Lookup name -> ip */
|
||||
|
||||
#ifdef __IPV6__
|
||||
#define ERQ_RLOOKUPV6 12 /* Lookup name/ip6 */
|
||||
#endif
|
||||
|
||||
/* Additional service request type flags evaluated by efun send_erq().
|
||||
* The ERQ itself won't get to see it.
|
||||
*/
|
||||
|
||||
#define ERQ_CB_STRING (1 << 31) /* Callback closure takes a string arg */
|
||||
|
||||
|
||||
/* answers from ERQ_EXECUTE / ERQ_FORK */
|
||||
|
||||
#define ERQ_OK 0
|
||||
#define ERQ_SIGNALED 1
|
||||
#define ERQ_E_NOTFOUND 2 /* process not found by wait */
|
||||
#define ERQ_E_UNKNOWN 3 /* unknown exit condition from wait() */
|
||||
#define ERQ_E_ARGLENGTH 4
|
||||
#define ERQ_E_ARGFORMAT 5
|
||||
#define ERQ_E_ARGNUMBER 6
|
||||
#define ERQ_E_ILLEGAL 7
|
||||
#define ERQ_E_PATHLEN 8
|
||||
#define ERQ_E_FORKFAIL 9
|
||||
#define ERQ_E_TICKET 11
|
||||
#define ERQ_E_INCOMPLETE 12
|
||||
#define ERQ_E_WOULDBLOCK 13
|
||||
#define ERQ_E_PIPE 14
|
||||
#define ERQ_STDOUT 15 /* Normal data received */
|
||||
#define ERQ_STDERR 16
|
||||
#define ERQ_EXITED 17 /* Connection closed on EOF */
|
||||
#define ERQ_E_NSLOTS 18
|
||||
|
||||
/* reserved handles */
|
||||
|
||||
#define ERQ_HANDLE_RLOOKUP (-1)
|
||||
#define ERQ_HANDLE_KEEP_HANDLE (-2)
|
||||
#define ERQ_HANDLE_RLOOKUPV6 (-3)
|
||||
|
||||
#endif /* LPC__ERQ_H__ */
|
29
mudlib/sys/files.h
Normal file
29
mudlib/sys/files.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#ifndef LPC_FILES_H_
|
||||
#define LPC_FILES_H_ 1
|
||||
|
||||
/* Definitions and macros for the various file efuns */
|
||||
|
||||
/* Special return values of file_size() and the size part of get_dir().
|
||||
*/
|
||||
|
||||
#define FSIZE_NOFILE -1 /* File doesn't exist or is not readable */
|
||||
#define FSIZE_DIR -2 /* The file is actually a directory */
|
||||
|
||||
|
||||
/* Flag values for get_dir().
|
||||
*/
|
||||
|
||||
#define GETDIR_EMPTY (0) /* return an empty array (not very useful) */
|
||||
#define GETDIR_NAMES (0x01) /* return the filenames */
|
||||
#define GETDIR_SIZES (0x02) /* return the file sizes */
|
||||
#define GETDIR_DATES (0x04) /* return the dates of last modification */
|
||||
/* (0x08) unused */
|
||||
#define GETDIR_ACCESS (0x40) /* return the dates of last access */
|
||||
#define GETDIR_MODES (0x80) /* return the file mode */
|
||||
|
||||
#define GETDIR_PATH (0x10) /* with _NAMES: add the path to the filenames */
|
||||
#define GETDIR_UNSORTED (0x20) /* return the results unsorted */
|
||||
|
||||
#define GETDIR_ALL (0xDF) /* return all */
|
||||
|
||||
#endif /* LPC_FILES_H_ */
|
69
mudlib/sys/functionlist.h
Normal file
69
mudlib/sys/functionlist.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
#ifndef LPC_FUNCTIONLIST_H
|
||||
#define LPC_FUNCTIONLIST_H
|
||||
|
||||
#ifndef __DRIVER_SOURCE__
|
||||
#include "lpctypes.h"
|
||||
|
||||
#define NAME_INHERITED 0x80000000 /* Defined by inheritance */
|
||||
#define TYPE_MOD_STATIC 0x40000000 /* Static function or variable */
|
||||
#define TYPE_MOD_NO_MASK 0x20000000 /* The nomask => not redefineable */
|
||||
#define TYPE_MOD_PRIVATE 0x10000000 /* Can't be inherited */
|
||||
#define TYPE_MOD_PUBLIC 0x08000000 /* Force inherit through private */
|
||||
#define TYPE_MOD_VARARGS 0x04000000 /* Used for type checking */
|
||||
#define TYPE_MOD_VIRTUAL 0x02000000 /* can be re- and cross- defined */
|
||||
#define TYPE_MOD_PROTECTED 0x01000000 /* cannot be called externally */
|
||||
#define TYPE_MOD_XVARARGS 0x00800000 /* accepts optional arguments */
|
||||
#define TYPE_MOD_NOSAVE TYPE_MOD_STATIC /* vars: can't be saved */
|
||||
/* Internally TYPE_MOD_NOSAVE is 0x00400000, but that never leaves
|
||||
* the compiler.
|
||||
*/
|
||||
#define NAME_CROSS_DEFINED 0x00080000 /* function defined from other program */
|
||||
#if defined(__LPC_STRUCTS__) || defined(USE_STRUCTS)
|
||||
#define NAME_HIDDEN 0x00020000 /* Not visible for inheritance */
|
||||
#define NAME_PROTOTYPE 0x00010000 /* Defined by a prototype only */
|
||||
#define NAME_UNDEFINED 0x00008000 /* Not defined yet */
|
||||
#define NAME_TYPES_LOST 0x00004000 /* inherited, no save_types */
|
||||
#else /* !USE_STRUCTS */
|
||||
#define NAME_HIDDEN 0x00000800 /* Not visible for inheritance */
|
||||
#define NAME_PROTOTYPE 0x00000400 /* Defined by a prototype only */
|
||||
#define NAME_UNDEFINED 0x00000200 /* Not defined yet */
|
||||
#define NAME_TYPES_LOST 0x00000100 /* inherited, no save_types */
|
||||
#endif /* USE_STRUCTS */
|
||||
|
||||
#endif /* !__DRIVER_SOURCE__ */
|
||||
|
||||
|
||||
/* Return value flag types for functionlist() and variable_list() */
|
||||
|
||||
#define RETURN_FUNCTION_NAME 0x01
|
||||
#define RETURN_FUNCTION_FLAGS 0x02
|
||||
#define RETURN_FUNCTION_TYPE 0x04
|
||||
|
||||
|
||||
/* Additional return value flag types for functionlist() */
|
||||
|
||||
#define RETURN_FUNCTION_NUMARG 0x08
|
||||
#define RETURN_FUNCTION_ARGTYPE 0x10 /* not implemented */
|
||||
|
||||
|
||||
/* Additional return value flag types for variable_list() */
|
||||
|
||||
#define RETURN_VARIABLE_VALUE 0x08
|
||||
|
||||
|
||||
/* Masks of the flag unions allowed for various efuns: */
|
||||
#define RETURN_FUNCTION_MASK 0x0f /* functionlist() */
|
||||
#define RETURN_VARIABLE_MASK 0x0f /* variable_list() */
|
||||
|
||||
/* Return value flag types for function_exists() */
|
||||
|
||||
#define FEXISTS_PROGNAME (0)
|
||||
#define FEXISTS_FILENAME (1)
|
||||
#define FEXISTS_LINENO (2)
|
||||
#define FEXISTS_NUMARG (3)
|
||||
#define FEXISTS_TYPE (4)
|
||||
#define FEXISTS_FLAGS (5)
|
||||
|
||||
#define FEXISTS_ALL (3)
|
||||
|
||||
#endif /* LPC_FUNCTIONLIST_H */
|
26
mudlib/sys/idn.h
Normal file
26
mudlib/sys/idn.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
#ifndef LPC_IDN_H_
|
||||
#define LPC_IDN_H_ 1
|
||||
|
||||
/* --- IDNA Constants ---
|
||||
*/
|
||||
|
||||
/* idna_stringprep() profiles. */
|
||||
|
||||
#define STRINGPREP_NAMEPREP 1
|
||||
#define STRINGPREP_SASLPREP 2
|
||||
#define STRINGPREP_PLAIN 3
|
||||
#define STRINGPREP_TRACE 4
|
||||
#define STRINGPREP_KERBEROS5 5
|
||||
#define STRINGPREP_XMPP_NODEPREP 6
|
||||
#define STRINGPREP_XMPP_RESOURCEPREP 7
|
||||
#define STRINGPREP_ISCSI 8
|
||||
|
||||
/* idna_stringprep() flags */
|
||||
|
||||
#define STRINGPREP_NO_NFKC_FLAG (1<<0)
|
||||
#define STRINGPREP_NO_BIDI_FLAG (1<<1)
|
||||
#define STRINGPREP_NO_UNASSIGNED_FLAG (1<<2)
|
||||
|
||||
#define STRINGPREP_FLAG_MAX (1<<2)
|
||||
|
||||
#endif
|
9
mudlib/sys/include_list.h
Normal file
9
mudlib/sys/include_list.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef LPC_INCLUDE_LIST_H
|
||||
#define LPC_INCLUDE_LIST_H
|
||||
|
||||
/* Return value flag types for include_list() */
|
||||
|
||||
#define INCLIST_FLAT 0x00
|
||||
#define INCLIST_TREE 0x01
|
||||
|
||||
#endif /* LPC_INCLUDE_LIST_H */
|
10
mudlib/sys/inherit_list.h
Normal file
10
mudlib/sys/inherit_list.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef LPC_INHERIT_LIST_H
|
||||
#define LPC_INHERIT_LIST_H
|
||||
|
||||
/* Return value flag types for inherit_list() */
|
||||
|
||||
#define INHLIST_FLAT 0x00
|
||||
#define INHLIST_TREE 0x01
|
||||
#define INHLIST_TAG_VIRTUAL 0x02
|
||||
|
||||
#endif /* LPC_INHERIT_LIST_H */
|
18
mudlib/sys/input_to.h
Normal file
18
mudlib/sys/input_to.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef LPC_INPUT_TO_H_
|
||||
#define LPC_INPUT_TO_H_
|
||||
|
||||
/* Mode values recognized by the efun input_to() */
|
||||
|
||||
#define INPUT_NOECHO 1 /* Don't echo the next line typed */
|
||||
#define INPUT_CHARMODE 2 /* Switch into/out of charmode */
|
||||
#define INPUT_PROMPT 4 /* Use a custom prompt */
|
||||
#define INPUT_NO_TELNET 8 /* Switch into/out of charmode on the driver
|
||||
* side only.
|
||||
*/
|
||||
#define INPUT_APPEND 16 /* Append the input_to to the list of already
|
||||
* pending input_to's.
|
||||
*/
|
||||
/* #define INPUT_BINARY 32 -- nice, but noone has coded it */
|
||||
#define INPUT_IGNORE_BANG 128 /* Disallow the '!' escape */
|
||||
|
||||
#endif /* LPC_INPUT_TO_H_ */
|
68
mudlib/sys/lpctypes.h
Normal file
68
mudlib/sys/lpctypes.h
Normal file
|
@ -0,0 +1,68 @@
|
|||
#ifndef LPC_LPCTYPES_H
|
||||
#define LPC_LPCTYPES_H
|
||||
|
||||
/* compile time types, from functionlist() */
|
||||
|
||||
#define TYPE_UNKNOWN 0 /* This type must be casted */
|
||||
#define TYPE_NUMBER 1
|
||||
#define TYPE_STRING 2
|
||||
#define TYPE_VOID 3
|
||||
#define TYPE_OBJECT 4
|
||||
#define TYPE_MAPPING 5
|
||||
#define TYPE_FLOAT 6
|
||||
#define TYPE_ANY 7 /* Will match any type */
|
||||
#define TYPE_CLOSURE 8
|
||||
#define TYPE_SYMBOL 9
|
||||
#define TYPE_QUOTED_ARRAY 10
|
||||
#if defined(USE_STRUCTS) || defined(__LPC_STRUCTS__)
|
||||
#define TYPE_STRUCT 11
|
||||
#endif
|
||||
|
||||
#define TYPE_MOD_POINTER 0x0040 /* Pointer to a basic type */
|
||||
|
||||
/* runtime types, from typeof() */
|
||||
|
||||
#define T_INVALID 0x0
|
||||
#define T_LVALUE 0x1
|
||||
#define T_NUMBER 0x2
|
||||
#define T_STRING 0x3
|
||||
#define T_POINTER 0x4
|
||||
#define T_OBJECT 0x5
|
||||
#define T_MAPPING 0x6
|
||||
#define T_FLOAT 0x7
|
||||
#define T_CLOSURE 0x8
|
||||
#define T_SYMBOL 0x9
|
||||
#define T_QUOTED_ARRAY 0xa
|
||||
#if defined(USE_STRUCTS) || defined(__LPC_STRUCTS__)
|
||||
#define T_STRUCT 0xb
|
||||
#endif
|
||||
|
||||
/* Closure types, stored as secondary type info */
|
||||
|
||||
#ifndef __DRIVER_SOURCE__
|
||||
|
||||
#define CLOSURE_LFUN 0 /* lfun in an object */
|
||||
/* Code 1: currently unused, used to be CLOSURE_ALIEN_LFUN */
|
||||
#define CLOSURE_IDENTIFIER 2 /* variable in this object */
|
||||
#define CLOSURE_PRELIMINARY 3
|
||||
/* Efun closure used in a static initialization */
|
||||
#define CLOSURE_BOUND_LAMBDA 4 /* Bound unbound-lambda closure */
|
||||
#define CLOSURE_LAMBDA 5 /* normal lambda closure */
|
||||
#define CLOSURE_UNBOUND_LAMBDA 6 /* unbound lambda closure. */
|
||||
|
||||
#define CLOSURE_OPERATOR (0xe800)
|
||||
#define CLOSURE_EFUN (0xf000)
|
||||
#define CLOSURE_SIMUL_EFUN (0xf800)
|
||||
|
||||
#define CLOSURE_IS_LFUN(x) (((x)&~1) == 0)
|
||||
#define CLOSURE_IS_IDENTIFIER(x) ((x) == CLOSURE_IDENTIFIER)
|
||||
#define CLOSURE_IS_BOUND_LAMBDA(x) ((x) == CLOSURE_BOUND_LAMBDA)
|
||||
#define CLOSURE_IS_LAMBDA(x) ((x) == CLOSURE_LAMBDA)
|
||||
#define CLOSURE_IS_UNBOUND_LAMBDA(x) ((x) == CLOSURE_UNBOUND_LAMBDA)
|
||||
#define CLOSURE_IS_SIMUL_EFUN(x) (((x) & 0xf800) == CLOSURE_SIMUL_EFUN)
|
||||
#define CLOSURE_IS_EFUN(x) (((x) & 0xf800) == CLOSURE_EFUN)
|
||||
#define CLOSURE_IS_OPERATOR(x) (((x) & 0xf800) == CLOSURE_OPERATOR)
|
||||
|
||||
#endif /* __DRIVER_SOURCE__ */
|
||||
|
||||
#endif /* LPC_LPCTYPES_H */
|
83
mudlib/sys/objectinfo.h
Normal file
83
mudlib/sys/objectinfo.h
Normal file
|
@ -0,0 +1,83 @@
|
|||
#ifndef LPC_OBJECTINFO_H_
|
||||
#define LPC_OBJECTINFO_H_
|
||||
|
||||
/* Definition of argument values for object_info() and
|
||||
* of the indices in the corresponding result arrays.
|
||||
*/
|
||||
|
||||
/* Possible types of information requested from object_info()
|
||||
*/
|
||||
#define OINFO_BASIC 0
|
||||
#define OINFO_POSITION 1
|
||||
#define OINFO_MEMORY 2
|
||||
|
||||
|
||||
/* Indices in the array resulting from OINFO_BASIC
|
||||
*/
|
||||
|
||||
#define OIB_HEART_BEAT 0
|
||||
#define OIB_IS_WIZARD 1
|
||||
#define OIB_ENABLE_COMMANDS 2
|
||||
#define OIB_CLONE 3
|
||||
#define OIB_DESTRUCTED 4
|
||||
#define OIB_SWAPPED 5
|
||||
#define OIB_ONCE_INTERACTIVE 6
|
||||
#define OIB_RESET_STATE 7
|
||||
#define OIB_WILL_CLEAN_UP 8
|
||||
#define OIB_LAMBDA_REFERENCED 9
|
||||
#define OIB_SHADOW 10
|
||||
#define OIB_REPLACED 11
|
||||
#define OIB_TOTAL_LIGHT 12
|
||||
#define OIB_NEXT_RESET 13
|
||||
#define OIB_TIME_OF_REF 14
|
||||
#define OIB_REF 15
|
||||
#define OIB_GIGATICKS 16
|
||||
#define OIB_TICKS 17
|
||||
#define OIB_SWAP_NUM 18
|
||||
#define OIB_PROG_SWAPPED 19
|
||||
#define OIB_VAR_SWAPPED 20
|
||||
#define OIB_NAME 21
|
||||
#define OIB_LOAD_NAME 22
|
||||
#define OIB_NEXT_ALL 23
|
||||
#define OIB_PREV_ALL 24
|
||||
#define OIB_NEXT_CLEANUP 25
|
||||
|
||||
#define OIB_MAX 26 /* Number of OIB_ result elements */
|
||||
|
||||
|
||||
/* Indices in the array resulting from OINFO_POSITION
|
||||
*/
|
||||
#define OIP_NEXT 0
|
||||
#define OIP_PREV 1
|
||||
#define OIP_POS 2
|
||||
|
||||
#define OIP_MAX 3 /* Number of OIP_ result elements */
|
||||
|
||||
|
||||
/* Indices in the array resulting from OINFO_MEMORY
|
||||
*/
|
||||
#define OIM_REF 0
|
||||
#define OIM_NAME 1
|
||||
#define OIM_PROG_SIZE 2
|
||||
#define OIM_NUM_FUNCTIONS 3
|
||||
#define OIM_SIZE_FUNCTIONS 4
|
||||
#define OIM_NUM_VARIABLES 5
|
||||
#define OIM_SIZE_VARIABLES 6
|
||||
#define OIM_NUM_STRINGS 7
|
||||
#define OIM_SIZE_STRINGS 8
|
||||
#define OIM_SIZE_STRINGS_DATA 9
|
||||
#define OIM_SIZE_STRINGS_TOTAL 10
|
||||
#define OIM_NUM_INHERITED 11
|
||||
#define OIM_SIZE_INHERITED 12
|
||||
#define OIM_TOTAL_SIZE 13
|
||||
#define OIM_DATA_SIZE 14
|
||||
#define OIM_TOTAL_DATA_SIZE 15
|
||||
#define OIM_NO_INHERIT 16
|
||||
#define OIM_NO_CLONE 17
|
||||
#define OIM_NO_SHADOW 18
|
||||
#define OIM_NUM_INCLUDES 19
|
||||
#define OIM_SHARE_VARIABLES 20
|
||||
|
||||
#define OIM_MAX 21 /* Number of OIM_ result elements */
|
||||
|
||||
#endif /* LPC_OBJECTINFO_H_ */
|
23
mudlib/sys/pgsql.h
Normal file
23
mudlib/sys/pgsql.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef _PGSQL_H
|
||||
#define _PGSQL_H
|
||||
|
||||
/* Definitions for the PostgreSQL efuns */
|
||||
|
||||
#define PGRES_EMPTY_QUERY 0 /* Unimplemented */
|
||||
#define PGRES_COMMAND_OK 1
|
||||
#define PGRES_TUPLES_OK 2
|
||||
#define PGRES_COPY_OUT 3 /* Unimplemented */
|
||||
#define PGRES_COPY_IN 4 /* Unimplemented */
|
||||
#define PGRES_BAD_RESPONSE 5
|
||||
#define PGRES_NONFATAL_ERROR 6
|
||||
#define PGRES_FATAL_ERROR 7
|
||||
#define PGRES_NOTICE 99
|
||||
|
||||
#define PGCONN_SUCCESS 100
|
||||
#define PGCONN_FAILED 101
|
||||
#define PGCONN_ABORTED 102
|
||||
|
||||
#define PG_RESULT_ARRAY 0
|
||||
#define PG_RESULT_MAP 1
|
||||
|
||||
#endif
|
43
mudlib/sys/regexp.h
Normal file
43
mudlib/sys/regexp.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
#ifndef LPC_REGEXP_H_
|
||||
#define LPC_REGEXP_H_ 1
|
||||
|
||||
/* Definitions of regexp option values */
|
||||
|
||||
/* Not really an RE option, but used in conjunction with some RE functions: */
|
||||
|
||||
#define RE_GLOBAL 0x0001 /* Apply RE globally (if possible) */
|
||||
|
||||
/* Options supported by the old regexp package: */
|
||||
|
||||
#define RE_EXCOMPATIBLE 0x0002 /* RE is compatible with ex */
|
||||
|
||||
/* Options supported by the PCRE regexp package: */
|
||||
|
||||
#define RE_CASELESS 0x0004
|
||||
#define RE_MULTILINE 0x0008
|
||||
#define RE_DOTALL 0x0010
|
||||
#define RE_EXTENDED 0x0020
|
||||
#define RE_ANCHORED 0x0040
|
||||
#define RE_DOLLAR_ENDONLY 0x0080
|
||||
#define RE_NOTBOL 0x0100
|
||||
#define RE_NOTEOL 0x0200
|
||||
#define RE_UNGREEDY 0x0400
|
||||
#define RE_NOTEMPTY 0x0800
|
||||
#define RE_UTF8 0x1000
|
||||
|
||||
/* Options specific for regmatch(): */
|
||||
|
||||
#define RE_MATCH_SUBS 0x00100000 /* Return matched subexpressions */
|
||||
|
||||
/* Options specific for regexplode(): */
|
||||
|
||||
#define RE_OMIT_DELIM 0x00100000 /* Omit the delimiters */
|
||||
|
||||
/* Regexp package selection options: */
|
||||
|
||||
#define RE_TRADITIONAL 0x04000000
|
||||
#define RE_PCRE 0x02000000
|
||||
|
||||
#define RE_PACKAGE_MASK (RE_TRADITIONAL | RE_PCRE)
|
||||
|
||||
#endif /* LPC_REGEXP_H_ */
|
24
mudlib/sys/rtlimits.h
Normal file
24
mudlib/sys/rtlimits.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#ifndef LPC_RTLIMITS_H_
|
||||
#define LPC_RTLIMITS_H_
|
||||
|
||||
/* Runtime limit index/tag values */
|
||||
|
||||
#define LIMIT_EVAL (0)
|
||||
#define LIMIT_ARRAY (1)
|
||||
#define LIMIT_MAPPING (2)
|
||||
#define LIMIT_MAPPING_KEYS LIMIT_MAPPING
|
||||
#define LIMIT_MAPPING_SIZE (3)
|
||||
#define LIMIT_BYTE (4)
|
||||
#define LIMIT_FILE (5)
|
||||
#define LIMIT_CALLOUTS (6)
|
||||
#define LIMIT_COST (7)
|
||||
|
||||
#define LIMIT_MAX (8) /* Number of recognized limits */
|
||||
|
||||
/* Special limit values */
|
||||
|
||||
#define LIMIT_UNLIMITED 0 /* No limit */
|
||||
#define LIMIT_KEEP (-1) /* Keep the old limit setting */
|
||||
#define LIMIT_DEFAULT (-2) /* Use the default setting */
|
||||
|
||||
#endif /* LPC_RTLIMITS_H_ */
|
10
mudlib/sys/sent.h
Normal file
10
mudlib/sys/sent.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef LPC_SENT_H_
|
||||
#define LPC_SENT_H_
|
||||
|
||||
#define SENT_PLAIN 0
|
||||
#define SENT_SHORT_VERB 1
|
||||
#define SENT_NO_SPACE 2
|
||||
#define SENT_NO_VERB 3
|
||||
#define SENT_MARKER 4
|
||||
|
||||
#endif
|
10
mudlib/sys/strings.h
Normal file
10
mudlib/sys/strings.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef LPC_STRINGS_H_
|
||||
#define LPC_STRINGS_H_ 1
|
||||
|
||||
/* 'where' argument values for trim() */
|
||||
|
||||
#define TRIM_LEFT 0x01
|
||||
#define TRIM_RIGHT 0x02
|
||||
#define TRIM_BOTH (TRIM_LEFT|TRIM_RIGHT)
|
||||
|
||||
#endif /* LPC_STRINGS_H_ */
|
38
mudlib/sys/struct_info.h
Normal file
38
mudlib/sys/struct_info.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
#ifndef LPC_STRUCTINFO_H_
|
||||
#define LPC_STRUCTINFO_H_
|
||||
|
||||
#ifndef __DRIVER_SOURCE__
|
||||
#include "lpctypes.h"
|
||||
#endif
|
||||
|
||||
/* Definition of argument values for struct_info() and
|
||||
* of the indices in the corresponding result arrays.
|
||||
*/
|
||||
|
||||
/* Possible types of information requested from struct_info()
|
||||
*/
|
||||
#define SINFO_FLAT 0
|
||||
#define SINFO_NESTED 1
|
||||
|
||||
|
||||
/* Indices in the result array
|
||||
*/
|
||||
|
||||
#define SI_NAME 0
|
||||
#define SI_PROG_NAME 1
|
||||
#define SI_PROG_ID 2
|
||||
#define SI_BASE 3
|
||||
#define SI_MEMBER 4
|
||||
|
||||
#define SI_MAX 5 /* Min Number of SI_ result elements */
|
||||
|
||||
/* Indices in the SI_MEMBER arrays
|
||||
*/
|
||||
|
||||
#define SIM_NAME 0
|
||||
#define SIM_TYPE 1
|
||||
#define SIM_EXTRA 2
|
||||
|
||||
#define SIM_MAX 3 /* Number of SIM_ elements */
|
||||
|
||||
#endif /* LPC_STRUCTINFO_H_ */
|
217
mudlib/sys/telnet.h
Normal file
217
mudlib/sys/telnet.h
Normal file
|
@ -0,0 +1,217 @@
|
|||
#ifndef TELNET_H__
|
||||
#define TELNET_H__ 1
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted
|
||||
* provided that the above copyright notice and this paragraph are
|
||||
* duplicated in all such forms and that any documentation,
|
||||
* advertising materials, and other materials related to such
|
||||
* distribution and use acknowledge that the software was developed
|
||||
* by the University of California, Berkeley. The name of the
|
||||
* University may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* @(#)telnet.h 5.7 (Berkeley) 11/14/89
|
||||
*/
|
||||
|
||||
/*
|
||||
* Definitions for the TELNET protocol.
|
||||
*/
|
||||
#define IAC 255 /* interpret as command: */
|
||||
#define DONT 254 /* you are not to use option */
|
||||
#define DO 253 /* please, you use option */
|
||||
#define WONT 252 /* I won't use option */
|
||||
#define WILL 251 /* I will use option */
|
||||
#define SB 250 /* interpret as subnegotiation */
|
||||
#define GA 249 /* you may reverse the line */
|
||||
#define EL 248 /* erase the current line */
|
||||
#define EC 247 /* erase the current character */
|
||||
#define AYT 246 /* are you there */
|
||||
#define AO 245 /* abort output--but let prog finish */
|
||||
#define IP 244 /* interrupt process--permanently */
|
||||
#define BREAK 243 /* break */
|
||||
#define DM 242 /* data mark--for connect. cleaning */
|
||||
#define NOP 241 /* nop */
|
||||
#define SE 240 /* end sub negotiation */
|
||||
#define EOR 239 /* end of record (transparent mode) */
|
||||
#define ABORT 238 /* Abort process */
|
||||
#define SUSP 237 /* Suspend process */
|
||||
#define xEOF 236 /* End of file: EOF is already used... */
|
||||
|
||||
#define SYNCH 242 /* for telfunc calls */
|
||||
|
||||
#ifdef __DRIVER_SOURCE__
|
||||
|
||||
#ifdef TELCMDS
|
||||
char *telcmds[] = {
|
||||
"EOF", "SUSP", "ABORT", "EOR",
|
||||
"SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
|
||||
"EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC",
|
||||
};
|
||||
#define TELCMD_FIRST xEOF
|
||||
#define TELCMD_LAST IAC
|
||||
#define TELCMD_OK(x) ((x) <= TELCMD_LAST && (x) >= TELCMD_FIRST)
|
||||
#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
|
||||
#endif
|
||||
|
||||
#endif /* __DRIVER_SOURCE__ */
|
||||
|
||||
/* telnet options */
|
||||
#define TELOPT_BINARY 0 /* 8-bit data path */
|
||||
#define TELOPT_ECHO 1 /* echo */
|
||||
#define TELOPT_RCP 2 /* prepare to reconnect */
|
||||
#define TELOPT_SGA 3 /* suppress go ahead */
|
||||
#define TELOPT_NAMS 4 /* approximate message size */
|
||||
#define TELOPT_STATUS 5 /* give status */
|
||||
#define TELOPT_TM 6 /* timing mark */
|
||||
#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
|
||||
#define TELOPT_NAOL 8 /* negotiate about output line width */
|
||||
#define TELOPT_NAOP 9 /* negotiate about output page size */
|
||||
#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
|
||||
#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
|
||||
#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
|
||||
#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
|
||||
#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
|
||||
#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
|
||||
#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
|
||||
#define TELOPT_XASCII 17 /* extended ascic character set */
|
||||
#define TELOPT_LOGOUT 18 /* force logout */
|
||||
#define TELOPT_BM 19 /* byte macro */
|
||||
#define TELOPT_DET 20 /* data entry terminal */
|
||||
#define TELOPT_SUPDUP 21 /* supdup protocol */
|
||||
#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
|
||||
#define TELOPT_SNDLOC 23 /* send location */
|
||||
#define TELOPT_TTYPE 24 /* terminal type */
|
||||
#define TELOPT_EOR 25 /* end or record */
|
||||
#define TELOPT_TUID 26 /* TACACS user identification */
|
||||
#define TELOPT_OUTMRK 27 /* output marking */
|
||||
#define TELOPT_TTYLOC 28 /* terminal location number */
|
||||
#define TELOPT_3270REGIME 29 /* 3270 regime */
|
||||
#define TELOPT_X3PAD 30 /* X.3 PAD */
|
||||
#define TELOPT_NAWS 31 /* window size */
|
||||
#define TELOPT_TSPEED 32 /* terminal speed */
|
||||
#define TELOPT_LFLOW 33 /* remote flow control */
|
||||
#define TELOPT_LINEMODE 34 /* Linemode option */
|
||||
#define TELOPT_XDISPLOC 35 /* X Display Location */
|
||||
#define TELOPT_ENVIRON 36 /* Environment opt for Port ID */
|
||||
#define TELOPT_AUTHENTICATION 37 /* authentication */
|
||||
#define TELOPT_ENCRYPT 38 /* authentication */
|
||||
#define TELOPT_NEWENV 39 /* Environment opt for Port ID */
|
||||
#define TELOPT_STARTTLS 46 /* Transport Layer Security */
|
||||
|
||||
/* Inofficial, mud specific telnet options */
|
||||
#define TELOPT_COMPRESS 85 /* Mud Compression Protocol, v.1 */
|
||||
#define TELOPT_COMPRESS2 86 /* Mud Compression Protocol, v.2 */
|
||||
#define TELOPT_MSP 90 /* Mud Sound Protocol */
|
||||
#define TELOPT_MXP 91 /* Mud Extension Protocol */
|
||||
#define TELOPT_EXOPL 255 /* extended-options-list */
|
||||
|
||||
#define NTELOPTS 256 /* was: (1+TELOPT_NEWENV) */
|
||||
|
||||
#ifdef __DRIVER_SOURCE__
|
||||
|
||||
#ifdef TELOPTS
|
||||
char *telopts[NTELOPTS]
|
||||
= { "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD"
|
||||
, "NAME", "STATUS", "TIMING MARK", "RCTE"
|
||||
, "NAOL", "NAOP", "NAOCRD", "NAOHTS"
|
||||
, "NAOHTD", "NAOFFD", "NAOVTS", "NAOVTD"
|
||||
, "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO"
|
||||
, "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT", "SEND LOCATION"
|
||||
, "TERMINAL TYPE", "END OF RECORD", "TACACS UID", "OUTPUT MARKING"
|
||||
, "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS"
|
||||
, "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC"
|
||||
, "ENVIRON", "AUTH", "ENCRYPT", "NEWENV"
|
||||
, "TELOPT 40", "TELOPT 41", "TELOPT 42", "TELOPT 43"
|
||||
, "TELOPT 44", "TELOPT 45", "STARTTLS", "TELOPT 47"
|
||||
, "TELOPT 48", "TELOPT 49", "TELOPT 50", "TELOPT 51"
|
||||
, "TELOPT 52", "TELOPT 53", "TELOPT 54", "TELOPT 55"
|
||||
, "TELOPT 56", "TELOPT 57", "TELOPT 58", "TELOPT 59"
|
||||
, "TELOPT 60", "TELOPT 61", "TELOPT 62", "TELOPT 63"
|
||||
, "TELOPT 64", "TELOPT 65", "TELOPT 66", "TELOPT 67"
|
||||
, "TELOPT 68", "TELOPT 69", "TELOPT 70", "TELOPT 71"
|
||||
, "TELOPT 72", "TELOPT 73", "TELOPT 74", "TELOPT 75"
|
||||
, "TELOPT 76", "TELOPT 77", "TELOPT 78", "TELOPT 79"
|
||||
, "TELOPT 80", "TELOPT 81", "TELOPT 82", "TELOPT 83"
|
||||
, "TELOPT 84", "MUD COMPRESS", "MUD COMPRESS2", "TELOPT 87"
|
||||
, "TELOPT 88", "TELOPT 89", "MUD SOUND", "MUD EXTENSION"
|
||||
};
|
||||
#define TELOPT_FIRST TELOPT_BINARY
|
||||
#define TELOPT_LAST TELOPT_MXP
|
||||
#define TELOPT_OK(x) ((x) <= TELOPT_LAST && (x) >= TELOPT_FIRST)
|
||||
#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
|
||||
#endif
|
||||
|
||||
#endif /* __DRIVER_SOURCE__ */
|
||||
|
||||
/* sub-option qualifiers */
|
||||
#define TELQUAL_IS 0 /* option is... */
|
||||
#define TELQUAL_SEND 1 /* send option */
|
||||
|
||||
/*
|
||||
* LINEMODE suboptions
|
||||
*/
|
||||
|
||||
#define LM_MODE 1
|
||||
#define LM_FORWARDMASK 2
|
||||
#define LM_SLC 3
|
||||
|
||||
#define MODE_EDIT 0x01
|
||||
#define MODE_TRAPSIG 0x02
|
||||
#define MODE_ACK 0x04
|
||||
|
||||
#define MODE_MASK (MODE_EDIT|MODE_TRAPSIG|MODE_ACK)
|
||||
|
||||
/* Not part of protocol, but needed to simplify things... */
|
||||
#define MODE_FLOW 0x0100
|
||||
#define MODE_ECHO 0x0200
|
||||
#define MODE_INBIN 0x0400
|
||||
#define MODE_OUTBIN 0x0800
|
||||
#define MODE_FORCE 0x1000
|
||||
|
||||
#define SLC_SYNCH 1
|
||||
#define SLC_BRK 2
|
||||
#define SLC_IP 3
|
||||
#define SLC_AO 4
|
||||
#define SLC_AYT 5
|
||||
#define SLC_EOR 6
|
||||
#define SLC_ABORT 7
|
||||
#define SLC_EOF 8
|
||||
#define SLC_SUSP 9
|
||||
#define SLC_EC 10
|
||||
#define SLC_EL 11
|
||||
#define SLC_EW 12
|
||||
#define SLC_RP 13
|
||||
#define SLC_LNEXT 14
|
||||
#define SLC_XON 15
|
||||
#define SLC_XOFF 16
|
||||
#define SLC_FORW1 17
|
||||
#define SLC_FORW2 18
|
||||
|
||||
#define NSLC 18
|
||||
|
||||
#define SLC_NAMES "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
|
||||
"ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
|
||||
"LNEXT", "XON", "XOFF", "FORW1", "FORW2"
|
||||
|
||||
#define SLC_NOSUPPORT 0
|
||||
#define SLC_CANTCHANGE 1
|
||||
#define SLC_VARIABLE 2
|
||||
#define SLC_DEFAULT 3
|
||||
#define SLC_LEVELBITS 0x03
|
||||
|
||||
#define SLC_FUNC 0
|
||||
#define SLC_FLAGS 1
|
||||
#define SLC_VALUE 2
|
||||
|
||||
#define SLC_ACK 0x80
|
||||
#define SLC_FLUSHIN 0x40
|
||||
#define SLC_FLUSHOUT 0x20
|
||||
|
||||
#endif /* TELNET_H__ */
|
18
mudlib/sys/time.h
Normal file
18
mudlib/sys/time.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef LPC_TIME_H_
|
||||
#define LPC_TIME_H_ 1
|
||||
|
||||
/* Indices into the array returned from gmtime() and localtime(). */
|
||||
|
||||
#define TM_SEC 0 /* Seconds (0..59) */
|
||||
#define TM_MIN 1 /* Minutes (0..59) */
|
||||
#define TM_HOUR 2 /* Hours (0..23) */
|
||||
#define TM_MDAY 3 /* Day of the month (1..31) */
|
||||
#define TM_MON 4 /* Month of the year (0..11) */
|
||||
#define TM_YEAR 5 /* Year (e.g. 2001) */
|
||||
#define TM_WDAY 6 /* Day of the week (Sunday = 0) */
|
||||
#define TM_YDAY 7 /* Day of the year (0..365) */
|
||||
#define TM_ISDST 8 /* TRUE: Daylight saving time */
|
||||
|
||||
#define TM_MAX 9 /* Number of entries in the array */
|
||||
|
||||
#endif /* LPC_TIME_H_ */
|
87
mudlib/sys/tls.h
Normal file
87
mudlib/sys/tls.h
Normal file
|
@ -0,0 +1,87 @@
|
|||
#ifndef LPC_TLS_H
|
||||
#define LPC_TLS_H
|
||||
|
||||
/* Field indices for the result of tls_query_connection_info() */
|
||||
|
||||
#define TLS_CIPHER 0
|
||||
#define TLS_COMP 1
|
||||
#define TLS_KX 2
|
||||
#define TLS_MAC 3
|
||||
#define TLS_PROT 4
|
||||
#define TLS_SESSION 5
|
||||
|
||||
#define TLS_INFO_MAX 6 /* Total number of result fields */
|
||||
|
||||
/* Interpretation of the cipher information */
|
||||
|
||||
#define TLS_CIPHER_TABLE ({ \
|
||||
"TLS_CIPHER_NONE", \
|
||||
"TLS_CIPHER_NULL", \
|
||||
"TLS_CIPHER_ARCFOUR_128", \
|
||||
"TLS_CIPHER_3DES_CBC", \
|
||||
"TLS_CIPHER_RIJNDAEL_128_CBC", \
|
||||
"TLS_CIPHER_RIJNDAEL_256_CBC", \
|
||||
"TLS_CIPHER_ARCFOUR_40" \
|
||||
})
|
||||
|
||||
#define TLS_CIPHER_NAME(x) TLS_CIPHER_TABLE[(x)]
|
||||
|
||||
/* Interpretation of the key-exchange information */
|
||||
|
||||
#define TLS_KX_TABLE ({ \
|
||||
"TLS_KX_NONE", \
|
||||
"TLS_KX_RSA", \
|
||||
"TLS_KX_DHE_DSS", \
|
||||
"TLS_KX_DHE_RSA", \
|
||||
"TLS_KX_ANON_DH", \
|
||||
"TLS_KX_SRP", \
|
||||
"TLS_KX_RSA_EXPORT", \
|
||||
"TLS_KX_SRP_RSA", \
|
||||
"TLS_KX_SRP_DSS" \
|
||||
})
|
||||
|
||||
#define TLS_KX_NAME(x) TLS_KX_TABLE[(x)]
|
||||
|
||||
/* Interpretation of the MAC information */
|
||||
|
||||
#define TLS_MAC_TABLE ({ \
|
||||
"TLS_MAC_NONE", \
|
||||
"TLS_MAC_NULL", \
|
||||
"TLS_MAC_MD5", \
|
||||
"TLS_MAC_SHA" \
|
||||
})
|
||||
|
||||
#define TLS_MAC_NAME(x) TLS_MAC_TABLE[(x)]
|
||||
|
||||
/* Interpretation of the compression information */
|
||||
|
||||
#define TLS_COMP_TABLE ({ \
|
||||
"TLS_COMP_NONE", \
|
||||
"TLS_COMP_NULL", \
|
||||
"TLS_COMP_ZLIB", \
|
||||
"TLS_COMP_LZO" \
|
||||
})
|
||||
|
||||
#define TLS_COMP_NAME(x) TLS_COMP_TABLE[(x)]
|
||||
|
||||
/* Interpretation of the protocol information */
|
||||
|
||||
#define TLS_PROT_TABLE ({ \
|
||||
"TLS_PROT_NONE", \
|
||||
"TLS_PROT_SSL3", \
|
||||
"TLS_PROT_TLS1" \
|
||||
})
|
||||
|
||||
#define TLS_PROT_NAME(x) TLS_PROT_TABLE[(x)]
|
||||
|
||||
/* Recognized hash() algorithms (not all may be supported at runtime) */
|
||||
|
||||
#define TLS_HASH_SHA1 (1)
|
||||
#define TLS_HASH_SHA224 (2)
|
||||
#define TLS_HASH_SHA256 (3)
|
||||
#define TLS_HASH_SHA384 (4)
|
||||
#define TLS_HASH_SHA512 (5)
|
||||
#define TLS_HASH_MD5 (6)
|
||||
#define TLS_HASH_RIPEMD160 (7)
|
||||
|
||||
#endif /* LPC_TLS_H */
|
18
mudlib/sys/trace.h
Normal file
18
mudlib/sys/trace.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef LPC_TRACE_H_
|
||||
#define LPC_TRACE_H_
|
||||
|
||||
/* Argument values for the trace() efun.
|
||||
*/
|
||||
|
||||
#define TRACE_NOTHING 0 /* Stop tracing */
|
||||
|
||||
#define TRACE_CALL 1 /* Trace all lfun calls */
|
||||
#define TRACE_CALL_OTHER 2 /* Trace inter-object calls */
|
||||
#define TRACE_RETURN 4 /* Trace function returns */
|
||||
#define TRACE_ARGS 8 /* Print function arguments and results */
|
||||
#define TRACE_EXEC 16 /* Trace all executed instructions */
|
||||
#define TRACE_HEART_BEAT 32 /* Trace heartbeat code */
|
||||
#define TRACE_APPLY 64 /* Trace (internal) applies */
|
||||
#define TRACE_OBJNAME 128 /* Print the object names */
|
||||
|
||||
#endif /* LPC_TRACE_H_ */
|
22
mudlib/sys/wizlist.h
Normal file
22
mudlib/sys/wizlist.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef LPC_WIZLIST_H_
|
||||
#define LPC_WIZLIST_H_ 1
|
||||
|
||||
/* Indices returned by wizlist_info()
|
||||
*/
|
||||
|
||||
#define WL_NAME 0 /* Wizard name */
|
||||
#define WL_COMMANDS 1 /* Number of commands executed */
|
||||
#define WL_COST 2 /* Weighted evalcost spent on this wizard */
|
||||
#define WL_GIGACOST 3 /* Weighted giga-evalcost spent on this wizard */
|
||||
#define WL_TOTAL_COST 4 /* Total evalcost spent on this wizard */
|
||||
#define WL_TOTAL_GIGACOST 5 /* Total giga-evalcost spent on this wizard */
|
||||
#define WL_HEART_BEATS 6 /* Heartbeats spent on this wizard */
|
||||
#define WL_CALL_OUT 7 /* unimplemented */
|
||||
#define WL_ARRAY_TOTAL 8 /* Arrays accounted for */
|
||||
#define WL_MAPPING_TOTAL 9 /* Mappings accounted for */
|
||||
#define WL_STRUCT_TOTAL 10 /* Struct elements accounted for */
|
||||
#define WL_EXTRA 11 /* Extra Wizinfo, if set */
|
||||
|
||||
#define WL_SIZE 12 /* Number of entries */
|
||||
|
||||
#endif /* LPC_WIZLIST_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue