We can't really add too many fields to the pmsg_t blocks we enqueue. However, what we do is we extend the pmsg_t to enrich them with a free routine, and we use that fact to be notified by the message queue when a message is freed. We can then probe into the flags to see whether it was sent.
But adding a free routine is about as much as we can do with a generic message system. To be able to keep track of more information about the queries we send, we associate each message with a structure containing meta-information about it.
Data Fields | |
| guint32 | hits |
| Amount of query hits held in message. | |
| dquery_t * | dq |
| The dynamic query that sent the query. | |
| guint32 | qid |
| Query ID of the dynamic query. | |
| guint32 | node_id |
| The ID of the node we sent it to. | |
| guint16 | degree |
| The advertised degree of the destination node. | |
| guint8 | ttl |
| The TTL used for that query. | |
|
|
The advertised degree of the destination node.
|
|
|
The dynamic query that sent the query.
|
|
|
Amount of query hits held in message.
|
|
|
The ID of the node we sent it to.
|
|
|
Query ID of the dynamic query.
|
|
|
The TTL used for that query.
|
1.3.6