1.7.0 – 2026-11-25¶
1.7.0 adds dissectors for PPP, PPPoE and DNS, decodes MLD in ICMPv6, SCTP’s I-DATA, FORWARD TSN and PAD chunks and the TLS extensions a current handshake carries, writes PCAP-NG, and lets an extraction feed any registered reassembler and flow tracer, not the built-ins alone. Its breaking changes, each marked a breaking change to and ending with how to migrate, are mostly to public signatures: extraction takes grouped options, and the reassembly, flow-tracing and registry interfaces take keyword-only parameters, one name per concept.
pcapkit.corekit¶
Added¶
pcapkit.corekit.schema.extlen, whoseext_len_to_octets()andoctets_to_ext_len()convert a length field counting 8-octet units past the first 8 (RFC 6564 Section 4) – the IPv6 extension headers’ Hdr Ext Len, MH’s Header Len and HIP’s Header Length – to a header’s octets and back, rounding down (#2854, #2871). Those headers and IPv6 reassembly convert through it, reading and writing the same octets as before.
Changed¶
a breaking change to where constants and helpers live, each moved with no re-export at its old path (#2883, #2896, #2897, #2895, #2903, #2919). A format constant that code outside its own protocol or family reads moves to a topic module of
pcapkit.corekit.const, a package that exports nothing itself:capturefor the PCAP and PCAP-NG ones,ipheaderfor the IPv4, IPv6 and AH ones, andtcpheaderfor TCP’s. A constant only a protocol package’s own modules read moves to aconstmodule in that package, and one a family shares to its base package’s, aspcapkit.protocols.application.ssl.constholds those of TLS and DTLS.family_byteorder()moves frompcapkit.protocols.link.loopback.protocoltopcapkit.corekit.schema.byteorder. Theversionremovednote of each old module in the API reference lists each moved name that no longer resolves there, with its new home. A name its old module still imports for its own use resolves there incidentally; the rest raiseImportError. To migrate, import each name from its new module, asfrom pcapkit.corekit.const.capture import MAGIC_NUMBER.
Fixed¶
an
Infocould iterate, print and export its fields in an earlier instance’s order on PyPy, which lays out a new instance’s__dict__that way, and aSchemabuilt byfrom_dict()in the order the mapping gave them, or on PyPy in an earlier instance’s. AnInforecords the order its fields were first set in as__keys__, a replaced field keeping its place, and aSchemalists its fields in__fields__order however it was built, then any other key it stores; iteration,repr,strandto_dict()follow that order on every interpreter (#2829, #2831, #2830, #2832).the first
Info.from_dictof anInfoclass could raiseRuntimeError: dictionary changed size during iterationwhen another thread’s first call for that class, or a first import, wrote a namespace it was copying, on an interpreter that switches threads part way through such a copy, which CPython does not. Raised under IPv4’s parse, it kept an Ethernet frame’s payload asRaw; a GraalPy failure that kept such a payload is inferred to be this race. A class’s nested types now resolve and cache underimport_lock, which every first import already holds (#2870, #2917).
pcapkit.dumpkit¶
Added¶
PCAPNGIO, a PCAP-NG writer, as thepcapngformat, with the.pcapngextension, of an extraction’s output, a flow tracer’s output and the command line’s--format(#2835, #2864). It writes one Section Header Block, an Interface Description Block per distinct interface and an Enhanced Packet Block per frame, without dissecting the frame again, and falls back to JSON under the same engines as the PCAP writer. A PCAP-NG frame keeps its interface’s options and its own, a Simple or obsolete Packet Block written as an Enhanced Packet Block; Name Resolution, Interface Statistics, Decryption Secrets, custom and journal blocks are not written.PCAP_NGnames the format besidePCAP, sincePCAPNGalready names the protocol class (#3047, #3051).
pcapkit.foundation¶
Changed¶
a breaking change to
Extractorandextract(): each takesfin, now required, then keyword-onlydump,engine,layer,protocol,context,reassembly,traceflow,stream,auto,storeandverbose(#2836, #2868). The output, reassembly, flow-tracing and input settings are grouped into the immutableDumpOptions,ReassemblyOptions,TraceFlowOptionsandStreamOptionsof the newpcapkit.foundation.options, whichpcapkitexports too, andreassemblyandtraceflowalso take a list of registered names.nofile,fout,format,extension,files,ip,ipv4,ipv6,tcp,dtls, thereasm_*,trace_*andbuffer_*parameters andno_eofare removed with no alias, and passing one raisesTypeError. No report is written withoutdump, where 1.6.x wroteout.txt, andfinis opened as named, with no.pcapappended.enginedefaults to'default'and refusesNone, which stood for it, withRegistryError; an unknownlayer, an unregistered name or an unknown flow-tracing format raisesFormatError, where an unknown trace format warned and wrote no flow files; and an empty list of names turns its feature off with anAttributeWarning. TheExtractor.traceproperty is renamedExtractor.traceflow, with no alias, andExtractor.make_nametakes(fin, dump). The command-line flags are unchanged. To migrate,extract('in.pcap', fout='out', format='json', reassembly=True, ipv4=True, trace=True, tcp=True), whosetcpenabled TCP reassembly as well as tracing, becomesextract('in.pcap', dump=DumpOptions(fout='out', format='json'), reassembly=['ipv4', 'tcp'], traceflow=['tcp']), andExtractor.traceis read asExtractor.traceflow.a breaking change to reassembly: any reassembler registered in
Extractor.__reassembly__can be enabled by name, and is made byExtractor.make_reassembly, for the extractor and forreassemble(), where IPv4, IPv6 and TCP alone were (#2814, #2825). An engine feeds each through apcapkit.toolkitadapter inEngineBase.__reassembly__, whichEngineBase.register_reassemblyandregister_engine_reassembly()extend, and drops one with no adapter with anAttributeWarning; the PyShark, PyPCAP and pcap-ct engines ship none, and the newpacket2timestamp()reads PyShark’s clock (#2893, #2901). Every enabled reassembler is advanced to each frame’s timestamp throughReassembly.advance, so a stalled IPv4 or IPv6 buffer reportsCompletion.TIMEOUTonce a later frame passes its timeout, where it reportedPARTIAL.ReassemblyManagerholds the enabled reassemblers by name, where it had a field per built-in, andReassemblyDataadds a field per further one. Thepcapkit.toolkit.pypcapandpcapkit.toolkit.pcap_ct*_reassemblystubs take(packet, timestamp, *, data_link, count)and still raiseUnsupportedCall, so a 1.6.x call withpacketalone raisesTypeError. The privateExtractor._ipv4,_ipv6and_dtlsare removed. To migrate, treat aTIMEOUTbuffer as incomplete, as a stalledPARTIALone was, and test whetherReassemblyManagerholds a reassembler’s name rather than whether its field isNone.a breaking change to flow tracing: any flow tracer registered in
Extractor.__traceflow__and named intraceflowis made and fed, where TCP’s alone was, through the newExtractor.make_traceflow, whichtrace()uses too (#2843, #2892, #2902). An engine feeds a tracer as it feeds a reassembler, through an adapter inEngineBase.__traceflow__, whichEngineBase.register_traceflowandregister_engine_traceflow()extend; PyPCAP and pcap-ct ship none.Extractor.traceflowandTraceFlowDatakeeptcp,Nonewhen TCP is not traced, and add a field per further tracer. An extraction that ends finishes every tracer even when one’sfinish()raises, re-raising the first error once the last has run. The privateExtractor._tcpis removed. To migrate, a caller tracing TCP alone changes nothing, and a further tracer is named intraceflow, with an adapter registered on each engine that ships none.a breaking change to the reassembly and flow-tracing signatures: each class and interface function takes its settings by keyword only, under its class’s names (#2837, #2839, #2894).
TraceFlowtakesfout,format,byteorder,nanosecond,bidirectionalandanalyze,foutandformatdefaulting to'./tmp'and'pcap', where they were required, andanalyseis renamedanalyze.TraceFlow.make_fout’sfmtis renamedformat, keyword-only, andTraceFlow.register_dumpertakesextby keyword only.Reassembly.registeris renamedReassembly.register_callback, as TraceFlow’s is, andsubmit’stimeoutflag is renamedexpired, each with no alias.DTLStakestimeout, off by default, so a caller’s reassembly timeout now expires DTLS buffers.TraceFlowManagerholds the enabled tracers by name, so it has notcpwhen TCP is not traced, where that wasNone.reassemble()takesstrict,storeandtimeout,strictdefaulting toTrue, where it wasFalse;trace()takes TraceFlow’s keywords and reaches any registered tracer; and both raiseRegistryErrorfor a name that is not astr.follow_tcp_stream()takesfin, now required, then keyword-onlyverbose,engineandtraceflow, aTraceFlowOptions, which replaces its trace keywords andextensionwith no alias (#2868), andengine=NoneraisesRegistryError, where it stood for'default'. A reassembly class’ssubmitis passedstore, for it to pass on to_notify, which stores a datagram before its callbacks run, andexpire()stores what it returns (#2856, #2866). To migrate, pass every setting by keyword, renameanalyse=,fmt=,register()andsubmit(timeout=...)as above, passreassemble()strict=Falsefor a 1.6.x call’s contiguous payload, have a customsubmitacceptstoreand pass it on, and do not also extend_dtgramwith whatexpire()returns.a breaking change to the wrappers of
pcapkit.foundation.registry: each takes the entry its classmethod takes as one parameter named after it –protocol,engine,dumper,reassembly,tracefloworadapter– a class or aModuleDescriptor, where it also took a module name and aclass_name, and a module name raisesRegistryError(#2838, #2878).register_apptypetakes its transports as a keyword-onlytransport, one or a list, where they were trailing positional arguments.register_reassembly_callback()andregister_traceflow_callback()take a registered name, reaching DTLS and any registered class, and replaceregister_reassembly_ipv4_callback,register_reassembly_ipv6_callback,register_reassembly_tcp_callbackandregister_traceflow_tcp_callback, removed with no alias. Every registrar taking amethrefuses one that is neither a method name nor a tuple of two callables, a list included, withRegistryErrorbefore touching a registry.pcapkit.interface.registrymoves topcapkit.corekit.registry, with no re-export at the old path. To migrate,register_ethertype(code, 'pkg.mod', 'Cls')becomesregister_ethertype(code, ModuleDescriptor('pkg.mod', 'Cls')),register_apptype(code, Cls, 'tcp')becomesregister_apptype(code, Cls, transport='tcp'), andregister_reassembly_ipv4_callback(fn)becomesregister_reassembly_callback('ipv4', fn).a breaking change to the layout of
pcapkit.foundation.reassemblyandpcapkit.foundation.traceflow: each reassembler –ip,ipv4,ipv6,tcpanddtls– and the TCP flow tracer is a package holding its class in areassemblyortraceflowmodule and its data models in adatamodule, aspcapkit.foundation.reassembly.tcpholdsreassemblyanddata, following 1.6.0’s protocol packages (#2882, #2926). A package’s__init__.pyexports its class and binds each data class asData_<name>; IPv4 and IPv6 reassembly read IP’s. Thedatasubpackages become the modulespcapkit.foundation.reassembly.dataandpcapkit.foundation.traceflow.data, holding the base data models, and theirIP_*,TCP_*andDTLS_*aliases, the modules they held,pcapkit.foundation.reassembly.ip.loggerandpcapkit.foundation.traceflow.tcp.loggerare removed, with no re-export at any old path; aversionremovednote in the API reference gives each name that moved.IPv4_Reassembly,TCP_TraceFlowand the other package exports are unchanged. A reassembly or flow-tracing data model pickled by 1.6.x raisesModuleNotFoundErrorwhen loaded, as the pickle names its 1.6.x module. To migrate,from pcapkit.foundation.reassembly.data import TCP_Datagram, which raisesImportError, becomesfrom pcapkit.foundation.reassembly.tcp import Data_Datagram, and a pickled data model is regenerated under 1.7.0.a flow tracer keeps each flow’s output file open between its frames, where 1.6.x reopened it for every frame, up to
TRACE_OPEN_FILE_LIMITfiles, set byPCAPKIT_TRACE_OPEN_FILE_LIMIT, 64 by default,0reopening per frame and-1for no limit; past it the file written least recently is closed (#2815, #2821). Each frame is flushed, so the files are byte-identical. A flow’s file closes when the flow is finalised, before its callbacks run, atfinish(), on an error tracing a frame, and when the tracer is collected.PCAPIOand the writersmake_dumper()builds gainopen()andclose(). Tracinghttp.pcapto PCAP took about 31% less time, measured on the tracer alone; JSON output, dominated by serialising, gains nothing measurable.
Fixed¶
a reassembly or flow-tracing callback that raised lost what it was handed: a TCP flow dropped out of the tracer’s
indexandsubmit()(#2827, #2845), and a reassembled datagram out ofdatagram(#2856, #2866), each stored only once its callbacks returned. Each is stored first, and the exception still propagates. A unidirectional flow ending on a FIN ran its callbacks before that frame was written, so a callback found one frame fewer in the file than the index listed, and a raising one left the file short; the frame is written first. A raising callback no longer skips the ones after it: every reassembly and trace callback runs, the firstExceptionre-raised once the last has run and later ones logged at debug, through the newrun_callbacks(), while any otherBaseExceptionstill stops them (#2855, #2881, #2875, #2884). A reassembly callback readingdatagramwhile another buffer was outstanding recursed untilRecursionError, and gets the datagrams stored so far (#2867, #2884). Anauto=Falseextraction whose trace callback raised at the end of the capture left its input file open and its engine unclosed; both are released, and the callback’s error propagates (#2857, #2891).Extractor.register_engine,Extractor.register_reassembly,Extractor.register_traceflowand theirpcapkit.foundation.registrywrappers stored a name as given, while every lookup lower-cases it, so an engine registered throughregister_engine('MyEngine', ...)could not be selected. Each stores the name lower-cased, and refuses a name that is not astrwithRegistryError, asExtractor.make_reassemblyandreassemble()do (#2879, #2891).the API page of the TCP flow tracer,
TCP, documents itsnameandprotocolproperties, which 1.6.x left off it, asTraceFlowMeta’s class properties of the same names hide them from autodoc (#2910).reassembled payloads are parsed with the extraction’s
layerandprotocolstops and itscontext, as the frame path parses them: an ESP datagram reassembled over IP decrypts withextract(context=...), and a stop applies to the reassembled payload and at the reassembled layer. With neither set nothing changes, and the third-party engines, which ignore stops and context for their frames, ignore them here too. A reassembled TCP payload keptRawnow records its port asprotocolrather thanNone(#2933, #2940).
pcapkit.protocols¶
Added¶
PPP(RFC 1661, RFC 1662) andPPPoE(RFC 2516), dissectors for the Point-to-Point Protocol and PPP over Ethernet (#2817, #2828). PCAP and PCAP-NG frames ofLINKTYPE_PPP(9) andLINKTYPE_PPP_HDLC(50), EtherType0x880B, a PPPoE session packet and an L2TPv2 data message, whose payload 1.6.x kept asRaw, dispatch to PPP; frames ofLINKTYPE_PPP_ETHER(51) and EtherTypes0x8863and0x8864dispatch to PPPoE. PPP reads the Address and Control fields where the frame carries them and a one-octet Protocol field under Protocol-Field-Compression, refuses Cisco HDLC underLINKTYPE_PPP_HDLC, and dispatches IPv4 and IPv6 onward; LCP, IPCP, IPv6CP, PAP and CHAP are read at header level, their Code, Identifier and Length, the rest kept asRaw.register_ppp()registers a dissector for a further protocol number, andregister_ppp_control()a control-packet parser. PPPoE reads a discovery packet’s tags and a session packet’s PPP frame, telling the stages apart by the Code, keeps the octets past its Length astrailer, and refuses a Length ending inside a tag; itsmake()refuses a length or tag it would not read back. The protocol numbers, codes and tags arepcapkit.const.pppandpcapkit.const.pppoe, crawled from IANA and exported asPPP_Protocol,PPPoE_CodeandPPPoE_Tag.MLDv1 (RFC 2710) and MLDv2 (RFC 9777) in
ICMPv6: types 130, 131, 132 and 143 decode intoMLDv1,MLDv2QueryandMLDv2Report, an MLDv2 Report’s records asMulticastAddressRecordwith IGMPv3’s record types, and rebuild byte-exact, whole or cut (#2812, #2818). A Query of 28 octets or more is MLDv2’s;make()takes a Query’sversionand refuses MLDv2’s fields in an MLDv1 Query.hoist_short_read()records on the header a cut inside an MLDv2 or IGMPv3 body.compute_upper(), through whichIPv6.makecomputes the pending checksum of an upper layer behind any chain of extension headers (#2824, #2850), andIPv4.makeone behind one or more Authentication Headers (#2861, #2885). 1.6.x computed it only for a payload directly after the IP header, soIPv4(protocol=51, payload=AH(next=6, payload=TCP(...)))left TCP’s at0000and verifiedINVALID. The pseudo-header is the one the receiver derives from the packet parsed back: a Home Address option’s address as the source (RFC 6275 Section 6.1.1), and the final destination of a Routing header (RFC 8200 Section 8.1) or an IPv4 source route. Where the packet gives none, as for any fragment but an atomic one, the checksum stays pending, quietly; a checksum given is kept.SCTP chunk and parameter types that 1.6.x parsed as unknown (#2811, #2823): the I-DATA and I-FORWARD-TSN chunks (RFC 8260), the FORWARD TSN chunk and Forward-TSN-Supported parameter (RFC 3758), the PAD chunk and Padding parameter (RFC 4820), and the Supported Extensions parameter (RFC 5061), each read and built by
SCTP. The first DATA or I-DATA chunk picks the next layer by its PPID. I-DATA’s PPID/FSN field is the PPID withBset and the FSN otherwise, and the maker refuses either out of place. A FORWARD TSN or I-FORWARD-TSN Length that leaves part of a stream entry raisesProtocolError.DNS, a dissector for the Domain Name System at TCP and UDP port 53 (#2816, #2826). It reads the header, the four sections, the RDATA of A, NS, CNAME, SOA, PTR, MX, TXT, AAAA, SRV and CAA records, and the EDNS(0) OPT pseudo-record (RFC 6891) with itsedns-client-subnet,COOKIE,edns-tcp-keepaliveand Extended DNS Error options; any other type or option, or RDATA its decoder cannot read exactly, is kept as octets. Each name records the compression it was read with, so a message rebuilds byte-exact, andmake()writes names plain or, withcompress=True, compressed. Over TCP,framed=Truereads and writes the two-octet length field, and a parse not given it takes the framed reading where that decodes better; a further whole message in the segment is anotherDNSlayer, the previous one’s payload.register_dns_rdata()andregister_dns_option()register a further RR type or option. The classes, RR types, opcodes, RCODEs and option codes arepcapkit.const.dns, crawled from IANA and exported asDNS_RRClass,DNS_RRType,DNS_Opcode,DNS_RCodeandDNS_Option.decoding of the TLS extensions a current
ClientHello,ServerHello,HelloRetryRequestandEncryptedExtensionscarry, each in the messages its RFC defines it in, which 1.6.x kept as octets (#2810, #2820):status_request,ec_point_formats,signed_certificate_timestamp,padding,extended_main_secret,compress_certificate,record_size_limit,session_ticket,pre_shared_key,early_data,cookie,psk_key_exchange_modes,post_handshake_auth,encrypted_client_hello, itsretry_configsdown to eachECHConfig, andrenegotiation_info. An empty body reads asEmpty, and a GREASE value stays octets. The EC point formats, certificate status types, PSK key exchange modes and certificate compression algorithms are newpcapkit.const.tlsregistries crawled from IANA, exported asTLS_ECPointFormat,TLS_CertificateStatusType,TLS_PskKeyExchangeModeandTLS_CertificateCompressionAlgorithm. So are IANA’s HPKE identifiers,HpkeKemId,HpkeKdfIdandHpkeAeadId, exported asTLS_HpkeKemId,TLS_HpkeKdfIdandTLS_HpkeAeadId, as whichencrypted_client_hellodecodes itskem_id,kdf_idandaead_id, its maker taking a member or anintfor each (#2851, #2873). A KEM name keeps its parenthetical, soDHKEM(X25519, HKDF-SHA256)isDHKEM_X25519_HKDF_SHA256.
Changed¶
a breaking change to TLS extensions. Each type
SSL.__extension__decodes has a concrete schema in the newpcapkit.protocols.application.ssl.schema, registered under itsExtensionTypeand exported by the package asSchema_<name>(#2833, #2849). A(parser, constructor)pair registered throughregister_tls_extension()is handed theextension_dataunpacked by that schema and returns one, where 1.6.x handed it and took back octets;register_tls_extensiontakes the schema asschema=, and a constructor returning anything else is refused withProtocolError. Extensions 1.6.x decoded in any message decode only where their RFCs define them, and are kept as octets elsewhere (#2852, #2853, #2874):supported_groupsin aClientHelloorEncryptedExtensions,signature_algorithmsin aClientHelloorCertificateRequest, ALPN in aClientHello,ServerHelloorEncryptedExtensions, andconnection_idin a DTLSClientHelloorServerHelloonly (RFC 9146 Section 10.2), never in a TLS record. Their makers refuse keyword arguments for any message other than the ones their RFCs define them in. An emptyserver_namein aServerHelloorEncryptedExtensionsreads asEmpty, where it read asb'', and an empty one in aClientHellois kept as octets. To migrate, register a pair withschema=, a subclass ofExtension, whose parser reads that schema and whose constructor returns one, and expect octets for an extension outside the messages its RFC defines it in.a breaking change to
MHandHIP: their checksums are verified and computed over the IP pseudo-header (RFC 6275 Section 6.1.1, RFC 7401 Section 5.1.1), as TCP’s, UDP’s and ICMPv6’s are, where 1.6.x only recorded the field (#2813, #2822). UnderPCAPKIT_CHECKSUM_VERIFYthe enclosing IP layer recordschecksum_statuson the data model, including for an MH or HIP header that ends IPv6’s extension-header walk, and MH over IPv4 isNO_PSEUDO_HEADER.make()computes a checksum it is not given, overpseudoor by the enclosing IP layer, so the octets built change, andMH.maketakes it aschecksum, as HIP’s does, where 1.6.x tookchksum; the data model’s field stayschksum. To migrate,MH.make(chksum=...)becomesMH.make(checksum=...).a breaking change to building
AH:make()pads the ICV with the fewest zero octets that make the header a multiple of 4 octets, or of 8 in IPv6 (RFC 4302 Section 2.6), counted in Payload Length, where 1.6.x cut the ICV to a multiple of 4, so a 6-octet ICV builds a 20-octet header where it built 16 and dropped two octets (#2886, #2888). Keyword-onlyversion, 4 by default, andextension=Truepick the alignment, and a keyword-onlypayload_lengthis written as given, which a rebuild passes so that a captured header rebuilds as captured.make()refuses withProtocolErroraversionother than 4 or 6, an ICV too long for Payload Length, which 1.6.x wrapped, and apayload_lengththat does not describe the ICV exactly.IPv6.makerefuses an extension header given as a layer that is not a multiple of 8 octets (RFC 8200 Section 4), ESP excepted. Read on its own, an AH header whose captured Payload Length is short of its 12 fixed octets is refused, as a whole one is, and one cut at or before Payload Length rebuilds as captured (#2880, #2886). To migrate, an ICV already a multiple of 4 octets builds as before, and an AH header for IPv6 is built withversion=6.a breaking change to the
Rawfallback ofProtocol.analyzeandTransport.analyze: itsprotocolis the code dispatched on,Transport.analyze’s port as anint, as the per-frameRawrecords it, where it wasNone, andpcapkit.protocols.transport.transport.logger, which nothing logs to any more, is removed with no alias (#2862, #2877). To migrate, expect the dispatch code in the fallback’sprotocol, and configure the package’s logger,pcapkit.utilities.logging.logger, rather than the removed one.
Fixed¶
a layer parsed on its own from octets that end inside its header warned
packet length < 0for each field past the cut, and most protocols then refused it: in 1.6.x, TCP from 3 octets raisedProtocolError: Field padding resolved to a negative length, and IPv4, IPv6 and ICMPv6 raised too, while UDP parsed. Every protocol now reads such a cut as a quiet short read and rebuilds it as captured, as inside a frame, its checks of a header length, version or length leaving a zero the cut left to the short read, ascut_on_its_own()tells them (#2880, #2887). ICMP and ICMPv6 messages cut inside their fixed fields, which raisedField data resolved to a negative length, read the same way (#2848, #2876). A cut inside a TCP or IPv4 option, the PCAP magic, IGMP’s length classification, NGAP’s PER decode and the TLS, DTLS, SSLv3 and HTTP/2 framing stay refused, and inside a frame nothing changes. SoIPv4.analyze(6, b'\x00\x01')gives a TCP short read where it gaveRaw, and an empty payload analyses asNoPayload, as a frame’s does, where it gaveRaw.an ICMPv6 Destination Unreachable or Time Exceeded message, or an ICMP Destination Unreachable, Time Exceeded or Parameter Problem message, that the capture cut inside its unused octets parsed, but raised
ProtocolErrorrebuilt throughfrom_data. Its maker zero-fills the octets the cut left, as MH’s and OSPF’s do, and the rebuild cuts back to the octets captured; unused octets the cut did not leave are still refused (#2819, #2844).the
Rawfallback ofProtocol.analyzeandTransport.analyze, through whichip_datagram(),tcp_datagram()and reassembly parse a payload, differed from the per-frame one. It held only the octets the failed parse left unread, soIPv4.analyze(6, bytes(range(30)))gave aRawof none; it holds them all, with the failure aserror(#2842, #2858). The refusal logged atCRITICAL, or atERRORwith a traceback fromTransport.analyze, let the failed parse’s warnings escape and installed the exception hooks; it is quiet, as underbeholder, any other absorbed error logging atWARNING(#2862, #2877).Raw.from_datakeeps its info’serrorandprotocol, which it dropped, so a rebuilt protocol chain names the code rather thanRaw(#2863, #2869).with
PCAPKIT_CHECKSUM_VERIFYon, an IPv4 or IPv6 layer parsed or built on its own whose upper layer’s pseudo-header cannot be derived – behind a Routing header of a type not parsed with segments left, or in a first fragment – logged the refusal atCRITICALand replacedsys.excepthook()andthreading.excepthook().verify_upper()keeps it quiet, and the upper layer recordsNO_PSEUDO_HEADERas before (#2859, #2872).ESP’smake()andfrom_schema()raisedTypeErrorfor a protocol or schema payload, asESP(spi=1, seq=1, payload=TCP(srcport=1, dstport=2))did. Each takes the payload’s packed octets, and the packet rebuilds byte-exact (#2860, #2865).on PyPy, building a CALIPSO option in
HOPOPTorIPv6_Optsfrom abytearraybitmap left the bitmap exported until collected, so resizing it raisedBufferError. It is copied through a view released at once (#2807, #2808).
pcapkit.vendor¶
Fixed¶
a generated member comment that opens with reST block markup, such as IANA’s
*forRRType.ANY, rendered as a list or a block on its API page. The crawlers now escape it, so the comment reads as written (#3049, #3052).
Project infrastructure¶
Changed¶
the API pages group a class’s members under a subtitle for each section comment of its body – Properties, Methods, Data Models and the like – in the order the source gives them, inherited members after the class’s own, base by base in method resolution order; 1.6.x ordered the protocol pages alone, with no subtitles.
util/member_sections.pywrites the lists, and a project test fails on a page out of step (#2907, #2909).the
docsextra pinssphinx-autodoc-typehints3.17.6, where 1.6.2 pinned 3.17.5 (#2931).SECURITY.mdnames PyPy 3.11 and 3.12 among the supported interpreters, as part of the blocking tier, andutil/update_python_versions.pykeeps the list in step with the tier file (#3048, #3053).