This commit is contained in:
TriForceX
2019-09-25 20:51:37 -03:00
commit 6203ff3e7c
11215 changed files with 428258 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
The udphdr structure has uh_* fields when _FAVOR_BSD is
defined. Otherwise, the fields are just named source, dest, len and
check. See <netinet/udp.h>.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: dhcpdump-1.8/dhcpdump.c
===================================================================
--- dhcpdump-1.8.orig/dhcpdump.c 2011-05-17 20:20:46.506980003 +0200
+++ dhcpdump-1.8/dhcpdump.c 2011-05-17 20:20:59.338979999 +0200
@@ -163,10 +163,10 @@
strcpy(ip_origin, (u_char *)inet_ntoa(ip->ip_src));
strcpy(ip_destination, (u_char *)inet_ntoa(ip->ip_dst));
- if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->uh_ulen)))
+ if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->len)))
return;
- printdata((u_char *)(sp + offset), ntohs(udp->uh_ulen));
+ printdata((u_char *)(sp + offset), ntohs(udp->len));
}
// check for matching CHADDR (Peter Apian-Bennewitz <apian@ise.fhg.de>)

View File

@@ -0,0 +1,7 @@
config BR2_PACKAGE_DHCPDUMP
bool "dhcpdump"
select BR2_PACKAGE_LIBPCAP
help
A tool for monitoring dhcp requests using tcpdump.
http://www.mavetju.org/unix/general.php

View File

@@ -0,0 +1,2 @@
# Locally calculated
sha256 6d5eb9418162fb738bc56e4c1682ce7f7392dd96e568cc996e44c28de7f77190 dhcpdump-1.8.tar.gz

View File

@@ -0,0 +1,30 @@
################################################################################
#
# dhcpdump
#
################################################################################
DHCPDUMP_VERSION = 1.8
DHCPDUMP_SITE = http://www.mavetju.org/download
DHCPDUMP_DEPENDENCIES = libpcap
DHCPDUMP_LICENSE = BSD-2-Clause
DHCPDUMP_LICENSE_FILES = LICENSE
DHCPDUMP_LIBS = -lpcap
ifeq ($(BR2_STATIC_LIBS),y)
DHCPDUMP_LIBS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
endif
# glibc, uclibc and musl have strsep()
DHCPDUMP_CFLAGS = $(TARGET_CFLAGS) -DHAVE_STRSEP
define DHCPDUMP_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC) $(DHCPDUMP_CFLAGS) \
-D_GNU_SOURCE" LIBS="$(DHCPDUMP_LIBS)"
endef
define DHCPDUMP_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D $(@D)/dhcpdump $(TARGET_DIR)/usr/bin/dhcpdump
endef
$(eval $(generic-package))