00001 #ifndef __HEADERS_H 00002 #define __HEADERS_H 00003 00004 #ifdef WIN32 00005 00006 // this is to disable stupid warnings about STL objects inside of STL objects. 00007 // WARNING: this will also not allow the STL object to expand in the debugger window 00008 #pragma warning (disable : 4786) 00009 00010 #include <conio.h> 00011 #include <direct.h> // _rmdir and _mkdir needs this header file. 00012 00013 // winsock2 must come first, otherwise if another header file 00014 // includes windows.h, winsock.h will be included first and we will get all 00015 // sorts of compile errors. 00016 #include <winsock2.h> 00017 00018 #endif // #ifdef WIN32 00019 00020 // 00021 // Common to all architectures 00022 // 00023 #include <stdio.h> 00024 #include <stdlib.h> 00025 #include <memory.h> 00026 #include <sys/stat.h> 00027 #include <iomanip.h> 00028 #include <assert.h> 00029 #include <fstream.h> 00030 #include <errno.h> 00031 #include <signal.h> 00032 #include <pthread.h> 00033 #include <fcntl.h> 00034 00035 // 00036 // STL includes 00037 // 00038 #include <iostream> 00039 #include <string> 00040 #include <sstream> 00041 00042 // 00043 // Linux 00044 // 00045 #ifdef LINUX 00046 #include <sys/types.h> 00047 #include <sys/socket.h> // for basic socket definitions, also for AF_INET 00048 #include <netinet/in.h> // for sockaddr_in{} and other Internet defs 00049 #include <arpa/inet.h> 00050 #include <string.h> 00051 #include <netdb.h> // for hostent 00052 #include <unistd.h> 00053 #include <sys/mman.h> 00054 #include <sys/time.h> 00055 #include <ctype.h> 00056 #include <stdarg.h> 00057 #endif 00058 00059 // 00060 // Windows 00061 // 00062 #ifdef WIN32 00063 #include <windows.h> 00064 #include <time.h> 00065 #include <sys/timeb.h> 00066 #include <sys/types.h> 00067 #include <io.h> 00068 #include <winbase.h> 00069 #include <winnt.h> 00070 #endif 00071 00072 // --------------------------------- 00073 // Application specific header files 00074 // --------------------------------- 00075 00076 // 00077 // Global headers useful to all 00078 // 00079 #include "GlobalConstants.h" 00080 #include "debug.h" 00081 #include "os_spec.h" 00082 #include "StaticFunctions.h" 00083 #include "BasicObject.h" 00084 #include "GlobalObjects.h" 00085 #include "config.h" 00086 00087 // 00088 // Utilities 00089 // 00090 #include "ThreadMessageQueue.h" 00091 #include "Mutex.h" 00092 #include "Guard.h" 00093 #include "Condition.h" 00094 #include "ScopedBool.h" 00095 #include "Timer.h" 00096 #include "TimerNode.h" 00097 #include "CallbackTimer.h" 00098 #include "IpAddress.h" 00099 #include "SocketAddress.h" 00100 #include "TimeValue.h" 00101 #include "randomc.h" 00102 00103 // 00104 // SSL stuff 00105 // 00106 #include "finalize.h" 00107 #include "sslutils.h" 00108 #include "Ssl.h" 00109 #include "SslCtx.h" 00110 #include "Cert.h" 00111 #include "Rsa.h" 00112 #include "Des.h" 00113 00114 // 00115 // Layer 2: Link 00116 // 00117 #include "LinkLayerInterface.h" 00118 #include "ConnectionTableEntry.h" 00119 #include "Node.h" 00120 #include "Interfaces.h" 00121 #include "TcpConnection.h" 00122 #include "SslConnection.h" 00123 00124 // 00125 // Layer 3: Network 00126 // 00127 #include "catcher.h" 00128 #include "NpPacket.h" 00129 #include "ConnectionPacket.h" 00130 #include "ImHerePacket.h" 00131 #include "DiscoveryPacket.h" 00132 #include "FinPacket.h" 00133 #include "PriorityPacketQueue.h" 00134 #include "LiveBroadcastTable.h" 00135 #include "PacketInfo.h" 00136 #include "NetworkLayer.h" 00137 00138 // 00139 // Layer 4: Transport 00140 // 00141 #include "TpPacket.h" 00142 #include "SAR.h" 00143 #include "WindowPosition.h" 00144 #include "SendWindow.h" 00145 #include "ReceiveWindow.h" 00146 #include "ServiceEntry.h" 00147 #include "ServiceTable.h" 00148 #include "TransportLayer.h" 00149 00150 // 00151 // Layer 5 : Application 00152 // 00153 #include "main.h" 00154 #include "WebServer.h" 00155 #include "PeekabootyApp.h" 00156 #include "VisualizerFrame.h" 00157 #include "VisualizerThread.h" 00158 #include "VisualizerNode.h" 00159 #include "VisualizerListener.h" 00160 00161 // 00162 // Interfaces 00163 // 00164 #include "ConnectionInterface.h" 00165 #include "ObservableInterface.h" 00166 #include "ListenerInterface.h" 00167 #include "PacketHandlerInterface.h" 00168 //#include "NetworkLayerListener.h" 00169 #include "PacketWriter.h" 00170 00171 // 00172 // The command subsystem 00173 // 00174 #include "CommandParser.h" 00175 #include "CommandProcessor.h" 00176 #include "ProxyCommandProcessor.h" 00177 #include "ProxyParser.h" 00178 #include "HttpTestInterfaceParser.h" 00179 #include "HttpTestCommandProcessor.h" 00180 #ifdef TEST 00181 #include "CliParser.h" 00182 #include "FileHandleCommandProcessor.h" 00183 #endif 00184 00185 // 00186 // The command base 00187 // 00188 #include "Command.h" 00189 #include "NullCommand.h" 00190 #include "MetaCommand.h" 00191 #include "ExitCommand.h" 00192 #include "ProxyRequestCommand.h" 00193 00194 // 00195 // User Configuration Screens 00196 // 00197 #include "UserConfiguration.h" 00198 #include "SummaryScreenCommand.h" 00199 #include "ConnectionManagerCommand.h" 00200 #include "BasicConfigurationCommand.h" 00201 #include "AdvancedConfigurationCommand.h" 00202 #include "NodeManagerCommand.h" 00203 00204 // 00205 // All the commands for testing purposes 00206 // 00207 #ifdef TEST 00208 #include "LinkLayerCommand.h" 00209 #include "NetworkLayerCommand.h" 00210 #include "CatcherCommand.h" 00211 #include "ConfigureCommand.h" 00212 #include "HelpCommand.h" 00213 #include "InterfaceCommand.h" 00214 #include "HttpTestProcessorCommand.h" 00215 #include "ServiceTableCommand.h" 00216 #include "ClientTestCommand.h" 00217 #include "ServiceEntryCommand.h" 00218 #include "TimerCommand.h" 00219 #include "WindowPositionCommand.h" 00220 #include "TpPacketCommand.h" 00221 #include "HttpTestPageCommand.h" 00222 #include "LiveBroadcastTableCommand.h" 00223 #include "NodeCommand.h" 00224 #include "VirtualCircuitTableCommand.h" 00225 #include "NpPacketCommand.h" 00226 #include "PriorityPacketQueueCommand.h" 00227 #include "TransportLayerCommand.h" 00228 #include "SarCommand.h" 00229 #include "PacketWriterTest.h" 00230 #include "ThreadMessageQueueCommand.h" 00231 #include "WebServerCommand.h" 00232 #include "SocketAddressCommand.h" 00233 #include "DesCommand.h" 00234 #include "RsaCommand.h" 00235 #include "CertCommand.h" 00236 #endif 00237 00238 // 00239 // A workaround to fix "showpoint" and "fixed" in ostream 00240 // 00241 #if !defined(WIN32) && !defined(showpoint) 00242 #define showpoint _IO_SHOWPOINT 00243 #endif 00244 #if !defined(WIN32) && !defined(fixed) 00245 #define fixed _IO_FIXED 00246 #endif 00247 00248 using namespace std; 00249 00250 #endif