Skip to content

Commit

Permalink
Revert "Removing dhcpmon"
Browse files Browse the repository at this point in the history
This reverts commit 88ad212.
  • Loading branch information
dgsudharsan committed Apr 11, 2023
1 parent 63941a4 commit ba7befb
Show file tree
Hide file tree
Showing 15 changed files with 2,003 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dhcpmon/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
debian/*
!debian/changelog
!debian/compat
!debian/control
!debian/rules
45 changes: 45 additions & 0 deletions src/dhcpmon/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
RM := rm -rf
DHCPMON_TARGET := dhcpmon
CP := cp
MKDIR := mkdir
CC := g++
MV := mv
PWD := $(shell pwd)

# All of the sources participating in the build are defined here
-include src/subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif

# Add inputs and outputs from these tool invocations to the build variables

# All Target
all: sonic-dhcpmon

# Tool invocations
sonic-dhcpmon: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: G++ C Linker'
$(CC) -o "$(DHCPMON_TARGET)" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

# Other Targets
install:
$(MKDIR) -p $(DESTDIR)/usr/sbin
$(MV) $(DHCPMON_TARGET) $(DESTDIR)/usr/sbin

deinstall:
$(RM) $(DESTDIR)/usr/sbin/$(DHCPMON_TARGET)
$(RM) -rf $(DESTDIR)/usr/sbin

clean:
-$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) $(DHCPMON_TARGET)
-@echo ' '

.PHONY: all clean dependents
5 changes: 5 additions & 0 deletions src/dhcpmon/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sonic-dhcpmon (1.0.0-0) UNRELEASED; urgency=medium

* Initial release.

-- Tamer Ahmed <tamer.ahmed@microsoft.com> Mon, 09 Dec 2019 12:00:00 -0700
1 change: 1 addition & 0 deletions src/dhcpmon/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12
14 changes: 14 additions & 0 deletions src/dhcpmon/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Source: sonic-dhcpmon
Section: devel
Priority: optional
Maintainer: Tamer Ahmed <tamer.ahmed@microsoft.com>
Build-Depends: debhelper (>= 12.0.0), libevent-dev, libexplain-dev
Standards-Version: 3.9.3
Homepage: https://github.com/Azure/sonic-buildimage
XS-Go-Import-Path: github.com/Azure/sonic-buildimage

Package: sonic-dhcpmon
Architecture: any
Built-Using: ${misc:Built-Using}
Depends: ${shlibs:Depends}
Description: SONiC DHCP Monitor
9 changes: 9 additions & 0 deletions src/dhcpmon/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

DEB_CFLAGS_APPEND=-std=gnu11
export DEB_CFLAGS_APPEND

%:
dh $@ --parallel
4 changes: 4 additions & 0 deletions src/dhcpmon/objects.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
USER_OBJS :=

LIBS := -levent -lexplain -lswsscommon -pthread -lboost_thread -lboost_system -lhiredis

Loading

0 comments on commit ba7befb

Please sign in to comment.