GoSNMPServer
GoSNMPServer copied to clipboard
TCP support
Added the tcp support
I appreciate the contribution
Furthermore, upon initial review, this implementation does not account for the length field in the protocol. It needs to be supplemented based on RFC3430[1].
Additionally, if you could provide a unit test, I would be very grateful.
[1] http://www.faqs.org/rfcs/rfc3430.html
It is possible that the underlying TCP implementation delivers byte
sequences that do not align with SNMP message boundaries. A
receiving SNMP engine MUST therefore use the length field in the
BER-encoded SNMP message to separate multiple requests sent over a
single TCP connection (framing). An SNMP engine which looses framing
(for example due to ASN.1 parse errors) SHOULD close the TCP
connection. The connection initiator will then be responsible for
establishing a new TCP connection.