The mibgen compiler generates a specific class for each enumerated type defined in the MIB. This class contains all the possible values defined in the enumerated type. The generated class extends the generic class Enumerated, defined in the com.sun.jdmk package. The HTML adaptor is able to use the Enumerated class to display all the labels contained in an enumeration. The mibgen tool is able to handle enumerated types defined as part of a type definition or in-line definition.
Generated code representing SNMP enumerated types is prefixed with Enum followed by the type name or the variable name for in-line definition.
The mibgen tool has an option ---p <prefix> that allows you to prefix the names of all generated files with a specific string.
In MIB II, TCP connection states are represented by an enumeration containing all the possible states for a TCP connection. The mibgen tool generates a Java class named EnumTcpConnState to represent the enumeration.