[Asterisk-code-review] lib/python/asterisk/pcap/py Replace construct_legacy.protocols (testsuite[13])
George Joseph
asteriskteam at digium.com
Tue Nov 19 08:25:56 CST 2019
Hello Kevin Harwell, Friendly Automation,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/c/testsuite/+/13222
to look at the new patch set (#2).
Change subject: lib/python/asterisk/pcap/py Replace construct_legacy.protocols
......................................................................
lib/python/asterisk/pcap/py Replace construct_legacy.protocols
The "protocols" module provides parsing for PCAP packets
layers 2-4 (Ethernet, IPv4/IPv6, UDP/TCP). The
Testsuite uses it to parse packets for the tests that
need that functionality.
It was originally part of the "construct" module but was removed
after v2.5.5. Unfortunately, it was and is the only
standalone/low overhead packet parsing module available.
This python package is an extract from the construct package v2.5.5.
Since construct itself underwent major API changes since v2.5.5,
the protocols code needed significant work to make it compatible
with the current construct version (2.9 at the time of this writing).
Since no functional changes were made, only API compatibility
changes, the original construct (license)[LICENSE.md] still
applies and is included here.
* Ported construct.protocols to construct 2.9 and added it
to lib/python.
* Updated pcap.py...
** Using /lib/python/PcapListener directly instead of through
test_case to make it a bit less complicated and to facilitate
standalone unit tests.
** Refactored for construct 2.9
** Removed references to construct.protcols
** Added a unit test.
cd <testsuite_dir>/lib/python/asterisk
PYTHONPATH=<testsuite_dir>/lib/python python2 pcap.py --help
* Updated tests that used construct_legacy to work with
construct 2.9
Change-Id: Id38d01a2cd073b240fde909a38c95d69313bbbe7
---
M lib/python/asterisk/pcap.py
M lib/python/asterisk/test_case.py
A lib/python/protocols/LICENSE.md
A lib/python/protocols/README.md
A lib/python/protocols/__init__.py
A lib/python/protocols/application/__init__.py
A lib/python/protocols/ipstack.py
A lib/python/protocols/layer2/__init__.py
A lib/python/protocols/layer2/arp.py
A lib/python/protocols/layer2/ethernet.py
A lib/python/protocols/layer2/mtp2.py
A lib/python/protocols/layer3/__init__.py
A lib/python/protocols/layer3/ipv4.py
A lib/python/protocols/layer3/ipv6.py
A lib/python/protocols/layer4/__init__.py
A lib/python/protocols/layer4/tcp.py
A lib/python/protocols/layer4/udp.py
A lib/python/protocols/unconverted/application/dns.py
A lib/python/protocols/unconverted/layer3/dhcpv4.py
A lib/python/protocols/unconverted/layer3/dhcpv6.py
A lib/python/protocols/unconverted/layer3/icmpv4.py
A lib/python/protocols/unconverted/layer3/igmpv2.py
A lib/python/protocols/unconverted/layer3/mtp3.py
A lib/python/protocols/unconverted/layer4/isup.py
M tests/channels/SIP/pcap_demo/run-test
M tests/channels/SIP/pcap_demo/test-config.yaml
M tests/channels/pjsip/rtp/rtp_keepalive/base/rtp.py
M tests/hep/hep_capture_node.py
28 files changed, 1,358 insertions(+), 133 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/22/13222/2
--
To view, visit https://gerrit.asterisk.org/c/testsuite/+/13222
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: 13
Gerrit-Change-Id: Id38d01a2cd073b240fde909a38c95d69313bbbe7
Gerrit-Change-Number: 13222
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191119/64116b40/attachment-0001.html>
More information about the asterisk-code-review
mailing list