Constant Enumerations

The constant enumerations of pcapkit, generated by pcapkit.vendor.

Unrecognised Values

Nearly every registry below departs from enum in one deliberate way: looking up a value it does not define does not raise. Its _missing_ override returns a member-like object named for the unassigned or reserved band the value falls in. Only a value no band covers, or of the wrong type, raises ValueError.

That object is usually not installed: the registry does not grow, and a repeat lookup returns an equal but distinct object. The exceptions, of which Minting an Unrecognised Value gives the full split:

This lets the enumerations decode live captures, where a code assigned after this release was generated is routine, so iterating a registry need not list every value it resolves. Since whether a repeat lookup returns the same object varies by registry, compare unassigned members by value, not identity.

The template in pcapkit.vendor.default emits the override’s common form; the valid range and band names come from each registry’s source data, so the individual overrides are not documented per class.

See also

Registry Management covers the other half of extending a registry: once a code exists, registering a parser class, schema or engine against it.

Protocol Numbers

Internet Layer

Transport Layer

Application Layer

Miscellaneous