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

move unpack logic to pyof #277

Open
erickvermot opened this issue Jul 14, 2017 · 0 comments
Open

move unpack logic to pyof #277

erickvermot opened this issue Jul 14, 2017 · 0 comments

Comments

@erickvermot
Copy link
Contributor

erickvermot commented Jul 14, 2017

As we have discussed prior to version b3, pyof doesn't have yet a version independent unpack function, and is not yet capable of unpacking Hello messages with a body properly, nor hello messages of version different from those available in pyof.
So that a proper handshake could be achieved, we have implemented a few utility methods in of_core.utils . The logic in these methods need to be incorporated in pyof, so that a single call to pyof.utils.unpack is necessary, instead of having to separate the hello unpack (GenericHello https://github.com/kytos/kytos-napps/blob/master/napps/kytos/of_core/main.py#L135) from the other unpacks (unpack https://github.com/kytos/kytos-napps/blob/master/napps/kytos/of_core/main.py#L152).

For this, we need first to:

  • move the unpack method to pyof. (it will also make sure that tests in pyof behave in the same way).
  • move packet validation to inside the unpack method (checks of length and valid version).
  • replace the call to of_core.utils.unpack to a call to pyof.utils.unpack
  • place tests for multiple hello messages with multiple versions and bodies.
  • fix the pyof hello unpack.
  • make sure it only raises UnpackException

And once pyof.utils.unpack is capable of unpacking any hello message:

  • replace the separate calls to unpack and GenericHello to a single call to pyof.utils.unpack.

make tests use the same unpack method as the lib - kytos/python-openflow#396
Provide a version independent unpack method - kytos/python-openflow#381
Version Unpacking Problems - kytos/python-openflow#344
Hello Messages compliance - optional elements - kytos/python-openflow#379
v0x04 Hello unpack bug - kytos/python-openflow#378

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

No branches or pull requests

1 participant