Add IPv6 support. Add parsing of VLAN and QinQ tagged ethernet packets #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IPv6:
This commit adds the ability to parse packets, captured by ipv6 speakers.
It is also possible to parse multiprotocol BGP-messages. IPv4 (testing required) and IPv6 are understood protocols.
Filtering source and destination ipv6 addresses is also possible. Filtering REACH_NLRI and UNREACH_NLRI fields are currently not implemented.
Output could look like this:
Because of the differnces between ipv4 and ipv6 i changed the signature of the following classmethod
This allows us to interpret ipv6 prefixes. The only thing which is not implemented is the ability to represent the ipv6 address as a number (16byte int). For consistency reason, i understand why one would implement a BGPRoute.decimal_ip_to_string() function for ipv6, but its not necessary at this point since its not used.
Feel free to contribute if you want to :)
VLAN/QinQ:
Ethernet frames containing a VLAN or QinQ tag are now able to be processed.
Filtering is also possible: --filter-service-vlan --filter-customer-vlan
If theres a VLAN tag only, use --filter-customer-vlan
With this commit no options or filter syntax changed, so you can use the parser just like before that commit.