Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions dhcp4relay/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Build artifacts
build/
build-test/
*.o
*.d
*.gcda
*.gcno
*.gcov
*.html
*.xml

# PcapPlusPlus downloaded files
PcapPlusPlus-*/
PcapPlusPlus-*.tar.gz
pcappp.stamp
19 changes: 16 additions & 3 deletions dhcp4relay/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ GCOVR := gcovr

LD_PCAPPLUSPLUS_LIB := -lPcap++ -lPacket++ -lCommon++

#pcap plus plus zip file pcappp_v24.09.zip
# PcapPlusPlus library configuration
PCAPPPVAR := 24.09
PCAPPPZIP_FILE := pcappp_v${PCAPPPVAR}.zip
PCAPPP_URL := https://github.com/seladb/PcapPlusPlus/archive/refs/tags/v$(PCAPPPVAR).tar.gz
PCAPPP_TARBALL := PcapPlusPlus-$(PCAPPPVAR).tar.gz
PCAPPP_SHA256 := b14998ecf5718c2bfb6f709060e53f7ef67639b98bf2222a3cd23d820d70acdc
PCAPPLUSPLUS_DIR := $(WORKING_DIR)/PcapPlusPlus-$(PCAPPPVAR)
PCAPPP_DONE = $(WORKING_DIR)/pcappp.stamp
INCLUDE_DIR = $(PCAPPLUSPLUS_DIR)/include
Expand All @@ -34,10 +36,20 @@ PWD := $(shell pwd)
.PHONY: $(PCAPPP_DONE)
$(PCAPPP_DONE):

# Download PcapPlusPlus from official GitHub release if not already present
if [ ! -f $(PCAPPP_TARBALL) ]; then \
echo "Downloading PcapPlusPlus v$(PCAPPPVAR)..."; \
wget -O $(PCAPPP_TARBALL) $(PCAPPP_URL); \
fi

# Verify checksum
echo "$(PCAPPP_SHA256) $(PCAPPP_TARBALL)" | sha256sum -c -

# Remove stale files
rm -rf $(PCAPPLUSPLUS_DIR)

unzip ${PCAPPPZIP_FILE}
# Extract tarball (GitHub tarball extracts to PcapPlusPlus-<version> without 'v' prefix)
tar xzf $(PCAPPP_TARBALL)
pushd $(PCAPPLUSPLUS_DIR)

# Create a git repository here for stg to apply patches
Expand Down Expand Up @@ -98,6 +110,7 @@ uninstall:

clean:
-$(RM) $(BUILD_DIR) $(BUILD_TEST_DIR) *.html *.xml
-$(RM) $(PCAPPLUSPLUS_DIR) $(PCAPPP_TARBALL) $(PCAPPP_DONE)
$(FIND) . -name *.gcda -exec rm -f {} \;
$(FIND) . -name *.gcno -exec rm -f {} \;
$(FIND) . -name *.gcov -exec rm -f {} \;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/PcapPlusPlus-24.09/Packet++/header/DhcpLayer.h b/PcapPlusPlus-24.09/Packet++/header/DhcpLayer.h
diff --git a/Packet++/header/DhcpLayer.h b/Packet++/header/DhcpLayer.h
index 435becb..282d739 100644
--- a/PcapPlusPlus-24.09/Packet++/header/DhcpLayer.h
+++ b/PcapPlusPlus-24.09/Packet++/header/DhcpLayer.h
--- a/Packet++/header/DhcpLayer.h
+++ b/Packet++/header/DhcpLayer.h
@@ -881,8 +881,8 @@ namespace pcpp

bool DhcpLayer::isDhcpPorts(uint16_t portSrc, uint16_t portDst)
Expand Down
Binary file removed dhcp4relay/pcappp_v24.09.zip
Binary file not shown.