Crossfire Client, Trunk  R19362
newclient.h
Go to the documentation of this file.
00001 /*
00002  * static char *rcsid_newclient_h =
00003  *   "$Id$";
00004  */
00005 
00006 /*
00007     CrossFire, A Multiplayer game for X-windows
00008 
00009     Copyright (C) 2002,2006,2010 Mark Wedel & Crossfire Development Team
00010     Copyright (C) 1992 Frank Tore Johansen
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00025 
00026     The authors can be reached via e-mail at crossfire-devel@real-time.com
00027 */
00028 
00042 #ifndef NEWCLIENT_H
00043 #define NEWCLIENT_H
00044 
00053 #define MAXSOCKBUF (2+65535+1)
00054 
00060 #define MAP2_COORD_OFFSET   15
00061 
00070 #define MAP2_TYPE_CLEAR         0x0
00071 #define MAP2_TYPE_DARKNESS      0x1
00072 /*
00073  * These next two are not used presently, but the numbers are set aside for
00074  * when support is added.
00075  *
00076  * #define MAP2_TYPE_SOUND         0x2
00077  * #define MAP2_TYPE_LIGHTSOURCE   0x3
00078  */
00081 #define MAP2_LAYER_START        0x10
00082 
00092 #define MAP2_COORD_ENCODE(x, y, flags) ((((x)+MAP2_COORD_OFFSET)&0x3f)<<10|(((y)+MAP2_COORD_OFFSET)&0x3f)<<4|(flags&0x0f))
00093 
00094 #define CS_QUERY_YESNO      0x1 
00095 #define CS_QUERY_SINGLECHAR 0x2 
00096 #define CS_QUERY_HIDEINPUT  0x4 
00098 #define CS_SAY_NORMAL       0x1 
00099 #define CS_SAY_SHOUT        0x2 
00100 #define CS_SAY_GSAY         0x4 
00107 #define FLOAT_MULTI    100000   
00108 #define FLOAT_MULTF    100000.0 
00109 
00115 #define CS_STAT_HP                  1
00116 #define CS_STAT_MAXHP               2
00117 #define CS_STAT_SP                  3
00118 #define CS_STAT_MAXSP               4
00119 #define CS_STAT_STR                 5
00120 #define CS_STAT_INT                 6
00121 #define CS_STAT_WIS                 7
00122 #define CS_STAT_DEX                 8
00123 #define CS_STAT_CON                 9
00124 #define CS_STAT_CHA                10
00125 #define CS_STAT_EXP                11  
00126 #define CS_STAT_LEVEL              12
00127 #define CS_STAT_WC                 13
00128 #define CS_STAT_AC                 14
00129 #define CS_STAT_DAM                15
00130 #define CS_STAT_ARMOUR             16
00131 #define CS_STAT_SPEED              17
00132 #define CS_STAT_FOOD               18
00133 #define CS_STAT_WEAP_SP            19
00134 #define CS_STAT_RANGE              20
00135 #define CS_STAT_TITLE              21
00136 #define CS_STAT_POW                22
00137 #define CS_STAT_GRACE              23
00138 #define CS_STAT_MAXGRACE           24
00139 #define CS_STAT_FLAGS              25
00140 #define CS_STAT_WEIGHT_LIM         26
00141 #define CS_STAT_EXP64              28
00142 #define CS_STAT_SPELL_ATTUNE       29
00143 #define CS_STAT_SPELL_REPEL        30
00144 #define CS_STAT_SPELL_DENY         31
00145 #define CS_STAT_RACE_STR           32
00146 #define CS_STAT_RACE_INT           33
00147 #define CS_STAT_RACE_WIS           34
00148 #define CS_STAT_RACE_DEX           35
00149 #define CS_STAT_RACE_CON           36
00150 #define CS_STAT_RACE_CHA           37
00151 #define CS_STAT_RACE_POW           38
00152 #define CS_STAT_BASE_STR           39
00153 #define CS_STAT_BASE_INT           40
00154 #define CS_STAT_BASE_WIS           41
00155 #define CS_STAT_BASE_DEX           42
00156 #define CS_STAT_BASE_CON           43
00157 #define CS_STAT_BASE_CHA           44
00158 #define CS_STAT_BASE_POW           45
00159 #define CS_STAT_APPLIED_STR        46 
00160 #define CS_STAT_APPLIED_INT        47 
00161 #define CS_STAT_APPLIED_WIS        48 
00162 #define CS_STAT_APPLIED_DEX        49 
00163 #define CS_STAT_APPLIED_CON        50 
00164 #define CS_STAT_APPLIED_CHA        51 
00165 #define CS_STAT_APPLIED_POW        52 
00166 #define CS_STAT_GOLEM_HP           53 
00167 #define CS_STAT_GOLEM_MAXHP        54 
00169 #define CS_STAT_RESIST_START      100 
00170 #define CS_STAT_RESIST_END        117 
00172 #define CS_STAT_RES_PHYS          100
00173 #define CS_STAT_RES_MAG           101
00174 #define CS_STAT_RES_FIRE          102
00175 #define CS_STAT_RES_ELEC          103
00176 #define CS_STAT_RES_COLD          104
00177 #define CS_STAT_RES_CONF          105
00178 #define CS_STAT_RES_ACID          106
00179 #define CS_STAT_RES_DRAIN         107
00180 #define CS_STAT_RES_GHOSTHIT      108
00181 #define CS_STAT_RES_POISON        109
00182 #define CS_STAT_RES_SLOW          110
00183 #define CS_STAT_RES_PARA          111
00184 #define CS_STAT_TURN_UNDEAD       112
00185 #define CS_STAT_RES_FEAR          113
00186 #define CS_STAT_RES_DEPLETE       114
00187 #define CS_STAT_RES_DEATH         115
00188 #define CS_STAT_RES_HOLYWORD      116
00189 #define CS_STAT_RES_BLIND         117
00190 
00196 #define CS_STAT_SKILLINFO         140
00197 
00203 #define CS_NUM_SKILLS              50
00204 
00213 #define SF_FIREON   0x01
00214 #define SF_RUNON    0x02
00215 
00224 #define ACL_NAME        1
00225 #define ACL_CLASS       2
00226 #define ACL_RACE        3
00227 #define ACL_LEVEL       4
00228 #define ACL_FACE        5
00229 #define ACL_PARTY       6
00230 #define ACL_MAP         7
00231 #define ACL_FACE_NUM    8
00232 
00249 #define NDI_BLACK       0
00250 #define NDI_WHITE       1
00251 #define NDI_NAVY        2
00252 #define NDI_RED         3
00253 #define NDI_ORANGE      4
00254 #define NDI_BLUE        5       
00255 #define NDI_DK_ORANGE   6       
00256 #define NDI_GREEN       7       
00257 #define NDI_LT_GREEN    8       
00259 #define NDI_GREY        9
00260 #define NDI_BROWN       10      
00261 #define NDI_GOLD        11
00262 #define NDI_TAN         12      
00263 #define NDI_MAX_COLOR   12      
00265 #define NDI_COLOR_MASK  0xff    
00269 #define NDI_UNIQUE      0x100   
00270 #define NDI_ALL         0x200   
00271 #define NDI_ALL_DMS     0x400   
00274 
00275 
00279 enum {a_none, a_readied, a_wielded, a_worn, a_active, a_applied};
00280 
00281 #define F_APPLIED       0x000F
00282 #define F_UNIDENTIFIED  0x0010
00283 #define F_UNPAID        0x0200
00284 #define F_MAGIC         0x0400
00285 #define F_CURSED        0x0800
00286 #define F_DAMNED        0x1000
00287 #define F_OPEN          0x2000
00288 #define F_NOPICK        0x4000
00289 #define F_LOCKED        0x8000
00290 #define F_BLESSED       0x0100
00291 
00300 #define FACE_FLOOR      0x80
00301 #define FACE_WALL       0x40    
00303 #define FACE_COLOR_MASK 0xf
00304 
00311 #define UPD_LOCATION    0x01
00312 #define UPD_FLAGS       0x02
00313 #define UPD_WEIGHT      0x04
00314 #define UPD_FACE        0x08
00315 #define UPD_NAME        0x10
00316 #define UPD_ANIM        0x20
00317 #define UPD_ANIMSPEED   0x40
00318 #define UPD_NROF        0x80
00319 #define UPD_ALL         0xFF
00320 
00321 #define UPD_SP_MANA     0x01            
00322 #define UPD_SP_GRACE    0x02            
00323 #define UPD_SP_DAMAGE   0x04            
00325 
00326 
00331 #define SOUND_NORMAL    0
00332 #define SOUND_SPELL     1
00333 
00340 #define FACE_IS_ANIM    1<<15
00341 #define ANIM_RANDOM     1<<13
00342 #define ANIM_SYNC       2<<13
00343 
00344 #define ANIM_FLAGS_MASK 0x6000 
00350 #define ANIM_MASK       0x1fff
00351 
00367 #define EMI_NOREDRAW        0x01
00368 
00371 #define EMI_SMOOTH          0x02
00372 
00377 #define EMI_HASMOREBITS     0x80
00378 
00380 /*
00381  * Note!
00382  * When adding message types, don't forget to keep the client up to date too!
00383  */
00384 
00389 #define MSG_TYPE_BOOK                  1
00390 #define MSG_TYPE_CARD                  2
00391 #define MSG_TYPE_PAPER                 3
00392 #define MSG_TYPE_SIGN                  4
00393 #define MSG_TYPE_MONUMENT              5
00394 #define MSG_TYPE_DIALOG                6 
00395 #define MSG_TYPE_MOTD                  7
00396 #define MSG_TYPE_ADMIN                 8
00397 #define MSG_TYPE_SHOP                  9
00398 #define MSG_TYPE_COMMAND              10 
00399 #define MSG_TYPE_ATTRIBUTE            11 
00401 #define MSG_TYPE_SKILL                12 
00402 #define MSG_TYPE_APPLY                13 
00403 #define MSG_TYPE_ATTACK               14 
00404 #define MSG_TYPE_COMMUNICATION        15 
00405 #define MSG_TYPE_SPELL                16 
00406 #define MSG_TYPE_ITEM                 17 
00407 #define MSG_TYPE_MISC                 18 
00409 #define MSG_TYPE_VICTIM               19 
00411 #define MSG_TYPE_CLIENT               20 
00412 #define MSG_TYPE_LAST                 21
00413 
00414 #define MSG_SUBTYPE_NONE               0
00415 
00416 /* book messages subtypes */
00417 #define MSG_TYPE_BOOK_CLASP_1          1
00418 #define MSG_TYPE_BOOK_CLASP_2          2
00419 #define MSG_TYPE_BOOK_ELEGANT_1        3
00420 #define MSG_TYPE_BOOK_ELEGANT_2        4
00421 #define MSG_TYPE_BOOK_QUARTO_1         5
00422 #define MSG_TYPE_BOOK_QUARTO_2         6
00423 #define MSG_TYPE_BOOK_SPELL_EVOKER     7
00424 #define MSG_TYPE_BOOK_SPELL_PRAYER     8
00425 #define MSG_TYPE_BOOK_SPELL_PYRO       9
00426 #define MSG_TYPE_BOOK_SPELL_SORCERER  10
00427 #define MSG_TYPE_BOOK_SPELL_SUMMONER  11
00428 
00429 /* card messages subtypes*/
00430 #define MSG_TYPE_CARD_SIMPLE_1         1
00431 #define MSG_TYPE_CARD_SIMPLE_2         2
00432 #define MSG_TYPE_CARD_SIMPLE_3         3
00433 #define MSG_TYPE_CARD_ELEGANT_1        4
00434 #define MSG_TYPE_CARD_ELEGANT_2        5
00435 #define MSG_TYPE_CARD_ELEGANT_3        6
00436 #define MSG_TYPE_CARD_STRANGE_1        7
00437 #define MSG_TYPE_CARD_STRANGE_2        8
00438 #define MSG_TYPE_CARD_STRANGE_3        9
00439 #define MSG_TYPE_CARD_MONEY_1         10
00440 #define MSG_TYPE_CARD_MONEY_2         11
00441 #define MSG_TYPE_CARD_MONEY_3         12
00442 
00443 /* Paper messages subtypes */
00444 #define MSG_TYPE_PAPER_NOTE_1          1
00445 #define MSG_TYPE_PAPER_NOTE_2          2
00446 #define MSG_TYPE_PAPER_NOTE_3          3
00447 #define MSG_TYPE_PAPER_LETTER_OLD_1    4
00448 #define MSG_TYPE_PAPER_LETTER_OLD_2    5
00449 #define MSG_TYPE_PAPER_LETTER_NEW_1    6
00450 #define MSG_TYPE_PAPER_LETTER_NEW_2    7
00451 #define MSG_TYPE_PAPER_ENVELOPE_1      8
00452 #define MSG_TYPE_PAPER_ENVELOPE_2      9
00453 #define MSG_TYPE_PAPER_SCROLL_OLD_1   10
00454 #define MSG_TYPE_PAPER_SCROLL_OLD_2   11
00455 #define MSG_TYPE_PAPER_SCROLL_NEW_1   12
00456 #define MSG_TYPE_PAPER_SCROLL_NEW_2   13
00457 #define MSG_TYPE_PAPER_SCROLL_MAGIC   14
00458 
00459 /* road signs messages subtypes */       /* Including magic mouths */
00460 #define MSG_TYPE_SIGN_BASIC            1
00461 #define MSG_TYPE_SIGN_DIR_LEFT         2
00462 #define MSG_TYPE_SIGN_DIR_RIGHT        3
00463 #define MSG_TYPE_SIGN_DIR_BOTH         4
00464 #define MSG_TYPE_SIGN_MAGIC_MOUTH      5
00465 
00466 /* stones and monument messages */
00467 #define MSG_TYPE_MONUMENT_STONE_1      1
00468 #define MSG_TYPE_MONUMENT_STONE_2      2
00469 #define MSG_TYPE_MONUMENT_STONE_3      3
00470 #define MSG_TYPE_MONUMENT_STATUE_1     4
00471 #define MSG_TYPE_MONUMENT_STATUE_2     5
00472 #define MSG_TYPE_MONUMENT_STATUE_3     6
00473 #define MSG_TYPE_MONUMENT_GRAVESTONE_1 7
00474 #define MSG_TYPE_MONUMENT_GRAVESTONE_2 8
00475 #define MSG_TYPE_MONUMENT_GRAVESTONE_3 9
00476 #define MSG_TYPE_MONUMENT_WALL_1      10
00477 #define MSG_TYPE_MONUMENT_WALL_2      11
00478 #define MSG_TYPE_MONUMENT_WALL_3      12
00479 
00480 /* dialog message */
00481 #define MSG_TYPE_DIALOG_NPC            1 
00482 #define MSG_TYPE_DIALOG_ALTAR          2 
00483 #define MSG_TYPE_DIALOG_MAGIC_EAR      3 
00485 /* MOTD doesn't have any subtypes */
00486 
00487 /* admin/global messages */
00488 #define MSG_TYPE_ADMIN_RULES           1
00489 #define MSG_TYPE_ADMIN_NEWS            2
00490 #define MSG_TYPE_ADMIN_PLAYER          3 
00491 #define MSG_TYPE_ADMIN_DM              4 
00492 #define MSG_TYPE_ADMIN_HISCORE         5 
00493 #define MSG_TYPE_ADMIN_LOADSAVE        6 
00494 #define MSG_TYPE_ADMIN_LOGIN           7 
00495 #define MSG_TYPE_ADMIN_VERSION         8 
00496 #define MSG_TYPE_ADMIN_ERROR           9 
00497 /*
00498  * I'm not actually expecting anything to make much use of the MSG_TYPE_SHOP
00499  * values However, to use the media tags, need to use draw_ext_info, and need
00500  * to have a type/subtype, so figured might as well put in real values here.
00501  */
00502 #define MSG_TYPE_SHOP_LISTING          1 
00504 #define MSG_TYPE_SHOP_PAYMENT          2 
00506 #define MSG_TYPE_SHOP_SELL             3 
00507 #define MSG_TYPE_SHOP_MISC             4 
00508 /*
00509  * Basically, 1 subtype/command.  Like shops, not expecting much to be done,
00510  * but by having different subtypes, it makes it easier for client to store
00511  * way information (eg, who output)
00512  */
00513 #define MSG_TYPE_COMMAND_WHO           1
00514 #define MSG_TYPE_COMMAND_MAPS          2
00515 #define MSG_TYPE_COMMAND_BODY          3
00516 #define MSG_TYPE_COMMAND_MALLOC        4
00517 #define MSG_TYPE_COMMAND_WEATHER       5
00518 #define MSG_TYPE_COMMAND_STATISTICS    6
00519 #define MSG_TYPE_COMMAND_CONFIG        7 
00520 #define MSG_TYPE_COMMAND_INFO          8 
00521 #define MSG_TYPE_COMMAND_QUESTS        9 
00522 #define MSG_TYPE_COMMAND_DEBUG        10 
00523 #define MSG_TYPE_COMMAND_ERROR        11 
00524 #define MSG_TYPE_COMMAND_SUCCESS      12 
00525 #define MSG_TYPE_COMMAND_FAILURE      13 
00526 #define MSG_TYPE_COMMAND_EXAMINE      14 
00527 #define MSG_TYPE_COMMAND_INVENTORY    15 
00528 #define MSG_TYPE_COMMAND_HELP         16 
00529 #define MSG_TYPE_COMMAND_DM           17 
00530 #define MSG_TYPE_COMMAND_NEWPLAYER    18 
00535 /* This is somewhat verbose.  If the client ends up being able to
00536  * choose various attributes based on message type, I think it is important
00537  * for the client to know if this is a benefit or detriment to the player.
00538  * In the case of losing a bonus, this typically indicates a spell has
00539  * ended, which is probably more important (and should be displayed more
00540  * prominently) than when you cast the spell
00541  */
00542 
00543 #define MSG_TYPE_ATTRIBUTE_ATTACKTYPE_GAIN    1 
00544 #define MSG_TYPE_ATTRIBUTE_ATTACKTYPE_LOSS    2 
00549 #define MSG_TYPE_ATTRIBUTE_PROTECTION_GAIN    3 
00550 #define MSG_TYPE_ATTRIBUTE_PROTECTION_LOSS    4 
00556 #define MSG_TYPE_ATTRIBUTE_MOVE               5 
00558 #define MSG_TYPE_ATTRIBUTE_RACE               6 
00559 #define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_START   7 
00561 #define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_END     8 
00562 #define MSG_TYPE_ATTRIBUTE_STAT_GAIN          9
00563 #define MSG_TYPE_ATTRIBUTE_STAT_LOSS         10
00564 #define MSG_TYPE_ATTRIBUTE_LEVEL_GAIN        11
00565 #define MSG_TYPE_ATTRIBUTE_LEVEL_LOSS        12
00566 #define MSG_TYPE_ATTRIBUTE_GOOD_EFFECT_START 13 
00568 #define MSG_TYPE_ATTRIBUTE_GOOD_EFFECT_END   14 
00569 #define MSG_TYPE_ATTRIBUTE_GOD               15 
00571 /* I think one type/skill is overkill, so instead, use broader categories
00572  * for these messages.
00573  * The difference in ERROR vs FAILURE is basically this:  ERROR indicates
00574  * something wasn't right to even attempt to use the skill (don't have
00575  * needed object, or haven't marked objects, etc).
00576  * FAILURE indicates that player attempted to use the skill, but it
00577  * didn't work.
00578  * PRAY is listed out because praying over altars can generate some
00579  * messages not really related to the skill itself.
00580  */
00581 #define MSG_TYPE_SKILL_MISSING        1 
00582 #define MSG_TYPE_SKILL_ERROR          2 
00583 #define MSG_TYPE_SKILL_SUCCESS        3 
00584 #define MSG_TYPE_SKILL_FAILURE        4 
00585 #define MSG_TYPE_SKILL_PRAY           5 
00586 #define MSG_TYPE_SKILL_LIST           6 
00588 /* Messages related to applying objects.  Note that applying many objects may
00589  * generate MSG_TYPE_ATTRIBUTE messages - the APPLY here more directly related
00590  * to the direct messages related to applying them (you put on your armor, you
00591  * apply scroll, etc).  The ERROR is like that for SKILLS - something prevent
00592  * even trying to apply the object.  FAILURE indicates result wasn't
00593  * successful.
00594  */
00595 #define MSG_TYPE_APPLY_ERROR          1
00596 #define MSG_TYPE_APPLY_UNAPPLY        2 
00597 #define MSG_TYPE_APPLY_SUCCESS        3 
00598 #define MSG_TYPE_APPLY_FAILURE        4 
00599 #define MSG_TYPE_APPLY_CURSED         5 
00600 #define MSG_TYPE_APPLY_TRAP           6 
00601 #define MSG_TYPE_APPLY_BADBODY        7 
00602 #define MSG_TYPE_APPLY_PROHIBITION    8 
00603 #define MSG_TYPE_APPLY_BUILD          9 
00605 /* attack related messages */
00606 #define MSG_TYPE_ATTACK_DID_HIT       1 
00607 #define MSG_TYPE_ATTACK_PET_HIT       2 
00608 #define MSG_TYPE_ATTACK_FUMBLE        3 
00609 #define MSG_TYPE_ATTACK_DID_KILL      4 
00610 #define MSG_TYPE_ATTACK_PET_DIED      5 
00611 #define MSG_TYPE_ATTACK_NOKEY         6 
00612 #define MSG_TYPE_ATTACK_NOATTACK      7 
00613 #define MSG_TYPE_ATTACK_PUSHED        8 
00614 #define MSG_TYPE_ATTACK_MISS          9 
00616 #define MSG_TYPE_COMMUNICATION_RANDOM 1 
00617 #define MSG_TYPE_COMMUNICATION_SAY    2 
00618 #define MSG_TYPE_COMMUNICATION_ME     3 
00619 #define MSG_TYPE_COMMUNICATION_TELL   4 
00620 #define MSG_TYPE_COMMUNICATION_EMOTE  5 
00621 #define MSG_TYPE_COMMUNICATION_PARTY  6 
00622 #define MSG_TYPE_COMMUNICATION_SHOUT  7 
00623 #define MSG_TYPE_COMMUNICATION_CHAT   8 
00625 #define MSG_TYPE_SPELL_HEAL           1 
00626 #define MSG_TYPE_SPELL_PET            2 
00627 #define MSG_TYPE_SPELL_FAILURE        3 
00628 #define MSG_TYPE_SPELL_END            4 
00629 #define MSG_TYPE_SPELL_SUCCESS        5 
00630 #define MSG_TYPE_SPELL_ERROR          6 
00631 #define MSG_TYPE_SPELL_PERCEIVE_SELF  7 
00632 #define MSG_TYPE_SPELL_TARGET         8 
00633 #define MSG_TYPE_SPELL_INFO           9 
00636 #define MSG_TYPE_ITEM_REMOVE          1 
00637 #define MSG_TYPE_ITEM_ADD             2 
00638 #define MSG_TYPE_ITEM_CHANGE          3 
00639 #define MSG_TYPE_ITEM_INFO            4 
00640 /*
00641  * MSG_TYPE_MISC, by its very nature, doesn't really have subtypes.  It is
00642  * used for messages that really don't belong anyplace else
00643  */
00644 #define MSG_TYPE_VICTIM_SWAMP         1 
00645 #define MSG_TYPE_VICTIM_WAS_HIT       2 
00646 #define MSG_TYPE_VICTIM_STEAL         3 
00648 #define MSG_TYPE_VICTIM_SPELL         4 
00650 #define MSG_TYPE_VICTIM_DIED          5 
00651 #define MSG_TYPE_VICTIM_WAS_PUSHED    6 
00654 #define MSG_TYPE_CLIENT_CONFIG        1 
00655 #define MSG_TYPE_CLIENT_SERVER        2 
00656 #define MSG_TYPE_CLIENT_COMMAND       3 
00657 #define MSG_TYPE_CLIENT_QUERY         4 
00658 #define MSG_TYPE_CLIENT_DEBUG         5 
00659 #define MSG_TYPE_CLIENT_NOTICE        6 
00660 #define MSG_TYPE_CLIENT_METASERVER    7 
00661 #define MSG_TYPE_CLIENT_SCRIPT        8 
00662 #define MSG_TYPE_CLIENT_ERROR         9 
00664 
00665 
00668 #define INFO_MAP_ARCH_NAME          1 
00669 #define INFO_MAP_NAME               2 
00670 #define INFO_MAP_DESCRIPTION        3 
00675 typedef struct SockList {
00676 #ifdef CLIENT_TYPES_H                       /* Used by the client */
00677     int len;
00678     unsigned char *buf;
00679 #else                                       /* Used by the server */
00680     size_t len;
00681     unsigned char buf[MAXSOCKBUF]; /* 2(size)+65535(content)+1(ending NULL) */
00682 #endif
00683 } SockList;
00684 
00688 typedef struct CS_Stats {
00689     int     ibytes;     
00690     int     obytes;
00691     short   max_conn;   
00692     time_t  time_start; 
00693 } CS_Stats;
00694 
00695 extern CS_Stats cst_tot, cst_lst;
00696 
00697 #endif /* NEWCLIENT_H */