summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2017-01-09 16:40:40 +0100
committerSander Vrijders <sander.vrijders@intec.ugent.be>2017-01-09 16:40:40 +0100
commit6c1cfb990f56b2fa87500732cb4f0966616907c7 (patch)
tree4af3a0e2ce9fc12d7dc759803da70b7f570d6f8a /src/ipcpd
parente56d24010287127fc6b9c9da8d1f7cf160c50253 (diff)
parent5273b0f5915956e49bcad4167cca2c1349e8816d (diff)
downloadouroboros-6c1cfb990f56b2fa87500732cb4f0966616907c7.tar.gz
ouroboros-6c1cfb990f56b2fa87500732cb4f0966616907c7.zip
Merged in dstaesse/ouroboros/be-list (pull request #340)
Updates to list and fixes LGPL license for library
Diffstat (limited to 'src/ipcpd')
-rw-r--r--src/ipcpd/ipcp-data.c10
-rw-r--r--src/ipcpd/ipcp-data.h2
-rw-r--r--src/ipcpd/ipcp-ops.h2
-rw-r--r--src/ipcpd/local/main.c2
-rw-r--r--src/ipcpd/normal/addr_auth.c2
-rw-r--r--src/ipcpd/normal/addr_auth.h2
-rw-r--r--src/ipcpd/normal/crc32.c2
-rw-r--r--src/ipcpd/normal/crc32.h2
-rw-r--r--src/ipcpd/normal/dir.h2
-rw-r--r--src/ipcpd/normal/dt_const.h2
-rw-r--r--src/ipcpd/normal/flow_alloc.proto2
-rw-r--r--src/ipcpd/normal/frct.h2
-rw-r--r--src/ipcpd/normal/pathname.c2
-rw-r--r--src/ipcpd/normal/pathname.h2
-rw-r--r--src/ipcpd/normal/pff.c2
-rw-r--r--src/ipcpd/normal/pff.h2
-rw-r--r--src/ipcpd/normal/pol/flat.c2
-rw-r--r--src/ipcpd/normal/pol/flat.h2
-rw-r--r--src/ipcpd/normal/ribmgr.c14
-rw-r--r--src/ipcpd/normal/ro.proto2
-rw-r--r--src/ipcpd/normal/shm_pci.c2
-rw-r--r--src/ipcpd/normal/shm_pci.h2
-rw-r--r--src/ipcpd/normal/static_info.proto2
-rw-r--r--src/ipcpd/shim-eth-llc/main.c2
-rw-r--r--src/ipcpd/shim-eth-llc/shim_eth_llc_messages.proto2
-rw-r--r--src/ipcpd/shim-udp/shim_udp_config.h.in2
-rw-r--r--src/ipcpd/shim-udp/shim_udp_messages.proto2
-rw-r--r--src/ipcpd/shim-udp/tests/shim_udp_test.c2
-rw-r--r--src/ipcpd/tests/timerwheel_test.c2
-rw-r--r--src/ipcpd/timerwheel.c6
-rw-r--r--src/ipcpd/timerwheel.h2
31 files changed, 43 insertions, 43 deletions
diff --git a/src/ipcpd/ipcp-data.c b/src/ipcpd/ipcp-data.c
index 132684c2..47c4c472 100644
--- a/src/ipcpd/ipcp-data.c
+++ b/src/ipcpd/ipcp-data.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* IPC process utilities
*
@@ -119,9 +119,9 @@ struct ipcp_data * ipcp_data_init(struct ipcp_data * dst,
dst->dif_name = NULL;
/* init the lists */
- INIT_LIST_HEAD(&dst->registry);
- INIT_LIST_HEAD(&dst->directory);
- INIT_LIST_HEAD(&dst->dir_queries);
+ list_head_init(&dst->registry);
+ list_head_init(&dst->directory);
+ list_head_init(&dst->dir_queries);
/* init the locks */
pthread_rwlock_init(&dst->reg_lock, NULL);
@@ -437,7 +437,7 @@ struct dir_query * ipcp_data_dir_query_create(char * name)
pthread_cond_init(&query->cond, &cattr);
pthread_mutex_init(&query->lock, NULL);
- INIT_LIST_HEAD(&query->next);
+ list_head_init(&query->next);
return query;
}
diff --git a/src/ipcpd/ipcp-data.h b/src/ipcpd/ipcp-data.h
index 71dbcdbd..877aa04a 100644
--- a/src/ipcpd/ipcp-data.h
+++ b/src/ipcpd/ipcp-data.h
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Utitilies for building IPC processes
*
diff --git a/src/ipcpd/ipcp-ops.h b/src/ipcpd/ipcp-ops.h
index d780c6dc..6a42ec5c 100644
--- a/src/ipcpd/ipcp-ops.h
+++ b/src/ipcpd/ipcp-ops.h
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* IPC process ops
*
diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c
index 01e58b91..58949aea 100644
--- a/src/ipcpd/local/main.c
+++ b/src/ipcpd/local/main.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Local IPC process
*
diff --git a/src/ipcpd/normal/addr_auth.c b/src/ipcpd/normal/addr_auth.c
index 4f7a5a85..a4084ac5 100644
--- a/src/ipcpd/normal/addr_auth.c
+++ b/src/ipcpd/normal/addr_auth.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Address authority
*
diff --git a/src/ipcpd/normal/addr_auth.h b/src/ipcpd/normal/addr_auth.h
index 521cfe50..8d67bc66 100644
--- a/src/ipcpd/normal/addr_auth.h
+++ b/src/ipcpd/normal/addr_auth.h
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Address authority
*
diff --git a/src/ipcpd/normal/crc32.c b/src/ipcpd/normal/crc32.c
index 10b9b5f0..98c91fb8 100644
--- a/src/ipcpd/normal/crc32.c
+++ b/src/ipcpd/normal/crc32.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* 32-bit Cyclic Redundancy Check
*
diff --git a/src/ipcpd/normal/crc32.h b/src/ipcpd/normal/crc32.h
index 080451a4..8580e553 100644
--- a/src/ipcpd/normal/crc32.h
+++ b/src/ipcpd/normal/crc32.h
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* 32-bit Cyclic Redundancy Check
*
diff --git a/src/ipcpd/normal/dir.h b/src/ipcpd/normal/dir.h
index 18e6441e..867cb87a 100644
--- a/src/ipcpd/normal/dir.h
+++ b/src/ipcpd/normal/dir.h
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* DIF directory
*
diff --git a/src/ipcpd/normal/dt_const.h b/src/ipcpd/normal/dt_const.h
index 55d5067e..c94e9395 100644
--- a/src/ipcpd/normal/dt_const.h
+++ b/src/ipcpd/normal/dt_const.h
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Data Transfer Constants for the IPCP
*
diff --git a/src/ipcpd/normal/flow_alloc.proto b/src/ipcpd/normal/flow_alloc.proto
index 02be47a0..16e8be2c 100644
--- a/src/ipcpd/normal/flow_alloc.proto
+++ b/src/ipcpd/normal/flow_alloc.proto
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Flow allocation message
*
diff --git a/src/ipcpd/normal/frct.h b/src/ipcpd/normal/frct.h
index 39c47cdd..462b8cc3 100644
--- a/src/ipcpd/normal/frct.h
+++ b/src/ipcpd/normal/frct.h
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* The Flow and Retransmission control component
*
diff --git a/src/ipcpd/normal/pathname.c b/src/ipcpd/normal/pathname.c
index cf6e08b0..d6d4fd79 100644
--- a/src/ipcpd/normal/pathname.c
+++ b/src/ipcpd/normal/pathname.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Functions to construct pathnames
*
diff --git a/src/ipcpd/normal/pathname.h b/src/ipcpd/normal/pathname.h
index dc91b7d9..1d7fffa2 100644
--- a/src/ipcpd/normal/pathname.h
+++ b/src/ipcpd/normal/pathname.h
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Functions to construct pathnames
*
diff --git a/src/ipcpd/normal/pff.c b/src/ipcpd/normal/pff.c
index 513f54b7..2f7d554b 100644
--- a/src/ipcpd/normal/pff.c
+++ b/src/ipcpd/normal/pff.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* PDU Forwarding Function
*
diff --git a/src/ipcpd/normal/pff.h b/src/ipcpd/normal/pff.h
index b6b475cc..b4a1400b 100644
--- a/src/ipcpd/normal/pff.h
+++ b/src/ipcpd/normal/pff.h
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* PDU Forwarding Function
*
diff --git a/src/ipcpd/normal/pol/flat.c b/src/ipcpd/normal/pol/flat.c
index 13eaf215..abcb1ad4 100644
--- a/src/ipcpd/normal/pol/flat.c
+++ b/src/ipcpd/normal/pol/flat.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Policy for flat addresses in a distributed way
*
diff --git a/src/ipcpd/normal/pol/flat.h b/src/ipcpd/normal/pol/flat.h
index 7661500b..73d7de8b 100644
--- a/src/ipcpd/normal/pol/flat.h
+++ b/src/ipcpd/normal/pol/flat.h
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Policy for flat addresses in a distributed way
*
diff --git a/src/ipcpd/normal/ribmgr.c b/src/ipcpd/normal/ribmgr.c
index e52db08a..6356d48c 100644
--- a/src/ipcpd/normal/ribmgr.c
+++ b/src/ipcpd/normal/ribmgr.c
@@ -471,9 +471,9 @@ static int write_ro_msg(struct cdap * neighbor,
int ribmgr_init()
{
- INIT_LIST_HEAD(&rib.flows);
- INIT_LIST_HEAD(&rib.subs);
- INIT_LIST_HEAD(&rib.ro_ids);
+ list_head_init(&rib.flows);
+ list_head_init(&rib.subs);
+ list_head_init(&rib.ro_ids);
rib.root = malloc(sizeof(*(rib.root)));
if (rib.root == NULL)
@@ -993,7 +993,7 @@ static int ro_id_create(char * name, ro_msg_t * msg)
tmp->seqno = msg->seqno;
tmp->full_name = strdup(name);
- INIT_LIST_HEAD(&tmp->next);
+ list_head_init(&tmp->next);
if (tmp->full_name == NULL) {
free(tmp);
@@ -1154,7 +1154,7 @@ static int ribmgr_add_flow(int fd)
return -1;
}
- INIT_LIST_HEAD(&flow->next);
+ list_head_init(&flow->next);
flow->instance = instance;
flow->fd = fd;
@@ -1310,7 +1310,7 @@ int ribmgr_enrol()
pthread_rwlock_wrlock(&rib.flows_lock);
- assert(!list_empty(&rib.flows));
+ assert(!list_is_empty(&rib.flows));
flow = list_first_entry((&rib.flows), struct mgmt_flow, next);
instance = flow->instance;
@@ -1631,7 +1631,7 @@ int ro_subscribe(const char * name, struct ro_sub_ops * ops)
if (sub == NULL)
return -ENOMEM;
- INIT_LIST_HEAD(&sub->next);
+ list_head_init(&sub->next);
sub->name = strdup(name);
if (sub->name == NULL) {
diff --git a/src/ipcpd/normal/ro.proto b/src/ipcpd/normal/ro.proto
index 308bfe19..cceaae7c 100644
--- a/src/ipcpd/normal/ro.proto
+++ b/src/ipcpd/normal/ro.proto
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* RIB object message
*
diff --git a/src/ipcpd/normal/shm_pci.c b/src/ipcpd/normal/shm_pci.c
index ed6bf184..c648618a 100644
--- a/src/ipcpd/normal/shm_pci.c
+++ b/src/ipcpd/normal/shm_pci.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Protocol Control Information in Shared Memory Map
*
diff --git a/src/ipcpd/normal/shm_pci.h b/src/ipcpd/normal/shm_pci.h
index d239b535..c1d823bf 100644
--- a/src/ipcpd/normal/shm_pci.h
+++ b/src/ipcpd/normal/shm_pci.h
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Protocol Control Information in Shared Memory Map
*
diff --git a/src/ipcpd/normal/static_info.proto b/src/ipcpd/normal/static_info.proto
index b265d6e4..18f02e36 100644
--- a/src/ipcpd/normal/static_info.proto
+++ b/src/ipcpd/normal/static_info.proto
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Static information message
*
diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c
index 623f2071..0ff8007b 100644
--- a/src/ipcpd/shim-eth-llc/main.c
+++ b/src/ipcpd/shim-eth-llc/main.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Shim IPC process over Ethernet with LLC
*
diff --git a/src/ipcpd/shim-eth-llc/shim_eth_llc_messages.proto b/src/ipcpd/shim-eth-llc/shim_eth_llc_messages.proto
index 63ab4519..cedb0fd4 100644
--- a/src/ipcpd/shim-eth-llc/shim_eth_llc_messages.proto
+++ b/src/ipcpd/shim-eth-llc/shim_eth_llc_messages.proto
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Shim Ethernet with LLC message
*
diff --git a/src/ipcpd/shim-udp/shim_udp_config.h.in b/src/ipcpd/shim-udp/shim_udp_config.h.in
index fb223e13..c8d2ff18 100644
--- a/src/ipcpd/shim-udp/shim_udp_config.h.in
+++ b/src/ipcpd/shim-udp/shim_udp_config.h.in
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Configuration information specific for the shim UDP
*
diff --git a/src/ipcpd/shim-udp/shim_udp_messages.proto b/src/ipcpd/shim-udp/shim_udp_messages.proto
index cc535a60..75f0cb64 100644
--- a/src/ipcpd/shim-udp/shim_udp_messages.proto
+++ b/src/ipcpd/shim-udp/shim_udp_messages.proto
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Shim UDP message
*
diff --git a/src/ipcpd/shim-udp/tests/shim_udp_test.c b/src/ipcpd/shim-udp/tests/shim_udp_test.c
index b02da53d..a342712e 100644
--- a/src/ipcpd/shim-udp/tests/shim_udp_test.c
+++ b/src/ipcpd/shim-udp/tests/shim_udp_test.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Test of the Shim UDP IPCP Daemon
*
diff --git a/src/ipcpd/tests/timerwheel_test.c b/src/ipcpd/tests/timerwheel_test.c
index 05ab5027..486358f9 100644
--- a/src/ipcpd/tests/timerwheel_test.c
+++ b/src/ipcpd/tests/timerwheel_test.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Test of the timer wheel
*
diff --git a/src/ipcpd/timerwheel.c b/src/ipcpd/timerwheel.c
index 4ef7ce2f..bb61bd91 100644
--- a/src/ipcpd/timerwheel.c
+++ b/src/ipcpd/timerwheel.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Timerwheel
*
@@ -232,7 +232,7 @@ struct timerwheel * timerwheel_create(unsigned int resolution,
tw->intv.tv_sec = (tw->resolution / FRAC) / 1000;
tw->intv.tv_nsec = ((tw->resolution / FRAC) % 1000) * MILLION;
- INIT_LIST_HEAD(&tw->wq);
+ list_head_init(&tw->wq);
if (pthread_mutex_init(&tw->lock, NULL)) {
LOG_DBG("Could not init mutex.");
@@ -265,7 +265,7 @@ struct timerwheel * timerwheel_create(unsigned int resolution,
now.tv_nsec -= (now.tv_nsec % MILLION);
for (i = 0; i < tw->elements; ++i) {
- INIT_LIST_HEAD(&tw->wheel[i].funcs);
+ list_head_init(&tw->wheel[i].funcs);
tw->wheel[i].expiry = now;
ts_add(&now, &res_ts, &now);
}
diff --git a/src/ipcpd/timerwheel.h b/src/ipcpd/timerwheel.h
index d5bc853f..8ef9437c 100644
--- a/src/ipcpd/timerwheel.h
+++ b/src/ipcpd/timerwheel.h
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Ring buffer for incoming SDUs
*