Implement the sendTrap(library) function

This function is a library function which would be
used by the process which wants to send the snmp trap.

This function is a templatized function and template parameter
would be snmp notification type.

Change-Id: I63920f8c4593ba366a34b344dfab3a4562bf5d36
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index 6807986..e177077 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
 # export these headers
-nobase_include_HEADERS = snmp_notification.hpp
+nobase_include_HEADERS = snmp.hpp \
+		snmp_notification.hpp
 
 libsnmpdir = ${libdir}
 
diff --git a/snmp.hpp b/snmp.hpp
new file mode 100644
index 0000000..a076054
--- /dev/null
+++ b/snmp.hpp
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "snmp_notification.hpp"
+
+namespace phosphor
+{
+namespace network
+{
+namespace snmp
+{
+
+/* @brief sends the trap to the snmp manager
+ * T - Notification type
+ * @param[in] tArgs - arguments for the trap.
+ */
+
+template <typename T, typename... ArgTypes> void sendTrap(ArgTypes&&... tArgs)
+{
+    T obj(std::forward<ArgTypes>(tArgs)...);
+    obj.sendTrap();
+}
+
+} // namespace snmp
+} // namespace network
+} // namespace phosphor
diff --git a/snmp_notification.cpp b/snmp_notification.cpp
index e27408a..1763602 100644
--- a/snmp_notification.cpp
+++ b/snmp_notification.cpp
@@ -58,8 +58,6 @@
 
 void Notification::sendTrap()
 {
-    log<level::DEBUG>("Sending SNMP Trap");
-
     constexpr auto comm = "public";
     constexpr auto localHost = "127.0.0.1";
     netsnmp_session session{0};