Commit 4ebf4c38 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Add places to cache information about buffering to network structure.

parent 21bdbeaf
......@@ -64,14 +64,8 @@ add_network(char *ifname)
return NULL;
memset(net, 0, sizeof(struct network));
net->up = 0;
net->ifindex = 0;
net->ipv4 = NULL;
net->activity_time = now.tv_sec;
net->bufsize = 0;
strncpy(net->ifname, ifname, IF_NAMESIZE);
net->sendbuf = NULL;
net->buffered = 0;
net->bucket_time = now.tv_sec;
net->bucket = BUCKET_TOKENS_MAX;
net->hello_seqno = (random() & 0xFFFF);
......
......@@ -39,6 +39,13 @@ struct network {
int buffered;
struct timeval flush_timeout;
int bufsize;
int have_buffered_hello;
int have_buffered_id;
int have_buffered_nh;
int have_buffered_prefix;
unsigned char buffered_id[16];
unsigned char buffered_nh[4];
unsigned char buffered_prefix[16];
unsigned char *sendbuf;
time_t bucket_time;
unsigned int bucket;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment