/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Christoph Renner rennerc@ee.ethz.ch co-programmer: Patrick Boenzli boenzlip@orxonox.ethz.ch June 2006: finishing work on the network stream for pps presentation (rennerc@ee.ethz.ch) July 2006: some code rearangement and integration of the proxy server mechanism (boenzlip@ee.ethz.ch) */ /*! * @file network_manager.h * Main interface for the network module. Manages all the modules */ #ifndef _NETDEFS_H #define _NETDEFS_H #include "nettypes.h" #include "netincl.h" //!< the amount of slots used before a proxy server is activated #define NET_CONNECTION_SATURATION 0.75 //!< network polling frequency #define NETWORK_FREQUENCY 66 //!< orxonox protocol id #define _ORXONOX_ID 0xF91337A0 //!< orxonox network version identifier #define _ORXONOX_VERSION 1 //!< enum indicating the type of the node typedef enum { NET_MASTER_SERVER, NET_PROXY_SERVER_ACTIVE, NET_PROXY_SERVER_PASSIVE, NET_CLIENT, NET_NR_TYPES } NodeType; //!< enum indicating the type of the network connection (2 protocols supported) typedef enum ConnectionType { NET_UDP = 0, NET_TCP }; //!< the type of the unique id (special number never used elsewhere) typedef enum { NET_UID_UNASSIGNED = -1, NET_UID_HANDSHAKE = 0, NET_UID_NUMBER } UidType; //!< the network id list typedef enum nodeId { NET_ID_UNASSIGNED =-1, NET_ID_MASTER_SERVER = 0, NET_ID_PROXY_SERVER_01 = 1, NET_ID_PROXY_SERVER_02, NET_ID_PROXY_SERVER_03, NET_ID_PROXY_SERVER_04, NET_ID_PROXY_SERVER_05, NET_ID_PROXY_SERVER_06, NET_ID_PROXY_SERVER_07, NET_ID_PROXY_SERVER_08 = 8, NET_ID_PROXY_MAX = 8, NET_ID_CLIENT_01 = 9, NET_ID_CLIENT_02, NET_ID_CLIENT_03, NET_ID_CLIENT_04, NET_ID_CLIENT_05, NET_ID_CLIENT_06, NET_ID_CLIENT_07, NET_ID_CLIENT_08, NET_ID_CLIENT_09, NET_ID_CLIENT_10, NET_ID_CLIENT_11, NET_ID_CLIENT_12, NET_ID_CLIENT_13, NET_ID_CLIENT_14, NET_ID_CLIENT_15, NET_ID_CLIENT_16, NET_ID_CLIENT_17, NET_ID_CLIENT_18, NET_ID_CLIENT_19, NET_ID_CLIENT_20, NET_ID_CLIENT_21, NET_ID_CLIENT_22, NET_ID_CLIENT_23, NET_ID_CLIENT_24, NET_ID_CLIENT_25, NET_ID_CLIENT_26, NET_ID_CLIENT_27, NET_ID_CLIENT_28, NET_ID_CLIENT_29, NET_ID_CLIENT_30, NET_ID_CLIENT_31, NET_ID_CLIENT_32, NET_ID_CLIENT_33, NET_ID_CLIENT_34, NET_ID_CLIENT_35, NET_ID_CLIENT_36, NET_ID_CLIENT_37, NET_ID_CLIENT_38, NET_ID_CLIENT_39, NET_ID_CLIENT_40, NET_ID_CLIENT_MAX = 40 }; #endif /* _NETDEFS_H */