Mixe for Privacy and Anonymity in the Internet
CADynamicCascadeConfigurator.hpp
Go to the documentation of this file.
1 #ifndef __CADYNAMICCASCADECONFIGURATOR__
2 #define __CADYNAMICCASCADECONFIGURATOR__
3 
4 #include "StdAfx.h"
5 #ifdef DYNAMIC_MIX
6 
7 #include "xml/DOM_Output.hpp"
8 #include "CASocketAddrINet.hpp"
9 #include "CAInfoServiceAware.hpp"
10 #include "CAInfoService.hpp"
11 
12 struct _proposer_t
13 {
14  struct _proposer_t* next;
15  UINT8* ski;
16 };
17 typedef struct _proposer_t PROPOSERENTRY;
18 typedef struct _proposer_t PROPOSERLIST;
19 
20 struct _proposal_t
21 {
22  struct _proposal_t* next;
23  PROPOSERLIST* proposers;
24  UINT8* proposal;
25  UINT32 count;
26  DOM_Node elem;
27 };
28 typedef struct _proposal_t PROPOSALENTRY;
29 typedef struct _proposal_t PROPOSALLIST;
30 
31 
32 #define MIN_MAJORITY_QUOTE(x) (UINT32)((2*x)/3)+1
33 #define MAX_CONTENT_LENGTH 0x00FFFF
34 
35 class CADynamicCascadeConfigurator : CAInfoServiceAware
36 {
37 
38 public:
39  CADynamicCascadeConfigurator(CASignature *a_pSignature, CAMix *a_pMix);
40 
41  ~CADynamicCascadeConfigurator();
42  SINT32 configure();
43 
44 
45 private:
46  PROPOSALLIST* m_proposals;
47  SINT32 getMajorityVote(UINT32 a_nrInfoServices, DOM_Node *&r_majorityElem, UINT8* r_strProposal);
48  SINT32 addProposal(DOM_Element a_elem);
49  PROPOSALENTRY *createProposal(UINT8* a_strProposal, UINT32 a_lenProposal, UINT8 *a_strProposer, UINT32 a_lenProposer, DOM_Element *a_elem);
50  SINT32 reconfigureMix(DOM_Node a_elemNewCascade, UINT8* a_strProposal);
51  CASignature *m_pSignature;
52  CAMix *m_pMix;
53 };
54 #endif //DYNAMIC_MIX
55 #endif
signed int SINT32
Definition: basetypedefs.h:132
unsigned char UINT8
Definition: basetypedefs.h:135
unsigned int UINT32
Definition: basetypedefs.h:131
Definition: CAMix.hpp:49