diff options
author | Bart Polot <bart@net.in.tum.de> | 2012-06-24 22:01:52 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2012-06-24 22:01:52 +0000 |
commit | 5920d1117915fdcfe9460ea04e7d61b7118038ed (patch) | |
tree | 107b83e18195d638c03aea296bc93912f44cab53 /src/include/block_mesh.h | |
parent | 5e5ebac9bfdb28725e7ba1f32bc0482657ebc1fa (diff) | |
download | gnunet-5920d1117915fdcfe9460ea04e7d61b7118038ed.tar.gz gnunet-5920d1117915fdcfe9460ea04e7d61b7118038ed.zip |
- more mesh/regex integration: basic announce completed, lookup started, wip
Diffstat (limited to 'src/include/block_mesh.h')
-rw-r--r-- | src/include/block_mesh.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/include/block_mesh.h b/src/include/block_mesh.h index 6be5b1920..ef5979da2 100644 --- a/src/include/block_mesh.h +++ b/src/include/block_mesh.h | |||
@@ -46,4 +46,74 @@ struct PBlock | |||
46 | GNUNET_MESH_ApplicationType type; | 46 | GNUNET_MESH_ApplicationType type; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | /** | ||
50 | * @brief A MeshRegexBlock contains one or more of this struct in the payload. | ||
51 | */ | ||
52 | struct MeshRegexEdge | ||
53 | { | ||
54 | /** | ||
55 | * Destination of this edge. | ||
56 | */ | ||
57 | struct GNUNET_HashCode key; | ||
58 | |||
59 | /** | ||
60 | * Length of the token towards the new state. | ||
61 | */ | ||
62 | unsigned int n_token; | ||
63 | |||
64 | /* char token[n_token] */ | ||
65 | }; | ||
66 | |||
67 | /** | ||
68 | * @brief Block to announce a regex state. | ||
69 | */ | ||
70 | struct MeshRegexBlock | ||
71 | { | ||
72 | /** | ||
73 | * The key of the state. | ||
74 | */ | ||
75 | struct GNUNET_HashCode key; | ||
76 | |||
77 | /** | ||
78 | * Length of the proof regex string.. | ||
79 | */ | ||
80 | unsigned int n_proof; | ||
81 | |||
82 | /** | ||
83 | * Numer of edges parting from this state. | ||
84 | */ | ||
85 | unsigned int n_edges; | ||
86 | |||
87 | /** | ||
88 | * Is this state an accepting state? | ||
89 | */ | ||
90 | int accepting; | ||
91 | |||
92 | /* char proof[n_proof] */ | ||
93 | /* struct MeshEdge edges[n_edges] */ | ||
94 | }; | ||
95 | |||
96 | /** | ||
97 | * @brief Block to announce a peer accepting a state. | ||
98 | */ | ||
99 | struct MeshRegexAccept | ||
100 | { | ||
101 | /** | ||
102 | * The key of the state. | ||
103 | */ | ||
104 | struct GNUNET_HashCode key; | ||
105 | |||
106 | /** | ||
107 | * Length of the proof regex string. | ||
108 | * FIXME necessary??? | ||
109 | * already present in the leading MeshRegexBlock | ||
110 | */ | ||
111 | // unsigned int n_proof; | ||
112 | |||
113 | /** | ||
114 | * The identity of the peer accepting the state | ||
115 | */ | ||
116 | struct GNUNET_PeerIdentity id; | ||
117 | |||
118 | }; | ||
49 | #endif \ No newline at end of file | 119 | #endif \ No newline at end of file |