switchyard icon indicating copy to clipboard operation
switchyard copied to clipboard

enumerations such as EtherType and IPProtocol cannot be programmatically expanded

Open jsommers opened this issue 9 years ago • 0 comments

If one wants to create a new protocol and corresponding packet header, and if the header would normally appear as a layer 3 or 4 protocol, it's not possible to change EtherType or IPProtocol w/o going in and modifying switchyard.lib.packet.common directly since the relevant enumerations are constant once created.

To fix this, will probably need to subclass IntEnum and create an appropriate method for adding new values to the enumeration.

Note that this isn't a limitation for app layer protocols, since Switchyard has no notion of mappings from ports to applications, so there are no restrictions on ports (i.e., they're just ints, not a value from an enumeration).

jsommers avatar Dec 26 '16 21:12 jsommers