diff --git a/dhcp6/Makefile.am b/dhcp6/Makefile.am index d840c3b89..4f90e0dc4 100644 --- a/dhcp6/Makefile.am +++ b/dhcp6/Makefile.am @@ -17,7 +17,6 @@ wickedd_dhcp6_LDADD = $(top_builddir)/src/libwicked.la wickedd_dhcp6_SOURCES = \ dbus-api.c \ device.c \ - duid.c \ fsm.c \ main.c \ protocol.c \ @@ -27,7 +26,6 @@ EXTRA_DIST = \ dbus-api.h \ device.h \ dhcp6.h \ - duid.h \ fsm.h \ protocol.h diff --git a/dhcp6/device.c b/dhcp6/device.c index 08aca004d..2be546881 100644 --- a/dhcp6/device.c +++ b/dhcp6/device.c @@ -38,11 +38,10 @@ #include "dhcp6/dhcp6.h" #include "dhcp6/device.h" #include "dhcp6/protocol.h" -#include "dhcp6/duid.h" #include "dhcp6/fsm.h" - #include "appconfig.h" #include "util_priv.h" +#include "duid.h" /* diff --git a/dhcp6/fsm.c b/dhcp6/fsm.c index 4562f1192..19ded50cf 100644 --- a/dhcp6/fsm.c +++ b/dhcp6/fsm.c @@ -33,8 +33,9 @@ #include "dhcp6/dhcp6.h" #include "dhcp6/device.h" #include "dhcp6/protocol.h" -#include "dhcp6/duid.h" #include "dhcp6/fsm.h" +#include "duid.h" + struct ni_dhcp6_message { struct in6_addr sender; diff --git a/dhcp6/main.c b/dhcp6/main.c index 1a2dc3996..3023fe901 100644 --- a/dhcp6/main.c +++ b/dhcp6/main.c @@ -42,7 +42,8 @@ #include #include "dhcp6/dbus-api.h" -#include "dhcp6/duid.h" +#include "duid.h" + #define CONFIG_DHCP6_STATE_FILE "dhcp6-state.xml" diff --git a/dhcp6/protocol.c b/dhcp6/protocol.c index f3124283c..69af5741f 100644 --- a/dhcp6/protocol.c +++ b/dhcp6/protocol.c @@ -32,7 +32,6 @@ #include #include #include - #include #include @@ -49,13 +48,12 @@ #include "dhcp6/dhcp6.h" #include "dhcp6/device.h" #include "dhcp6/protocol.h" -#include "dhcp6/duid.h" #include "dhcp6/fsm.h" - -#include "buffer.h" #include "socket_priv.h" #include "netinfo_priv.h" +#include "buffer.h" #include "debug.h" +#include "duid.h" /* diff --git a/dhcp6/state.c b/dhcp6/state.c index 12d9be27e..46d34ac20 100644 --- a/dhcp6/state.c +++ b/dhcp6/state.c @@ -34,7 +34,8 @@ #include #include -#include "dhcp6/duid.h" +#include "duid.h" + #define CONFIG_DHCP6_DUID_NODE "default-duid" #define CONFIG_DHCP6_DUID_FILE "dhcp6-duid.xml" diff --git a/src/Makefile.am b/src/Makefile.am index d34a48f73..09262b63b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -53,6 +53,7 @@ libwicked_la_SOURCES = \ dbus-object.c \ dbus-server.c \ dbus-xml.c \ + duid.c \ errors.c \ ethernet.c \ extension.c \ @@ -154,6 +155,7 @@ EXTRA_DIST = \ dbus-server.h \ debug.h \ dhcp6/options.h \ + duid.h \ ipv6_priv.h \ kernel.h \ lldp-priv.h \ diff --git a/dhcp6/duid.c b/src/duid.c similarity index 99% rename from dhcp6/duid.c rename to src/duid.c index c34d4698d..58bdbc788 100644 --- a/dhcp6/duid.c +++ b/src/duid.c @@ -30,7 +30,7 @@ #include -#include +#include "duid.h" #include "util_priv.h" diff --git a/dhcp6/duid.h b/src/duid.h similarity index 95% rename from dhcp6/duid.h rename to src/duid.h index 48516ba86..5d2df0821 100644 --- a/dhcp6/duid.h +++ b/src/duid.h @@ -18,8 +18,8 @@ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. */ -#ifndef __WICKED_DHCP6_DUID_H__ -#define __WICKED_DHCP6_DUID_H__ +#ifndef __WICKED_DUID_H__ +#define __WICKED_DUID_H__ #include #include @@ -30,6 +30,7 @@ * not including the type code. * * http://tools.ietf.org/html/rfc3315#section-9.1 + * http://tools.ietf.org/html/rfc4361 */ #define NI_DUID_TYPE_LEN sizeof(uint16_t) #define NI_DUID_DATA_LEN 128 @@ -72,4 +73,4 @@ static inline const char * ni_duid_print_hex(const ni_opaque_t *duid) return ni_print_hex(duid->data, duid->len); } -#endif /* __WICKED_DHCP6_DUID_H__ */ +#endif /* __WICKED_DUID_H__ */