mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
23
package/dhcpdump/0001-use-non-bsd-structures.patch
Normal file
23
package/dhcpdump/0001-use-non-bsd-structures.patch
Normal 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>)
|
||||
7
package/dhcpdump/Config.in
Normal file
7
package/dhcpdump/Config.in
Normal 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
|
||||
2
package/dhcpdump/dhcpdump.hash
Normal file
2
package/dhcpdump/dhcpdump.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally calculated
|
||||
sha256 6d5eb9418162fb738bc56e4c1682ce7f7392dd96e568cc996e44c28de7f77190 dhcpdump-1.8.tar.gz
|
||||
30
package/dhcpdump/dhcpdump.mk
Normal file
30
package/dhcpdump/dhcpdump.mk
Normal 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))
|
||||
Reference in New Issue
Block a user