This diff does the following:
- Push the network handling to their own files.
This helps with readability and allows for easier addition of other
transport layers if we ever choose to (unix socket, ssh, dtls, ...)
- Allow multiple tcp packets to be handled at the same time.
This will helps throughput with multiple backends (agentx).
- Remove sm_data from the snmp_message. This shaves of ~65k per struct.
Right now this isn't that interesting, because we mostly handle 1
packet at a time, but as soon as we're leveraging agentx more it
is not unlikely that there are multiple packets in flight inside
There's only one intentional function change and that is that the
outpkts is incremented once the data is pushed to the output buffer
in tcp.c, instead of when the packet has been send to the kernel.
I think this is reasonable, since the endeavour is to make the transport
layer agnostic about how snmp works.
There's more that I'd like to change, but this diff is large enough as