Repository navigation
refactor(protocols): index each protocol by its LinkType, EtherType, TransType or AppType value (#2627) - #2652
Conversation
|
GOOD TO GO at |
|
resolve conflicts |
|
The owner asked for the conflicts to be resolved. They are with #2651's rewrite of |
…TransType or AppType value (#2627) - Radiotap and FRAD return LinkType 127 and 107, and GRE TransType 47, where each returned its ARPHRD type. Netlink keeps ARPHRD_NETLINK, as LINKTYPE_NETLINK names the SLL-framed form. - L2TPv2, FTP, FTP_DATA, HTTP (inherited by HTTPv1 and HTTPv2), NGAP, TLS (inherited by SSLv3) and DTLS return their IANA port as an int: an AppType member is a str, which int() and operator.index() reject from __index__. TLS and DTLS return 443 and 5684, the ports TCP and UDP bind them at. The TCP and UDP registries are imported in __index__ to stay lazy (#1538). - Every dispatch table is unchanged: LinuxSLL keys its entries by literal ARPHRD members, and FRELAY and IP protocol 47 stay unbound, recorded in the reachability audit's UNBOUND table, checked both ways (#2649). - A new test pins each class's value from its registry number, and int() and operator.index() on an instance of each AppType-valued class; tests that pinned the ARPHRD values or the raises are updated. - registry-protocol.rst records the rule, the port form, the Netlink exception, and which classes raise and why; pep.rst, l2tp.rst and the L2TP docstrings drop the claim that a port is no index.
67bca46 to
e56b57c
Compare
|
Conflicts resolved, rebased onto
The patch-id outside the two resolved files is identical ( |
…he cut-frame fixes and GRE's bindings into 1.6.0 (#2449) - Breaking: TCP, UDP and SCTP makers (#2670) and PCAP-NG's (#2671) raise on a value a field cannot hold, where 1.5.x wrote it masked; each entry gives the old and new values. The TTL Diff wraps as before. - Changed: __index__ returns the LinkType, EtherType, TransType or AppType value, ports as ints (#2652); only Create Release waits for a deployment approval (#2658). The conventions entry records the index rule. - Fixed: a cut HTTP/2 SETTINGS frame parses and rebuilds; HTTPv2.make takes frame_length (#2666). - Folded into unreleased entries: FRAD at LinkType 107 and GRE at IP protocol 47 (#2667); cut IGMPv3 messages and num_group_records (#2662, #2672); Linux_ARPHRD (#2663); DCCP's range checks (#2670); a cut GRE frame is TRUNCATED, replacing fold-12's INVALID note, and frame_length in pcapkit.utilities.contextvars (#2668). - No entry for _make_sint's private allow_unsigned, ARP's private PAT_MAC_ADDR, or the test- and docs-only d728873, 326a6cf, fc80fb1, a37edf1 and 2766707. - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
refactor— changes neither behaviour nor performanceDescription of your pull request and other information
A protocol's
__index__returns its LinkType, EtherType, TransType or AppType value where one exists, as the owner ruled in session. registry-protocol.rst records the rule.int.TCP.https_443,UDP.coaps).ARPHRD.NETLINK.__index__, soimport pcapkitstill leavesapptype.tcpandapptype.udpunloaded.Dispatch maps and every capture are identical to
main. Sonnet cross-reviews confirmed the code at each round. The last one asked for one docs sentence, which this head fixes.Closes #2627