Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/proxy/src/lib/network/netdefs.h @ 9465

Last change on this file since 9465 was 9458, checked in by patrick, 18 years ago

switching to new permission system, first step

File size: 2.8 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11### File Specific:
12   main-programmer: Christoph Renner rennerc@ee.ethz.ch
13   co-programmer:   Patrick Boenzli  boenzlip@orxonox.ethz.ch
14
15     June 2006: finishing work on the network stream for pps presentation (rennerc@ee.ethz.ch)
16     July 2006: some code rearangement and integration of the proxy server mechanism (boenzlip@ee.ethz.ch)
17*/
18
19/*!
20 * @file network_manager.h
21 *  Main interface for the network module. Manages all the modules
22 */
23
24#ifndef _NETDEFS_H
25#define _NETDEFS_H
26
27#include "nettypes.h"
28#include "netincl.h"
29
30
31
32//!< the amount of slots used before a proxy server is activated
33#define NET_CONNECTION_SATURATION 0.75
34
35//!< network polling frequency
36#define NETWORK_FREQUENCY 66
37
38
39//!< orxonox protocol id
40#define _ORXONOX_ID        0xF91337A0
41//!< orxonox network version identifier
42#define _ORXONOX_VERSION   1
43
44
45
46
47//!< enum indicating the type of the node
48typedef enum {
49  NET_MASTER_SERVER,
50  NET_PROXY_SERVER_ACTIVE,
51  NET_PROXY_SERVER_PASSIVE,
52  NET_CLIENT,
53
54  NET_NR_TYPES
55
56} NodeType;
57
58
59//!< enum indicating the type of the network connection (2 protocols supported)
60typedef enum ConnectionType {
61  NET_UDP = 0,
62  NET_TCP
63};
64
65
66//!< the type of the unique id (special number never used elsewhere)
67typedef enum {
68  NET_UID_UNASSIGNED = -1,
69
70  NET_UID_HANDSHAKE  =  0,
71
72
73  NET_UID_NUMBER
74} UidType;
75
76
77//!< the network id list
78typedef enum nodeId {
79  NET_ID_UNASSIGNED       =-1,
80
81  NET_ID_MASTER_SERVER    = 0,
82
83  NET_ID_PROXY_SERVER_01  = 1,
84  NET_ID_PROXY_SERVER_02,
85  NET_ID_PROXY_SERVER_03,
86  NET_ID_PROXY_SERVER_04,
87  NET_ID_PROXY_SERVER_05,
88  NET_ID_PROXY_SERVER_06,
89  NET_ID_PROXY_SERVER_07,
90  NET_ID_PROXY_SERVER_08  = 8,
91
92  NET_ID_PROXY_MAX        = 8,
93
94  NET_ID_CLIENT_01        = 9,
95  NET_ID_CLIENT_02,
96  NET_ID_CLIENT_03,
97  NET_ID_CLIENT_04,
98  NET_ID_CLIENT_05,
99  NET_ID_CLIENT_06,
100  NET_ID_CLIENT_07,
101  NET_ID_CLIENT_08,
102  NET_ID_CLIENT_09,
103  NET_ID_CLIENT_10,
104  NET_ID_CLIENT_11,
105  NET_ID_CLIENT_12,
106  NET_ID_CLIENT_13,
107  NET_ID_CLIENT_14,
108  NET_ID_CLIENT_15,
109  NET_ID_CLIENT_16,
110  NET_ID_CLIENT_17,
111  NET_ID_CLIENT_18,
112  NET_ID_CLIENT_19,
113  NET_ID_CLIENT_20,
114  NET_ID_CLIENT_21,
115  NET_ID_CLIENT_22,
116  NET_ID_CLIENT_23,
117  NET_ID_CLIENT_24,
118  NET_ID_CLIENT_25,
119  NET_ID_CLIENT_26,
120  NET_ID_CLIENT_27,
121  NET_ID_CLIENT_28,
122  NET_ID_CLIENT_29,
123  NET_ID_CLIENT_30,
124  NET_ID_CLIENT_31,
125  NET_ID_CLIENT_32,
126  NET_ID_CLIENT_33,
127  NET_ID_CLIENT_34,
128  NET_ID_CLIENT_35,
129  NET_ID_CLIENT_36,
130  NET_ID_CLIENT_37,
131  NET_ID_CLIENT_38,
132  NET_ID_CLIENT_39,
133  NET_ID_CLIENT_40,
134
135  NET_ID_CLIENT_MAX        = 40
136};
137#endif /* _NETDEFS_H */
Note: See TracBrowser for help on using the repository browser.