From 888e6e077e1f9a047a388c12178fdcf481af56bd Mon Sep 17 00:00:00 2001 From: Pau Date: Tue, 16 Jul 2013 12:51:26 +0200 Subject: [PATCH 0001/2727] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a64507b06..a81d98ec5 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ Program: dhcpdiscover $Revision: 2$ This program checks the existence and more details of a DHCP server +``` Usage: dhcpdiscover [-s serverip] [-r requestedip] [-m clientmac ] [-b bannedip] [-t timeout] [-i interface] [-v] -s, --serverip=IPADDRESS IP address of DHCP server that we must hear from @@ -61,3 +62,4 @@ Usage: dhcpdiscover [-s serverip] [-r requestedip] [-m clientmac ] [-b bannedip] Print version information Example: sudo ./dhcpdiscover -i eth0 -b 192.168.1.1 +``` From 97a33e9fb475d4289e742b71afc91767b9c963e4 Mon Sep 17 00:00:00 2001 From: Pau Date: Tue, 16 Jul 2013 13:03:04 +0200 Subject: [PATCH 0002/2727] Update README.md --- README.md | 57 +++++++++++++++++++------------------------------------ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index a81d98ec5..accd128d6 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,26 @@ -About the code structure ------------------------------------------------------------------------------------------------------------ -The Makefile found in the same directory of this README is for OpenWRT. It can be imported as a package. -Inside the src/ directory the C code of dhcpdiscover can be found. -If you want to compile it for your computer execute: cd src && make +* Program: dhcpdiscover + + This program checks the existence and more details of a DHCP server ------------------------------------------------------------------------------------------------------------ +* About the code structure -Program: dhcpdiscover $Revision: 2$ - * - * License: GPL - * Copyright (c) 2001-2004 Ethan Galstad (nagios@nagios.org) - * Copyright (c) 2006-2013 OpenWRT.org - * ====================================================== - * Mike Gore 25 Aug 2005 - * Modified for standalone operation - * ====================================================== - * Pau Escrich Jun 2013 - * Added -b option and ported to OpenWRT - * ====================================================== - * - ** License Information: - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * $Id: dhcpdiscover.c,v 2$ - * + The Makefile found in the directory of this README is for OpenWRT. It can be imported as a package. Inside the src/ directory the C code of dhcpdiscover can be found. If you want to compile it for your computer execute: cd src && make -This program checks the existence and more details of a DHCP server +* Licence information + Code under GPLv3 + + Copyright (c) 2001-2004 Ethan Galstad (nagios@nagios.org), 2013 OpenWRT.org + +* Contributors + + Mike Gore 25 Aug 2005: Modified for standalone operation + Pau Escrich Jun 2013: Added -b option and ported to OpenWRT + + +___________________________________________________________ + + ``` Usage: dhcpdiscover [-s serverip] [-r requestedip] [-m clientmac ] [-b bannedip] [-t timeout] [-i interface] [-v] -s, --serverip=IPADDRESS From 90c08971fb88ac1c5681d651d1483abbdbb7cef2 Mon Sep 17 00:00:00 2001 From: Pau Escrich Date: Sat, 5 Oct 2013 15:39:29 +0200 Subject: [PATCH 0003/2727] Adapt to OpenWRT package feeds structure --- Makefile => packages/Makefile | 0 README.md => packages/README.md | 0 {src => packages/src}/Makefile | 0 {src => packages/src}/dhcpdiscover.c | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename Makefile => packages/Makefile (100%) rename README.md => packages/README.md (100%) rename {src => packages/src}/Makefile (100%) rename {src => packages/src}/dhcpdiscover.c (100%) diff --git a/Makefile b/packages/Makefile similarity index 100% rename from Makefile rename to packages/Makefile diff --git a/README.md b/packages/README.md similarity index 100% rename from README.md rename to packages/README.md diff --git a/src/Makefile b/packages/src/Makefile similarity index 100% rename from src/Makefile rename to packages/src/Makefile diff --git a/src/dhcpdiscover.c b/packages/src/dhcpdiscover.c similarity index 100% rename from src/dhcpdiscover.c rename to packages/src/dhcpdiscover.c From d5f8d9b91fa137b51d3d298023a681aae0256536 Mon Sep 17 00:00:00 2001 From: Pau Escrich Date: Sat, 5 Oct 2013 15:48:42 +0200 Subject: [PATCH 0004/2727] Add dhcpdiscover as dependence for lime-system --- packages/lime-system/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lime-system/Makefile b/packages/lime-system/Makefile index 63519ff8f..57eb45ae2 100644 --- a/packages/lime-system/Makefile +++ b/packages/lime-system/Makefile @@ -40,7 +40,7 @@ define Package/lime-system +kmod-batman-adv \ +wpad-mini +reghack \ +kmod-macvlan +ebtables \ - +ip +iputils-ping6 + +dhcpdiscover +ip +iputils-ping6 endef define Package/lime-system/description From 368e989348aad82f2c91169aaa5bd7aad16ef8a4 Mon Sep 17 00:00:00 2001 From: Pau Escrich Date: Sat, 19 Oct 2013 12:33:58 +0200 Subject: [PATCH 0005/2727] Remove old dhcpdiscover source added by mistake Add dhcpdiscover package --- packages/dhcpdiscover/Makefile | 39 ++++++++++++++++ packages/dhcpdiscover/README.md | 46 +++++++++++++++++++ packages/{ => dhcpdiscover}/src/Makefile | 0 .../{ => dhcpdiscover}/src/dhcpdiscover.c | 0 4 files changed, 85 insertions(+) create mode 100644 packages/dhcpdiscover/Makefile create mode 100644 packages/dhcpdiscover/README.md rename packages/{ => dhcpdiscover}/src/Makefile (100%) rename packages/{ => dhcpdiscover}/src/dhcpdiscover.c (100%) diff --git a/packages/dhcpdiscover/Makefile b/packages/dhcpdiscover/Makefile new file mode 100644 index 000000000..ab625cd3e --- /dev/null +++ b/packages/dhcpdiscover/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# Author: p4u + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dhcpdiscover +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/dhcpdiscover + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk + +define Package/dhcpdiscover + SECTION:=net + CATEGORY:=Network + TITLE:=dhcpdiscover +endef + +define Package/dhcpdiscover/description + Brings some information about the existing DHCP servers in the network without getting a leasse +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +define Package/dhcpdiscover/install + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcpdiscover $(1)/bin/ +endef + +$(eval $(call BuildPackage,dhcpdiscover)) diff --git a/packages/dhcpdiscover/README.md b/packages/dhcpdiscover/README.md new file mode 100644 index 000000000..accd128d6 --- /dev/null +++ b/packages/dhcpdiscover/README.md @@ -0,0 +1,46 @@ +* Program: dhcpdiscover + + This program checks the existence and more details of a DHCP server + +* About the code structure + + The Makefile found in the directory of this README is for OpenWRT. It can be imported as a package. Inside the src/ directory the C code of dhcpdiscover can be found. If you want to compile it for your computer execute: cd src && make + +* Licence information + + Code under GPLv3 + + Copyright (c) 2001-2004 Ethan Galstad (nagios@nagios.org), 2013 OpenWRT.org + +* Contributors + + Mike Gore 25 Aug 2005: Modified for standalone operation + Pau Escrich Jun 2013: Added -b option and ported to OpenWRT + + +___________________________________________________________ + + +``` +Usage: dhcpdiscover [-s serverip] [-r requestedip] [-m clientmac ] [-b bannedip] [-t timeout] [-i interface] + [-v] -s, --serverip=IPADDRESS + IP address of DHCP server that we must hear from + -r, --requestedip=IPADDRESS + IP address that should be offered by at least one DHCP server + -m, --mac=MACADDRESS + Client MAC address to use for sending packets + -b, --bannedip=IPADDRESS + Server IP address to ignore + -t, --timeout=INTEGER + Seconds to wait for DHCPOFFER before timeout occurs + -i, --interface=STRING + Interface to to use for listening (i.e. eth0) + -v, --verbose + Print extra information (command-line use only) + -h, --help + Print detailed help screen + -V, --version + Print version information + +Example: sudo ./dhcpdiscover -i eth0 -b 192.168.1.1 +``` diff --git a/packages/src/Makefile b/packages/dhcpdiscover/src/Makefile similarity index 100% rename from packages/src/Makefile rename to packages/dhcpdiscover/src/Makefile diff --git a/packages/src/dhcpdiscover.c b/packages/dhcpdiscover/src/dhcpdiscover.c similarity index 100% rename from packages/src/dhcpdiscover.c rename to packages/dhcpdiscover/src/dhcpdiscover.c From 6e80e8bcf4e96e17f8179c99ac50804f8f98a079 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Sun, 20 Oct 2013 03:13:38 +0200 Subject: [PATCH 0006/2727] Added dnsmasq lease sharing over alfred --- packages/lime-dnsmasq-lease-share/Makefile | 48 ++++++++++++ .../src/dnsmasq-lease-share.lua | 76 +++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 packages/lime-dnsmasq-lease-share/Makefile create mode 100755 packages/lime-dnsmasq-lease-share/src/dnsmasq-lease-share.lua diff --git a/packages/lime-dnsmasq-lease-share/Makefile b/packages/lime-dnsmasq-lease-share/Makefile new file mode 100644 index 000000000..1f3603a86 --- /dev/null +++ b/packages/lime-dnsmasq-lease-share/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2006-2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# Author: Gioacchino Mazzurco + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lime-dnsmasq-lease-share +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME) + SECTION:=net + CATEGORY:=Network + TITLE:=dnsmasq lease sharing accross batman-adv mesh +endef + +define Package/$(PKG_NAME)/description + Share dnsmasq lease file accross all batman-adv nodes of a mesh with enabled alfred +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) +endef + +define Build/Configure +endef + +define Build/Compile + @rm -rf ./build || true + @cp -r ./src ./build + @sed -i '/^--!.*/d' build/*.lua +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) ./build/$(PKG_NAME).lua $(1)/usr/bin/$(PKG_NAME) + @chmod +x $(1)/usr/bin/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/lime-dnsmasq-lease-share/src/dnsmasq-lease-share.lua b/packages/lime-dnsmasq-lease-share/src/dnsmasq-lease-share.lua new file mode 100755 index 000000000..27fc1503b --- /dev/null +++ b/packages/lime-dnsmasq-lease-share/src/dnsmasq-lease-share.lua @@ -0,0 +1,76 @@ +#!/usr/bin/lua + +--[[ + +Copyright (C) 2013 Gioacchino Mazzurco + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this file. If not, see . + +]]-- + + +--! dhcp lease file lines format +--!