Mixe for Privacy and Anonymity in the Internet
CADynaNetworking.hpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2000, The JAP-Team
3 All rights reserved.
4 Redistribution and use in source and binary forms, with or without modification,
5 are permitted provided that the following conditions are met:
6 
7  - Redistributions of source code must retain the above copyright notice,
8  this list of conditions and the following disclaimer.
9 
10  - Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation and/or
12  other materials provided with the distribution.
13 
14  - Neither the name of the University of Technology Dresden, Germany nor the names of its contributors
15  may be used to endorse or promote products derived from this software without specific
16  prior written permission.
17 
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
20 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
22 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
27 */
28 #ifndef __CADYNANETWORKING__
29 #define __CADYNANETWORKING__
30 
31 #include "StdAfx.h"
32 
33 #ifdef DYNAMIC_MIX
34 
35 #include "CACmdLnOptions.hpp"
36 #include "CAListenerInterface.hpp"
37 #include "CASocketAddrINet.hpp"
38 #include "CAThread.hpp"
39 #include "CAInfoServiceAware.hpp"
40 
41 #define MAX_CONTENT_LENGTH 0x00FFFF
42 
43 class CADynaNetworking : CAInfoServiceAware
44  {
45  public:
46  CADynaNetworking();
47  ~CADynaNetworking();
48  SINT32 verifyConnectivity();
49  SINT32 updateNetworkConfiguration(UINT16 a_port);
50  CAListenerInterface *getWorkingListenerInterface();
51  private:
52  SINT32 resolveInternalIp(UINT8* r_strIp);
53  SINT32 resolveExternalIp(UINT8* r_strIp, UINT32 len);
54  SINT32 createListenerInterface(DOM_Element r_elemListeners, DOM_Document a_ownerDoc,const UINT8 *a_ip, UINT32 a_port, bool a_bHidden, bool a_bVirtual);
55  SINT32 createListenerInterface(DOM_Element r_elemListeners, DOM_Document a_ownerDoc);
56  SINT32 getInterfaceIp(UINT32* r_ip);
57  bool isInternalIp(UINT32 p_ip);
58  SINT32 sendConnectivityRequest(DOM_Element *r_elemRoot, UINT32 a_port);
59  };
60 #endif //DYNAMIC_MIX
61 #endif
unsigned short UINT16
Definition: basetypedefs.h:133
signed int SINT32
Definition: basetypedefs.h:132
unsigned char UINT8
Definition: basetypedefs.h:135
unsigned int UINT32
Definition: basetypedefs.h:131
UINT16 len
Definition: typedefs.hpp:0