+GNUNET_NETWORK_STRUCT_BEGIN
+
+/**
+ * Information for each edge.
+ */
+struct EdgeInfo
+{
+ /**
+ * Index of the destination of this edge in the
+ * unique destinations array.
+ */
+ uint16_t destination_index GNUNET_PACKED;
+
+ /**
+ * Number of bytes the token for this edge takes in the
+ * token area.
+ */
+ uint16_t token_length GNUNET_PACKED;
+};
+
+
+/**
+ * @brief Block to announce a regex state.
+ */
+struct RegexBlock
+{
+
+ /**
+ * Length of the proof regex string.
+ */
+ uint16_t proof_len GNUNET_PACKED;
+
+ /**
+ * Is this state an accepting state?
+ */
+ int16_t is_accepting GNUNET_PACKED;
+
+ /**
+ * Number of edges parting from this state.
+ */
+ uint16_t num_edges GNUNET_PACKED;
+
+ /**
+ * Nubmer of unique destinations reachable from this state.
+ */
+ uint16_t num_destinations GNUNET_PACKED;
+
+ /* followed by 'struct GNUNET_HashCode[num_destinations]' */
+
+ /* followed by 'struct EdgeInfo[edge_destination_indices]' */
+
+ /* followed by 'char proof[n_proof]', NOT 0-terminated */
+
+ /* followed by 'char tokens[num_edges][edge_info[k].token_length]';
+ essentially all of the tokens one after the other in the
+ order of the edges; tokens are NOT 0-terminated */
+
+};
+
+
+GNUNET_NETWORK_STRUCT_END
+
+
+/**
+ * Test if this block is marked as being an accept state.
+ *
+ * @param block block to test
+ * @param size number of bytes in block
+ * @return #GNUNET_YES if the block is accepting, #GNUNET_NO if not
+ */
+int
+GNUNET_BLOCK_is_accepting (const struct RegexBlock *block,
+ size_t size)
+{
+ if (size < sizeof (struct RegexBlock))
+ {
+ GNUNET_break_op (0);
+ return GNUNET_SYSERR;
+ }
+ return ntohs (block->is_accepting);
+}
+