#include "dnode.h"Functions | |
| ImplList (DNode) | |
| DNodeInfo | DNodeInfo_deserialize (Buffer buf) |
| Deserialize a Buffer into a List of DNodeInfo's. | |
| Buffer | ListDNodeInfo_serialize (ListDNodeInfo list) |
| Serialize a ListDNodeInfo to a buffer. | |
| ListDNodeInfo | ListDNodeInfo_deserialize (Buffer buf) |
| Deserialize a Buffer into a List of DNodeInfo's. | |
| Buffer | DNode_serialize (DNode dnode) |
| DNode | DNode_deserialize (Buffer buf) |
| Deserialize a Buffer into a DNode. | |
| Buffer | ListDNode_serialize (ListDNode list) |
| Serialize a List of DNode's into a Buffer. | |
| ListDNode | ListDNode_deserialize (Buffer buf) |
| Deserialize a Buffer into a List of DNode's. | |
| void | insert_into_dnode (IPv4 address, Port port) |
| INSERT into the DNode table. | |
| ListDNode | select_from_dnode (UUID *nid, IPv4 *address, Port *port) |
| SELECT from the DNode table. | |
| ListDNode | DNode_get_db (void) |
| Get the DNode table from the database. | |
| void | DNode_set_db (ListDNode dnodes) |
| Write the database with the List of DNode's. | |
| void | print_dnode (DNode dnode) |
| Print a DNode's data as a tuple. | |
| ListDNodeInfo | insert (ListDNodeInfo l, DNodeInfo a) |
| Insert a DNodeInfo into a ListDNodeInfo in a sorted fashion. | |
| ListDNodeInfo | sort (ListDNodeInfo l) |
| Sort a ListDNodeInfo depending on the sequence numbers of its entries. | |
| void DNode_set_db | ( | ListDNode | dnodes | ) |
Write the database with the List of DNode's.
| ImplList | ( | DNode | ) |
| ListDNodeInfo insert | ( | ListDNodeInfo | l, |
| DNodeInfo | a ) |
Insert a DNodeInfo into a ListDNodeInfo in a sorted fashion.
This is really just a helper function for sort(ListDNodeInfo l). Here is a Haskell implementation of it:
| l | the ListDNodeInfo that you want to insert into |
| a | the DNodeInfo that you want to insert |
INSERT into the DNode table.
| address | the URI address |
| port | the port of the connection |
| ListDNode ListDNode_deserialize | ( | Buffer | buf | ) |
| Buffer ListDNode_serialize | ( | ListDNode | list | ) |
Serialize a List of DNode's into a Buffer.
Caller must free memory in Buffer.buf.
| list | the List of DNode's that you want to serialize |
| ListDNodeInfo ListDNodeInfo_deserialize | ( | Buffer | buf | ) |
| Buffer ListDNodeInfo_serialize | ( | ListDNodeInfo | list | ) |
Serialize a ListDNodeInfo to a buffer.
| dinfo | the ListDNodeInfo you want to serialize |
| void print_dnode | ( | DNode | dnode | ) |
| ListDNodeInfo sort | ( | ListDNodeInfo | l | ) |
Sort a ListDNodeInfo depending on the sequence numbers of its entries.
| l | the ListDNodeInfo you want to sort |