2006-03-20 16:43:15 +00:00
/*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ( " PARALLAX " ) . PARALLAX , IN DISTRIBUTING THE CODE TO
END - USERS , AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN , GRANTS A
ROYALTY - FREE , PERPETUAL LICENSE TO SUCH END - USERS FOR USE BY SUCH END - USERS
IN USING , DISPLAYING , AND CREATING DERIVATIVE WORKS THEREOF , SO LONG AS
SUCH USE , DISPLAY OR CREATION IS FOR NON - COMMERCIAL , ROYALTY OR REVENUE
FREE PURPOSES . IN NO EVENT SHALL THE END - USER USE THE COMPUTER CODE
CONTAINED HEREIN FOR REVENUE - BEARING PURPOSES . THE END - USER UNDERSTANDS
2013-02-24 02:39:48 +00:00
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE .
2006-03-20 16:43:15 +00:00
COPYRIGHT 1993 - 1998 PARALLAX SOFTWARE CORPORATION . ALL RIGHTS RESERVED .
*/
/*
*
2007-07-18 21:36:53 +00:00
* Defines and exported variables for multi . c
2006-03-20 16:43:15 +00:00
*
*/
# ifndef _MULTI_H
# define _MULTI_H
2009-04-09 07:41:30 +00:00
# include "gameseq.h"
# include "piggy.h"
# include "powerup.h"
# include "newmenu.h"
2009-04-30 12:30:14 +00:00
// Need these for non network builds too -Chris
# define MAX_MESSAGE_LEN 35
2009-11-29 16:46:13 +00:00
# ifdef USE_UDP
2009-03-20 12:10:38 +00:00
# ifdef _WIN32
2011-04-05 00:24:30 +00:00
# ifdef _WIN32_WINNT
# undef _WIN32_WINNT
# endif
# define _WIN32_WINNT 0x0501 // for get/freeaddrinfo()
# include <winsock2.h>
# include <ws2tcpip.h>
2009-11-24 09:48:53 +00:00
# include <io.h>
2006-03-20 16:43:15 +00:00
# else
2009-11-24 09:48:53 +00:00
# include <sys/socket.h>
# include <netinet/in.h>
# include <netdb.h>
# include <arpa/inet.h>
# include <unistd.h>
2010-09-02 00:07:37 +00:00
# include <stdint.h>
2009-11-24 09:48:53 +00:00
# include <sys/time.h>
2006-03-20 16:43:15 +00:00
# endif
2009-03-20 12:10:38 +00:00
# ifdef IPv6
2009-11-24 09:48:53 +00:00
# define _sockaddr sockaddr_in6
# define _af AF_INET6
# define _pf PF_INET6
2009-03-20 12:10:38 +00:00
# else
2009-11-24 09:48:53 +00:00
# define _sockaddr sockaddr_in
# define _af AF_INET
# define _pf PF_INET
2009-03-20 12:10:38 +00:00
# endif
2009-11-29 16:46:13 +00:00
# endif
2006-03-20 16:43:15 +00:00
2009-04-09 07:41:30 +00:00
// PROTOCOL VARIABLES AND DEFINES
extern int multi_protocol ; // set and determinate used protocol
2011-09-13 23:15:20 +00:00
# define MULTI_PROTO_UDP 1 // UDP protocol
2006-03-20 16:43:15 +00:00
2012-05-10 17:10:45 +00:00
// What version of the multiplayer protocol is this? Increment each time something drastic changes in Multiplayer without the version number changes. Can be reset to 0 each time the version of the game changes
2013-04-08 10:46:05 +00:00
# define MULTI_PROTO_VERSION 5
2009-04-09 07:41:30 +00:00
// PROTOCOL VARIABLES AND DEFINES - END
2006-03-20 16:43:15 +00:00
2013-02-21 00:20:26 +00:00
# define MULTI_POSITION 0
# define MULTI_REAPPEAR 1
# define MULTI_FIRE 2
# define MULTI_KILL 3
# define MULTI_REMOVE_OBJECT 4
# define MULTI_PLAYER_EXPLODE 5
# define MULTI_MESSAGE 6
# define MULTI_QUIT 7
# define MULTI_PLAY_SOUND 8
# define MULTI_BEGIN_SYNC 9
# define MULTI_CONTROLCEN 10
# define MULTI_ROBOT_CLAIM 11
# define MULTI_END_SYNC 12
# define MULTI_CLOAK 13
# define MULTI_ENDLEVEL_START 14
# define MULTI_DOOR_OPEN 15
# define MULTI_CREATE_EXPLOSION 16
# define MULTI_CONTROLCEN_FIRE 17
# define MULTI_PLAYER_DROP 18
# define MULTI_CREATE_POWERUP 19
# define MULTI_CONSISTENCY 20
# define MULTI_DECLOAK 21
# define MULTI_MENU_CHOICE 22
# define MULTI_ROBOT_POSITION 23
# define MULTI_ROBOT_EXPLODE 24
# define MULTI_ROBOT_RELEASE 25
# define MULTI_ROBOT_FIRE 26
# define MULTI_SCORE 27
# define MULTI_CREATE_ROBOT 28
# define MULTI_TRIGGER 29
# define MULTI_BOSS_ACTIONS 30
# define MULTI_CREATE_ROBOT_POWERUPS 31
# define MULTI_HOSTAGE_DOOR 32
# define MULTI_SAVE_GAME 33
# define MULTI_RESTORE_GAME 34
# define MULTI_REQ_PLAYER 35 // NEVER USED
# define MULTI_SEND_PLAYER 36 // NEVER USED
2011-01-14 13:29:36 +00:00
# define MULTI_POWCAP_UPDATE 37
2011-01-14 16:56:14 +00:00
# define MULTI_HEARTBEAT 38
# define MULTI_KILLGOALS 39
2011-01-19 01:19:15 +00:00
# define MULTI_DO_BOUNTY 40
2011-04-11 15:47:12 +00:00
# define MULTI_TYPING_STATE 41
2011-05-25 13:25:06 +00:00
# define MULTI_GMODE_UPDATE 42
# define MULTI_KILL_HOST 43
# define MULTI_KILL_CLIENT 44
2013-04-08 10:46:05 +00:00
# define MULTI_RANK 45
2006-03-20 16:43:15 +00:00
2013-04-08 10:46:05 +00:00
# define MULTI_MAX_TYPE 45
2006-03-20 16:43:15 +00:00
# define MAX_MULTI_MESSAGE_LEN 90 //didn't change it, just moved it up
# define MAX_NET_CREATE_OBJECTS 20
2007-12-29 14:18:49 +00:00
# define MISSILE_ADJUST 6
2013-02-21 00:20:26 +00:00
# define NETGAME_ANARCHY 0
# define NETGAME_TEAM_ANARCHY 1
# define NETGAME_ROBOT_ANARCHY 2
# define NETGAME_COOPERATIVE 3
# define NETGAME_BOUNTY 7
# define NETSTAT_MENU 0
# define NETSTAT_PLAYING 1
# define NETSTAT_BROWSING 2
# define NETSTAT_WAITING 3
# define NETSTAT_STARTING 4
# define NETSTAT_ENDLEVEL 5
# define CONNECT_DISCONNECTED 0
# define CONNECT_PLAYING 1
# define CONNECT_WAITING 2
# define CONNECT_DIED_IN_MINE 3
# define CONNECT_FOUND_SECRET 4
# define CONNECT_ESCAPE_TUNNEL 5
# define CONNECT_END_MENU 6
2009-03-20 12:10:38 +00:00
2009-11-24 09:48:53 +00:00
// reasons for a packet with type PID_DUMP
# define DUMP_CLOSED 0 // no new players allowed after game started
# define DUMP_FULL 1 // player cound maxed out
# define DUMP_ENDLEVEL 2
# define DUMP_DORK 3
# define DUMP_ABORTED 4
# define DUMP_CONNECTED 5 // never used
# define DUMP_LEVEL 6
# define DUMP_KICKED 7
2011-09-19 11:01:08 +00:00
# define DUMP_PKTTIMEOUT 8
2009-11-24 09:48:53 +00:00
2009-03-20 12:10:38 +00:00
// Bitmask for netgame_info->AllowedItems to set allowed items in Netgame
# define NETFLAG_DOLASER 1 // 0x0000001
# define NETFLAG_DOQUAD 2 // 0x0000002
# define NETFLAG_DOVULCAN 4 // 0x0000004
# define NETFLAG_DOSPREAD 8 // 0x0000008
# define NETFLAG_DOPLASMA 16 // 0x0000010
# define NETFLAG_DOFUSION 32 // 0x0000020
# define NETFLAG_DOHOMING 64 // 0x0000040
# define NETFLAG_DOSMART 128 // 0x0000080
# define NETFLAG_DOMEGA 256 // 0x0000100
# define NETFLAG_DOPROXIM 512 // 0x0000200
# define NETFLAG_DOCLOAK 1024 // 0x0000400
# define NETFLAG_DOINVUL 2048 // 0x0000800
# define NETFLAG_DOPOWERUP 4095 // 0x0000fff mask for all powerup flags
# define MULTI_ALLOW_POWERUP_MAX 12
int multi_allow_powerup_mask [ MAX_POWERUP_TYPES ] ;
extern char * multi_allow_powerup_text [ MULTI_ALLOW_POWERUP_MAX ] ;
2006-03-20 16:43:15 +00:00
// Exported functions
2013-04-08 10:46:05 +00:00
extern int GetMyNetRanking ( ) ;
extern void ClipRank ( ubyte * rank ) ;
2006-03-20 16:43:15 +00:00
int objnum_remote_to_local ( int remote_obj , int owner ) ;
2006-10-06 14:41:31 +00:00
int objnum_local_to_remote ( int local_obj , sbyte * owner ) ;
2006-03-20 16:43:15 +00:00
void map_objnum_local_to_remote ( int local , int remote , int owner ) ;
void map_objnum_local_to_local ( int objnum ) ;
2009-04-09 07:41:30 +00:00
int multi_objnum_is_past ( int objnum ) ;
void multi_do_ping_frame ( ) ;
2006-03-20 16:43:15 +00:00
void multi_init_objects ( void ) ;
void multi_show_player_list ( void ) ;
2009-03-20 12:10:38 +00:00
void multi_do_protocol_frame ( int force , int listen ) ;
2006-03-20 16:43:15 +00:00
void multi_do_frame ( void ) ;
2011-09-15 08:45:45 +00:00
void multi_send_fire ( int laser_gun , int laser_level , int laser_flags , int laser_fired , short laser_track ) ;
2006-03-20 16:43:15 +00:00
void multi_send_destroy_controlcen ( int objnum , int player ) ;
void multi_send_endlevel_start ( int ) ;
void multi_send_player_explode ( char type ) ;
void multi_send_message ( void ) ;
void multi_send_position ( int objnum ) ;
void multi_send_reappear ( ) ;
void multi_send_kill ( int objnum ) ;
void multi_send_remobj ( int objnum ) ;
void multi_send_quit ( int why ) ;
2013-03-24 22:53:12 +00:00
void multi_send_door_open ( int segnum , int side , ubyte flag ) ;
2006-03-20 16:43:15 +00:00
void multi_send_create_explosion ( int player_num ) ;
void multi_send_controlcen_fire ( vms_vector * to_target , int gun_num , int objnum ) ;
void multi_send_cloak ( void ) ;
void multi_send_decloak ( void ) ;
void multi_send_create_powerup ( int powerup_type , int segnum , int objnum , vms_vector * pos ) ;
void multi_send_play_sound ( int sound_num , fix volume ) ;
void multi_send_audio_taunt ( int taunt_num ) ;
void multi_send_score ( void ) ;
void multi_send_trigger ( int trigger ) ;
void multi_send_hostage_door_status ( int wallnum ) ;
2011-01-19 01:19:15 +00:00
void multi_send_bounty ( void ) ;
2006-03-20 16:43:15 +00:00
void multi_endlevel_score ( void ) ;
2009-11-24 09:48:53 +00:00
void multi_consistency_error ( int reset ) ;
2006-03-20 16:43:15 +00:00
void multi_prep_level ( void ) ;
2009-04-09 07:41:30 +00:00
int multi_level_sync ( void ) ;
2006-03-20 16:43:15 +00:00
int multi_endlevel ( int * secret ) ;
2010-03-20 13:21:53 +00:00
int multi_endlevel_poll1 ( newmenu * menu , d_event * event , void * userdata ) ;
2010-01-07 14:49:07 +00:00
int multi_endlevel_poll2 ( newmenu * menu , d_event * event , void * userdata ) ;
2009-11-24 09:48:53 +00:00
void multi_send_endlevel_packet ( ) ;
2006-03-20 16:43:15 +00:00
void multi_leave_game ( void ) ;
2013-03-30 19:41:33 +00:00
void multi_process_data ( const ubyte * dat , int len ) ;
void multi_process_bigdata ( const ubyte * buf , int len ) ;
2006-03-20 16:43:15 +00:00
void multi_do_death ( int objnum ) ;
void multi_send_message_dialog ( void ) ;
int multi_delete_extra_objects ( void ) ;
void multi_make_ghost_player ( int objnum ) ;
void multi_make_player_ghost ( int objnum ) ;
2011-02-09 11:58:28 +00:00
void multi_reset_player_object ( object * objp ) ;
2006-03-20 16:43:15 +00:00
void multi_define_macro ( int key ) ;
void multi_send_macro ( int key ) ;
int multi_get_kill_list ( int * plist ) ;
void multi_new_game ( void ) ;
void multi_sort_kill_list ( void ) ;
void multi_reset_stuff ( void ) ;
2009-11-24 09:48:53 +00:00
void multi_send_data ( unsigned char * buf , int len , int priority ) ;
2006-03-20 16:43:15 +00:00
int get_team ( int pnum ) ;
2011-01-14 18:48:36 +00:00
int multi_maybe_disable_friendly_fire ( object * killer ) ;
2011-02-09 11:58:28 +00:00
void multi_initiate_save_game ( ) ;
void multi_initiate_restore_game ( ) ;
void multi_disconnect_player ( int pnum ) ;
2010-12-22 09:38:52 +00:00
void multi_object_to_object_rw ( object * obj , object_rw * obj_rw ) ;
void multi_object_rw_to_object ( object_rw * obj_rw , object * obj ) ;
2009-04-09 07:41:30 +00:00
2006-03-20 16:43:15 +00:00
// Exported variables
2009-03-20 12:10:38 +00:00
extern int Network_status ;
2009-04-09 07:41:30 +00:00
// IMPORTANT: These variables needed for player rejoining done by protocol-specific code
extern int Network_send_objects ;
2009-11-24 09:48:53 +00:00
extern int Network_send_object_mode ;
2009-04-09 07:41:30 +00:00
extern int Network_send_objnum ;
2009-03-20 12:10:38 +00:00
extern int Network_rejoined ;
2011-01-14 13:29:36 +00:00
extern int Network_sending_extras ;
extern int VerifyPlayerJoined ;
extern int Player_joining_extras ;
2009-11-24 09:48:53 +00:00
extern int Network_player_added ;
2006-03-20 16:43:15 +00:00
2013-03-30 19:41:33 +00:00
extern ubyte multibuf [ MAX_MULTI_MESSAGE_LEN + 4 ] ;
2006-03-20 16:43:15 +00:00
extern int who_killed_controlcen ;
extern int Net_create_objnums [ MAX_NET_CREATE_OBJECTS ] ;
extern int Net_create_loc ;
2012-04-15 13:32:46 +00:00
extern short kill_matrix [ MAX_PLAYERS ] [ MAX_PLAYERS ] ;
2006-03-20 16:43:15 +00:00
extern short team_kills [ 2 ] ;
extern int multi_goto_secret ;
2011-01-19 18:55:32 +00:00
extern char * GMNames [ 8 ] ;
extern char * GMNamesShrt [ 8 ] ;
2006-03-20 16:43:15 +00:00
2009-03-20 12:10:38 +00:00
extern ushort my_segments_checksum ;
2006-03-20 16:43:15 +00:00
//do we draw the kill list on the HUD?
extern int Show_kill_list ;
extern int Show_reticle_name ;
extern fix Show_kill_list_timer ;
// Used to send network messages
2013-02-21 00:20:26 +00:00
extern char Network_message [ MAX_MESSAGE_LEN ] ;
2006-03-20 16:43:15 +00:00
extern int Network_message_reciever ;
// Used to map network to local object numbers
2012-04-15 13:32:46 +00:00
extern short remote_to_local [ MAX_PLAYERS ] [ MAX_OBJECTS ] ; // Network object num for each
2006-03-20 16:43:15 +00:00
extern short local_to_remote [ MAX_OBJECTS ] ; // Local object num for each network objnum
2006-10-06 14:41:31 +00:00
extern sbyte object_owner [ MAX_OBJECTS ] ; // Who 'owns' each local object for network purposes
2006-03-20 16:43:15 +00:00
extern int multi_quit_game ;
2012-04-15 13:32:46 +00:00
extern int multi_sending_message [ MAX_PLAYERS ] ;
2006-03-20 16:43:15 +00:00
extern int multi_defining_message ;
2010-03-31 09:18:28 +00:00
extern int multi_message_input_sub ( int key ) ;
2006-03-20 16:43:15 +00:00
extern void multi_send_message_start ( ) ;
2011-01-14 13:29:36 +00:00
extern int multi_powerup_is_4pack ( int ) ;
2006-03-20 16:43:15 +00:00
extern void multi_message_feedback ( ) ;
2011-01-19 01:19:15 +00:00
extern int Bounty_target ;
2006-03-20 16:43:15 +00:00
2012-04-15 13:32:46 +00:00
extern bitmap_index multi_player_textures [ MAX_PLAYERS ] [ N_PLAYER_SHIP_TEXTURES ] ;
2006-03-20 16:43:15 +00:00
2013-04-08 10:46:05 +00:00
extern char * RankStrings [ ] ;
2013-02-21 00:20:26 +00:00
# define NETGAME_FLAG_CLOSED 1
# define NETGAME_FLAG_SHOW_ID 2
# define NETGAME_FLAG_SHOW_MAP 4
2006-03-20 16:43:15 +00:00
2013-02-21 00:20:26 +00:00
# define NETGAME_NAME_LEN 15
2006-03-20 16:43:15 +00:00
# define NETPLAYER_ORIG_SIZE 22
# define NETPLAYER_D1X_SIZE 22 /* D1X version removes last char from callsign */
2009-04-09 07:41:30 +00:00
int multi_i_am_master ( void ) ;
int multi_who_is_master ( void ) ;
2006-03-20 16:43:15 +00:00
void change_playernum_to ( int new_pnum ) ;
2011-01-14 13:29:36 +00:00
// Multiplayer powerup capping
extern void multi_powcap_count_powerups_in_mine ( void ) ;
extern void multi_powcap_cap_objects ( ) ;
extern void multi_do_powcap_update ( ) ;
extern void multi_send_powcap_update ( ) ;
2013-01-03 15:33:40 +00:00
extern void multi_send_kill_goal_counts ( ) ;
2011-01-14 13:29:36 +00:00
2009-11-24 09:48:53 +00:00
// Globals for protocol-bound Refuse-functions
extern char RefuseThisPlayer , WaitForRefuseAnswer , RefuseTeam , RefusePlayerName [ 12 ] ;
2010-12-10 23:18:03 +00:00
extern fix64 RefuseTimeLimit ;
2009-11-24 09:48:53 +00:00
# define REFUSE_INTERVAL (F1_0*8)
2009-03-20 12:10:38 +00:00
extern struct netgame_info Netgame ;
/*
* The Network Players structure
2011-09-13 23:15:20 +00:00
* Contains protocol - specific data with designated prefixes and general player - related data .
2009-03-20 12:10:38 +00:00
* Note that not all of these infos will be sent to other users - some are used and / or set locally , only .
*/
typedef struct netplayer_info
{
2011-09-13 23:15:20 +00:00
# if defined(USE_UDP)
2009-03-20 12:10:38 +00:00
union
{
2009-11-29 16:46:13 +00:00
# ifdef USE_UDP
2009-03-20 12:10:38 +00:00
struct
{
struct _sockaddr addr ; // IP address of this peer
2009-11-24 09:48:53 +00:00
ubyte isyou ; // This flag is set true while sending info to tell player his designated (re)join position
2009-03-20 12:10:38 +00:00
} udp ;
2009-11-29 16:46:13 +00:00
# endif
2009-03-20 12:10:38 +00:00
} protocol ;
2009-11-29 16:46:13 +00:00
# endif
2009-03-20 12:10:38 +00:00
char callsign [ CALLSIGN_LEN + 1 ] ;
sbyte connected ;
2009-11-24 09:48:53 +00:00
ubyte rank ;
2009-04-09 07:41:30 +00:00
fix ping ;
2010-12-10 23:18:03 +00:00
fix64 LastPacketTime ;
2009-03-20 12:10:38 +00:00
} __pack__ netplayer_info ;
/*
* The Network Game structure
2011-09-13 23:15:20 +00:00
* Contains protocol - specific data with designated prefixes and general game - related data .
2009-03-20 12:10:38 +00:00
* Note that not all of these infos will be sent to clients - some are used and / or set locally , only .
*/
2009-11-29 16:46:13 +00:00
typedef struct netgame_info
{
2011-09-13 23:15:20 +00:00
# if defined(USE_UDP)
2009-03-20 12:10:38 +00:00
union
{
2009-11-29 16:46:13 +00:00
# ifdef USE_UDP
2009-03-20 12:10:38 +00:00
struct
{
2011-05-04 22:16:35 +00:00
struct _sockaddr addr ; // IP address of this netgame's host
2011-11-02 00:04:38 +00:00
short program_iver [ 4 ] ; // IVER of program for version checking
2009-11-24 09:48:53 +00:00
sbyte valid ; // Status of Netgame info: -1 = Failed, Wrong version; 0 = No info, yet; 1 = Success
2010-12-22 13:53:23 +00:00
fix GameID ;
2009-03-20 12:10:38 +00:00
} udp ;
2009-11-29 16:46:13 +00:00
# endif
2009-03-20 12:10:38 +00:00
} protocol ;
2009-11-29 16:46:13 +00:00
# endif
2011-05-04 22:16:35 +00:00
struct netplayer_info players [ MAX_PLAYERS + 4 ] ;
2009-03-20 12:10:38 +00:00
char game_name [ NETGAME_NAME_LEN + 1 ] ;
char mission_title [ MISSION_NAME_LEN + 1 ] ;
char mission_name [ 9 ] ;
int levelnum ;
ubyte gamemode ;
2009-04-09 07:41:30 +00:00
ubyte RefusePlayers ;
2009-03-20 12:10:38 +00:00
ubyte difficulty ;
ubyte game_status ;
ubyte numplayers ;
ubyte max_numplayers ;
2009-11-24 09:48:53 +00:00
ubyte numconnected ;
2009-03-20 12:10:38 +00:00
ubyte game_flags ;
ubyte team_vector ;
u_int32_t AllowedItems ;
2011-01-14 16:56:14 +00:00
short Allow_marker_view ; // (unused in D1 - no markers in game)
short AlwaysLighting ; // (unused in D1 - cannot destroy lights after all)
2011-05-04 22:16:35 +00:00
short ShowEnemyNames ;
2011-04-22 15:14:27 +00:00
short BrightPlayers ;
short InvulAppear ;
2009-03-20 12:10:38 +00:00
char team_name [ 2 ] [ CALLSIGN_LEN + 1 ] ;
2011-05-04 22:16:35 +00:00
int locations [ MAX_PLAYERS ] ;
2009-03-20 12:10:38 +00:00
short kills [ MAX_PLAYERS ] [ MAX_PLAYERS ] ;
ushort segments_checksum ;
short team_kills [ 2 ] ;
short killed [ MAX_PLAYERS ] ;
short player_kills [ MAX_PLAYERS ] ;
2011-05-04 22:16:35 +00:00
int KillGoal ;
fix PlayTimeAllowed ;
fix level_time ;
int control_invul_time ;
int monitor_vector ;
int player_score [ MAX_PLAYERS ] ;
2009-03-20 12:10:38 +00:00
ubyte player_flags [ MAX_PLAYERS ] ;
short PacketsPerSec ;
2012-05-21 15:06:47 +00:00
ubyte ShortPackets ;
2009-11-29 16:46:13 +00:00
ubyte PacketLossPrevention ;
2011-01-14 18:48:36 +00:00
ubyte NoFriendlyFire ;
2011-04-05 00:24:30 +00:00
# ifdef USE_TRACKER
ubyte Tracker ;
# endif
2009-03-20 12:10:38 +00:00
} __pack__ netgame_info ;
2009-11-29 16:46:13 +00:00
# endif /* _MULTI_H */