From 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 Mon Sep 17 00:00:00 2001 From: wbx Date: Sun, 17 May 2009 14:41:34 +0200 Subject: Initial import --- package/dhcp6/Config.in | 12 ++++++ package/dhcp6/Makefile | 32 +++++++++++++++ package/dhcp6/ipkg/dhcp6.control | 5 +++ package/dhcp6/ipkg/files/conffiles | 4 ++ package/dhcp6/patches/patch-client_Makefile | 58 ++++++++++++++++++++++++++++ package/dhcp6/patches/patch-client_clilib_c | 22 +++++++++++ package/dhcp6/patches/patch-client_macros_h | 10 +++++ package/dhcp6/patches/patch-client_solicit_c | 12 ++++++ package/dhcp6/patches/patch-server_Makefile | 38 ++++++++++++++++++ package/dhcp6/patches/patch-server_macros_h | 10 +++++ package/dhcp6/patches/patch-server_reply_c | 21 ++++++++++ 11 files changed, 224 insertions(+) create mode 100644 package/dhcp6/Config.in create mode 100644 package/dhcp6/Makefile create mode 100755 package/dhcp6/ipkg/dhcp6.control create mode 100644 package/dhcp6/ipkg/files/conffiles create mode 100644 package/dhcp6/patches/patch-client_Makefile create mode 100644 package/dhcp6/patches/patch-client_clilib_c create mode 100644 package/dhcp6/patches/patch-client_macros_h create mode 100644 package/dhcp6/patches/patch-client_solicit_c create mode 100644 package/dhcp6/patches/patch-server_Makefile create mode 100644 package/dhcp6/patches/patch-server_macros_h create mode 100644 package/dhcp6/patches/patch-server_reply_c (limited to 'package/dhcp6') diff --git a/package/dhcp6/Config.in b/package/dhcp6/Config.in new file mode 100644 index 000000000..cbb5bccc4 --- /dev/null +++ b/package/dhcp6/Config.in @@ -0,0 +1,12 @@ +config ADK_PACKAGE_DHCP6 + prompt "dhcp6............................. IPv6 DHCP server and client" + depends on ADK_IPV6 + tristate + default n + select ADK_PACKAGE_LIBNCURSES + help + This is the first ever open source implementation of Dynamic + Host Configuration Protocol for IPv6 (DHCPv6) server and client + on Linux Operating System. The server provides leases + (durations or lifetimes) on IPv6 addresses to the clients who + request for it diff --git a/package/dhcp6/Makefile b/package/dhcp6/Makefile new file mode 100644 index 000000000..3aa5ddcc7 --- /dev/null +++ b/package/dhcp6/Makefile @@ -0,0 +1,32 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= dhcp6 +PKG_VERSION:= 1.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 86193dfa62137db3ea459543db4f1102 +DISTFILES:= dhcpv6-linux-${PKG_VERSION}.zip +MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=dhcpv6-linux/} +WRKDIST= ${WRKDIR} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,DHCP6,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +do-build: + ${MAKE} CC="${TARGET_CC}" STAGING_DIR=${STAGING_DIR} -C ${WRKBUILD}/server + ${MAKE} CC="${TARGET_CC}" STAGING_DIR=${STAGING_DIR} -C ${WRKBUILD}/client + +do-install: + ${INSTALL_DIR} ${IDIR_DHCP6}/usr/sbin + ${INSTALL_DIR} ${IDIR_DHCP6}/etc/dhcp{d6,6} + ${INSTALL_BIN} ${WRKBUILD}/client/cli ${IDIR_DHCP6}/usr/sbin/dhcp6client + ${INSTALL_BIN} ${WRKBUILD}/server/serv ${IDIR_DHCP6}/usr/sbin/dhcpd6 + ${CP} ${WRKBUILD}/server/*.conf ${IDIR_DHCP6}/etc/dhcpd6/ + ${CP} ${WRKBUILD}/client/*.conf ${IDIR_DHCP6}/etc/dhcp6/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/dhcp6/ipkg/dhcp6.control b/package/dhcp6/ipkg/dhcp6.control new file mode 100755 index 000000000..cc030a0e2 --- /dev/null +++ b/package/dhcp6/ipkg/dhcp6.control @@ -0,0 +1,5 @@ +Package: dhcp6 +Section: net +Architecture: mipsel +Priority: optional +Description: This is the first ever open source implementation of Dynamic Host Configuration Protocol for IPv6 (DHCPv6) server and client on Linux Operating System. The server provides leases (durations or lifetimes) on IPv6 addresses to the clients who request for it. diff --git a/package/dhcp6/ipkg/files/conffiles b/package/dhcp6/ipkg/files/conffiles new file mode 100644 index 000000000..267baa94d --- /dev/null +++ b/package/dhcp6/ipkg/files/conffiles @@ -0,0 +1,4 @@ +/etc/dhcpd6/dhcpd6.conf +/etc/dhcpd6/leases6.conf +/etc/dhcpd6/partial_leases6.conf +/etc/dhcp6/sollicit.conf diff --git a/package/dhcp6/patches/patch-client_Makefile b/package/dhcp6/patches/patch-client_Makefile new file mode 100644 index 000000000..6004a355b --- /dev/null +++ b/package/dhcp6/patches/patch-client_Makefile @@ -0,0 +1,58 @@ +$Id$ +--- w-dhcp6-1.0-1.orig/client/Makefile 2025-06-28 23:21:40.000000000 +0200 ++++ w-dhcp6-1.0-1/client/Makefile 2008-10-20 13:29:40.000000000 +0200 +@@ -1,42 +1,40 @@ +- +-CC = gcc + STD_HEADERS = stdhead.h head.h struct.h options_type.h message_type.h states.h timer_val.h constants.h macros.h status_codes.h + OBJECT_FILES = client.o solicit.o clilib.o parse.o request.o decline.o renew.o rebind.o release.o + HEADER_FILES = solicit.h clilib.h parse.h request.h decline.h renew.h rebind.h release.h +- ++IFLAGS = -I$(STAGING_DIR)/usr/include + + dhcpv6_client : dhcpv6_client.c cli +- $(CC) -g3 dhcpv6_client.c -o dhcpv6_client ++ $(CC) $(IFLAGS) dhcpv6_client.c -o dhcpv6_client + + cli : $(OBJECT_FILES) +- $(CC) -g3 $(OBJECT_FILES) -o cli -lncurses ++ $(CC) $(IFLAGS) $(OBJECT_FILES) -o cli -L$(STAGING_DIR)/usr/lib -lncurses + + client.o : client.c $(STD_HEADERS) $(HEADER_FILES) +- $(CC) -g3 -c client.c -o client.o ++ $(CC) $(IFLAGS) -c client.c -o client.o + + release.o : release.c release.h clilib.h +- $(CC) -g3 -c release.c -o release.o ++ $(CC) $(IFLAGS) -c release.c -o release.o + + rebind.o : rebind.c rebind.h clilib.h +- $(CC) -g3 -c rebind.c -o rebind.o ++ $(CC) $(IFLAGS) -c rebind.c -o rebind.o + + renew.o : renew.c renew.h clilib.h +- $(CC) -g3 -c renew.c -o renew.o ++ $(CC) $(IFLAGS) -c renew.c -o renew.o + + request.o : request.c request.h clilib.h +- $(CC) -g3 -c request.c -o request.o ++ $(CC) $(IFLAGS) -c request.c -o request.o + + decline.o : decline.c decline.h clilib.h parse.h solicit.h +- $(CC) -g3 -c decline.c -o decline.o ++ $(CC) $(IFLAGS) -c decline.c -o decline.o + + solicit.o : solicit.c solicit.h clilib.h parse.h +- $(CC) -g3 -c solicit.c -o solicit.o ++ $(CC) $(IFLAGS) -c solicit.c -o solicit.o + + clilib.o : clilib.c clilib.h parse.h +- $(CC) -g3 -c clilib.c -o clilib.o ++ $(CC) $(IFLAGS) -c clilib.c -o clilib.o + + parse.o : parse.c parse.h clilib.h +- $(CC) -g3 -c parse.c -o parse.o ++ $(CC) $(IFLAGS) -c parse.c -o parse.o + + clean : + rm -f *.o cli dhcpv6_client diff --git a/package/dhcp6/patches/patch-client_clilib_c b/package/dhcp6/patches/patch-client_clilib_c new file mode 100644 index 000000000..a9f416fa6 --- /dev/null +++ b/package/dhcp6/patches/patch-client_clilib_c @@ -0,0 +1,22 @@ +$Id$ +--- w-dhcp6-1.0-1.orig/client/clilib.c Sat Jun 28 23:21:17 2025 ++++ w-dhcp6-1.0-1/client/clilib.c Tue Jul 25 10:37:06 2006 +@@ -554,7 +554,7 @@ u_int8_t convert_character_to_hex (char + + void generate_trans_id (u_int32_t *trans_id) + { +- extern u_int32_t g_trans_id; ++ extern int g_trans_id; + time_t t; + srand (time (&t)); + *trans_id = 0; +@@ -890,9 +890,7 @@ void read_option (char *m, int index, in + break; + + default : +-#if DEBUG == 3 + printf ("Unrecognized DUID type\n"); +-#endif + } + + next_opt = (struct OPTIONS *) malloc (sizeof (struct OPTIONS)); diff --git a/package/dhcp6/patches/patch-client_macros_h b/package/dhcp6/patches/patch-client_macros_h new file mode 100644 index 000000000..f918cd5fd --- /dev/null +++ b/package/dhcp6/patches/patch-client_macros_h @@ -0,0 +1,10 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- w-dhcp6-1.0-1.orig/client/macros.h 2025-06-28 23:21:40.000000000 +0200 ++++ w-dhcp6-1.0-1/client/macros.h 2008-10-20 15:31:08.000000000 +0200 +@@ -1,5 +1,5 @@ + #define INITIALIZE_SOCKADDR(x){ \ +- bzero((char *) &(x), sizeof((x))); \ ++ memset((char *) &(x), 0, sizeof((x))); \ + (x).sin6_family = AF_INET6; \ + (x).sin6_flowinfo = htonl(0); \ + (x).sin6_scope_id = 0; \ diff --git a/package/dhcp6/patches/patch-client_solicit_c b/package/dhcp6/patches/patch-client_solicit_c new file mode 100644 index 000000000..7214598f0 --- /dev/null +++ b/package/dhcp6/patches/patch-client_solicit_c @@ -0,0 +1,12 @@ +$Id$ +--- w-dhcp6-1.0-1.orig/client/solicit.c Sat Jun 28 23:21:17 2025 ++++ w-dhcp6-1.0-1/client/solicit.c Tue Jul 25 10:37:07 2006 +@@ -18,7 +18,7 @@ struct DHCP_MESSAGE * create_solicit_mes + dhcp_message_ptr -> opt = add_client_id_option (interface_details); + + opt_ptr = (struct OPTIONS *) dhcp_message_ptr -> opt; +- (struct OPTIONS *) ((struct DUID *) opt_ptr -> opt_data) -> opt = add_ia_option (interface_details); ++ ((struct DUID *) opt_ptr -> opt_data) -> opt = add_ia_option (interface_details); + return dhcp_message_ptr; + } + diff --git a/package/dhcp6/patches/patch-server_Makefile b/package/dhcp6/patches/patch-server_Makefile new file mode 100644 index 000000000..0ae2e4825 --- /dev/null +++ b/package/dhcp6/patches/patch-server_Makefile @@ -0,0 +1,38 @@ +$Id$ +--- w-dhcp6-1.0-1.orig/server/Makefile Fri Jun 28 14:49:42 2002 ++++ w-dhcp6-1.0-1/server/Makefile Tue Jul 25 10:37:06 2006 +@@ -1,27 +1,26 @@ +-CC = gcc + STD_HEADERS = stdhead.h head.h struct.h options_type.h message_type.h macros.h status_codes.h constants.h + OBJECT_FILES = server.o lib.o advertise.o parse.o leases.o reply.o + + serv: $(OBJECT_FILES) +- $(CC) -g3 $(OBJECT_FILES) -o serv ++ $(CC) $(OBJECT_FILES) -o serv + + lib.o: lib.c lib.h $(STD_HEADERS) +- $(CC) -g3 -c lib.c -o lib.o ++ $(CC) -c lib.c -o lib.o + + parse.o: parse.c parse.h $(STD_HEADERS) +- $(CC) -g3 -c parse.c -o parse.o ++ $(CC) -c parse.c -o parse.o + + leases.o: leases.c leases.h $(STD_HEADERS) +- $(CC) -g3 -c leases.c -o leases.o ++ $(CC) -c leases.c -o leases.o + + advertise.o: advertise.c advertise.h $(STD_HEADERS) +- $(CC) -g3 -c advertise.c -o advertise.o ++ $(CC) -c advertise.c -o advertise.o + + reply.o: reply.c reply.h $(STD_HEADERS) +- $(CC) -g3 -c reply.c -o reply.o ++ $(CC) -c reply.c -o reply.o + + server.o: server.c lib.h advertise.h reply.h leases.h parse.h $(STD_HEADERS) +- $(CC) -g3 -c server.c -o server.o ++ $(CC) -c server.c -o server.o + + clean: + rm -f *.o serv diff --git a/package/dhcp6/patches/patch-server_macros_h b/package/dhcp6/patches/patch-server_macros_h new file mode 100644 index 000000000..916e4c798 --- /dev/null +++ b/package/dhcp6/patches/patch-server_macros_h @@ -0,0 +1,10 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- w-dhcp6-1.0-1.orig/server/macros.h 2002-06-28 14:50:04.000000000 +0200 ++++ w-dhcp6-1.0-1/server/macros.h 2008-10-20 15:30:53.000000000 +0200 +@@ -1,5 +1,5 @@ + #define INITIALIZE_SOCKADDR(x){ \ +- bzero((char *) &(x), sizeof((x))); \ ++ memset((char *) &(x), 0, sizeof((x))); \ + (x).sin6_family = AF_INET6; \ + (x).sin6_flowinfo = htonl(0); \ + (x).sin6_scope_id = 0; \ diff --git a/package/dhcp6/patches/patch-server_reply_c b/package/dhcp6/patches/patch-server_reply_c new file mode 100644 index 000000000..bafca5ae1 --- /dev/null +++ b/package/dhcp6/patches/patch-server_reply_c @@ -0,0 +1,21 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- w-dhcp6-1.0-1.orig/server/reply.c 2002-06-28 14:50:04.000000000 +0200 ++++ w-dhcp6-1.0-1/server/reply.c 2008-10-20 15:29:52.000000000 +0200 +@@ -147,7 +147,7 @@ struct DHCP_MESSAGE * create_dummy_reply + opt_ptr -> u_opt_len.opt_len = opt_src_ptr -> u_opt_len.opt_len; + ia_ptr = (struct IA *) malloc (sizeof (struct IA)); + opt_ptr -> opt_data = ia_ptr; +- bzero (ia_ptr, sizeof (struct IA)); ++ memset (ia_ptr, 0, sizeof (struct IA)); + ia_ptr -> u_iaid.iaid = ia_src_ptr -> u_iaid.iaid; + + // set IAADDR option with values set to null +@@ -159,7 +159,7 @@ struct DHCP_MESSAGE * create_dummy_reply + opt_ptr -> u_opt_len.opt_len = opt_src_ptr -> u_opt_len.opt_len; + iaaddr_ptr = (struct IA_ADDRESS *) malloc (sizeof (struct IA_ADDRESS)); + opt_ptr -> opt_data = iaaddr_ptr; +- bzero (iaaddr_ptr, sizeof (struct IA_ADDRESS)); ++ memset (iaaddr_ptr, 0, sizeof (struct IA_ADDRESS)); + + return dhcp_message_ptr; + } -- cgit v1.2.3