I extended net-snmp so that it allows to configure the DSCP value of IP
Differentiated Services (DiffServ) as defined in RFC 2474 and RFC 2475.
About the attached patch:
The library will register for configuration token "dscp INT" in snmp.conf
during the "pre-mib" time. The latter was necessary so that the desired
DSCP value was used on the various sockets regardless of the order of the
config tokens in the file (e.g. trap/inform before dscp...).
The integer value is stored in the data store and queried later when the
sockets are created. This applies to both IPv4 and IPv6, and for UDP and
TCP on top of it. While being at it, I tried cleaning up the "hack" with
the external usage of _netsnmp_udp_sockopt_set().
I added a section in the snmp_conf(5) man page describing the new config
The patch was generated against the git head some minutes ago. (dd2e35c3223ae717ef67b9c407c6a9a555448a92)