struct host_graph {
	struct host* nodes[64];
	uint8_t node_count;
	struct host *self;
	uint8_t node_number; // <-- what is this?
};

struct host {
	/* GRAPH RELATED FIELDS */
	uint8_t is_enabled;
	struct host* edges[64];
	uint8_t edge_count;
	
	/* QUEUE RELATED FIELDS */
	double last_time;
	int last_sequence;
	
	/* FORWARDING TABLE RELATED FIELDS */
	struct host *next_hop;
	struct sockaddr_in address;
	
	/* INTERNALLY USED BY DIJKSTRAS */
	uint8_t number;
	char optimized;
	struct host * previous;
};

struct host_q_wrapper {
	struct host *host;
	struct host_q_wrapper *next;
	struct host_q_wrapper *prev;
};

struct host_q {
	struct host_q_wrapper *w_first;
	struct host_q_wrapper *w_last;
	struct host_q_wrapper *w_iter_current;
	struct host_q_wrapper *w_iter_next;
	struct packet *current;
	int length;
};
/* host_q stuff */
void host_q_new(struct host_q* host_q);
void host_q_enqueue(struct host_q* host_q, struct host* host);
void host_q__remove_current(struct host_q* host_q);
void host_q_reset_current(struct host_q* host_q);

void host_q_reset_iter(struct host_q* host_q);
struct host* host_q_next(struct host_q* host_q);

void host_init(struct host*);
struct host* host_q_fetch_or_make(struct host_q* q, struct sockaddr_in* addr);
struct host* host_q_peak(struct host_q* q);



void print_host(struct host* host);
