func SpawnSNMP(c *ConfSNMP) error {
	listener, err := net.ListenPacket("udp", fmt.Sprintf("%s:%d", c.BindHost, c.BindPort))
	if err != nil {
		return fmt.Errorf("failed to listen on %s:%d (%s)", c.BindHost, c.BindPort, err)
	}
	udpSocket, ok := listener.(*net.UDPConn)
	if !ok {
		return fmt.Errorf("failed to listen on %s:%d (bad socket)", c.BindHost, c.BindPort)
	}
	c.listener = udpSocket
	go snmpStart(c)
	return nil
}
SpawnSNMP starts a logging SNMP server
package flamingo
import (
	"encoding/hex"
	"fmt"
	"net"
	"sync"
	"github.com/gosnmp/gosnmp"
	log "github.com/sirupsen/logrus"
)
type ConfSNMP struct {
	BindPort     uint16
	BindHost     string
	RecordWriter *RecordWriter
	shutdown     bool
	listener     net.PacketConn
	m            sync.Mutex
}
func (c *ConfSNMP) IsShutdown() bool {
	c.m.Lock()
	defer c.m.Unlock()
	return c.shutdown
}
func (c *ConfSNMP) Shutdown() {
	c.m.Lock()
	defer c.m.Unlock()
	if c.shutdown {
		return
	}
	c.shutdown = true
	c.listener.Close()
}
func NewConfSNMP() *ConfSNMP {
	return &ConfSNMP{
		BindPort: 161,
		BindHost: "[::]",
	}
}
var snmpDecoders = []*gosnmp.GoSNMP{
	&gosnmp.GoSNMP{Version: gosnmp.Version2c},
}