Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enumerations such as EtherType and IPProtocol cannot be programmatically expanded #10

Open
jsommers opened this issue Dec 26, 2016 · 0 comments
Assignees

Comments

@jsommers
Copy link
Owner

jsommers commented Dec 26, 2016

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant