DCCP - Datagram Congestion Control Protocol¶
pcapkit.protocols.transport.dccp contains
DCCP only,
which implements the extractor for Datagram Congestion
Control Protocol (DCCP) [*], whose generic header is
described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Source Port |
2 |
16 |
|
Destination Port |
4 |
32 |
|
Data Offset |
5 |
40 |
|
HC-Sender CCID Value (CCVal) |
5 |
44 |
|
Checksum Coverage (CsCov) |
6 |
48 |
|
Checksum |
8 |
64 |
|
Reserved (Res) |
8 |
67 |
|
Packet Type |
8 |
71 |
|
Extended Sequence Numbers (X) |
9 |
72 |
|
Reserved (if X set) |
10 |
80 |
|
Sequence Number (48 bits if X set) |
With X clear, the Sequence Number is 24 bits at octet 9 and the generic
header 12 octets long. The fields of the packet type, then the options, follow.
Added in version 1.6.0.
- class pcapkit.protocols.transport.dccp.DCCP(file=None, length=None, **kwargs)[source]¶
-
This class implements Datagram Congestion Control Protocol.
No application protocol is registered in
self.__proto__, so the application data area isRawunless one is.This class supports parsing of the following DCCP options, which are directly mapped to the
pcapkit.const.dccp.option.Optionenumeration:Option Code
Option Parser
Option Constructor
Any other option is kept as its type, length and data, through
_read_opt_unassigned()and_make_opt_unassigned().The checksum is computed when
make()is given none, over thepseudoit is given or by the enclosing IP layer, and verified by that layer underCHECKSUM_VERIFY, over the part of the packet the Checksum Coverage gives (RFC 4340 Section 9).- classmethod register_option(code, meth)[source]¶
Register an option parser.
- Parameters:
- Warns:
RegistryWarning– If a different entry is already registered forcode; it is overwritten. Handing back the entry already stored, or one equal to it, is a silent no-op.
- read(length=None, **kwargs)[source]¶
Read Datagram Congestion Control Protocol (DCCP).
Structure of DCCP generic header with
Xset [RFC 4340]:0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Port | Dest Port | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data Offset | CCVal | CsCov | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | |X| | . | Res | Type |=| Reserved | Sequence Number (high bits) . | | |1| | . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . Sequence Number (low bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Acknowledgement Number Subheader of every packet type but DCCP-Request, DCCP-Data and DCCP-Listen follows, then the Service Code of a DCCP-Request, DCCP-Response or DCCP-Listen (RFC 5596), or the Reset Code and Data octets of a DCCP-Reset, then the options.
- Parameters:
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the Data Offset is smaller than the header the packet type has, or declares more header than the data holds (RFC 4340 Section 5.1).
- make(srcport=0, dstport=0, ccval=0, cscov=0, checksum=None, reserved=0, type=PacketType.DCCP_Request, x=True, seq_reserved=0, seq=0, ack_reserved=0, ack=0, service_code=0, reset_code=ResetCode.Unspecified, reset_data=bytes(3), options=None, payload=b'', pseudo=None, **kwargs)[source]¶
Make (construct) packet data.
- Parameters:
ccval (
int) – Value used by the HC-Sender CCID.cscov (
int) – Checksum coverage, see RFC 4340 Section 9.2; written as zero where it reaches the end of the packet and the checksum is computed, as Linux did.checksum (
bytes|None) – Checksum; ifNoneandCHECKSUM_COMPUTEis on, computed overpseudoand the part of the packetcscovgives, or left to an IP layer this packet is the payload of; zero otherwise.reserved (
int) – Reserved bits (Res).type (
PacketType|int) – Packet type.x (
bool) – Whether the sequence and acknowledgement numbers are 48 bits rather than 24 bits.seq_reserved (
int) – Reserved octet ahead of a 48-bit sequence number.seq (
int) – Sequence number.ack_reserved (
int) – Reserved bits of the acknowledgement number subheader, in a packet type that carries one.ack (
int) – Acknowledgement number, in a packet type that carries one.service_code (
int) – Service code of a DCCP-Request, DCCP-Response or DCCP-Listen.reset_data (
bytes) – Data 1, Data 2 and Data 3 of a DCCP-Reset.options (
list[Option|tuple[Option|int,dict[str,Any]] |bytes] |OrderedMultiDict[Option,Option] |None) – DCCP options, padded with Padding options to a multiple of 32 bits.payload (
bytes|ProtocolBase|Schema) – Payload, i.e. the application data area.pseudo (
IP_Pseudo|None) – Pseudo-header of the enclosing IP layer; its length is replaced by this packet’s own.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed packet data.
- Raises:
ProtocolError – If
srcportordstportis abool,type(4 bits),reset_code(8 bits) or the type of an option inoptions(8 bits) is a name, abool, or a member or code that does not fit its field, the header with its options runs past the 1020 octets a Data Offset can give, an option maker rejects its option, a numeric field does not fit its width,checksumis not two octets, orreset_datais not three.
- _verify_pseudo_checksum(pseudo)[source]¶
Verify the checksum over the pseudo-header of the enclosing IP layer.
That layer calls this once parsed, see
verify_upper(). The checksum covers what the Checksum Coverage gives; one covering past the end of the packet is invalid (RFC 4340 Section 9.2).- Parameters:
pseudo (
IP_Pseudo|None) – Pseudo-header, orNoneif the IP layer gives none.- Warns:
ChecksumWarning– If the checksum or its coverage is invalid.
- _read_opt_unassigned(schema, *, options)[source]¶
Read DCCP unassigned option.
- Parameters:
schema (
UnassignedOption) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_padding(schema, *, options)[source]¶
Read DCCP padding option.
Structure of DCCP padding option [RFC 4340 Section 5.8.1]:
+--------+ |00000000| +--------+ Type=0
- Parameters:
schema (
Padding) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_mandatory(schema, *, options)[source]¶
Read DCCP mandatory option.
Structure of DCCP mandatory option [RFC 4340 Section 5.8.2]:
+--------+ |00000001| +--------+ Type=1
- Parameters:
schema (
Mandatory) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_slow_receiver(schema, *, options)[source]¶
Read DCCP slow receiver option.
Structure of DCCP slow receiver option [RFC 4340 Section 11.6]:
+--------+ |00000010| +--------+ Type=2
- Parameters:
schema (
SlowReceiver) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_change(schema, *, options)[source]¶
Read DCCP Change L or Change R option.
Structure of DCCP Change options [RFC 4340 Section 6.1]:
+--------+--------+--------+--------+-------- | Type | Length |Feature#| Value(s) ... +--------+--------+--------+--------+-------- Type=32 or 34
- Parameters:
schema (
Change) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_confirm(schema, *, options)[source]¶
Read DCCP Confirm L or Confirm R option.
Structure of DCCP Confirm options [RFC 4340 Section 6.2]:
+--------+--------+--------+--------+-------- | Type | Length |Feature#| Value(s) ... +--------+--------+--------+--------+-------- Type=33 or 35
- Parameters:
schema (
Confirm) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_init_cookie(schema, *, options)[source]¶
Read DCCP init cookie option.
Structure of DCCP init cookie option [RFC 4340 Section 8.1.4]:
+--------+--------+--------+--------+--------+-------- |00100100| Length | Init Cookie Value ... +--------+--------+--------+--------+--------+-------- Type=36
- Parameters:
schema (
InitCookie) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_ndp_count(schema, *, options)[source]¶
Read DCCP NDP count option.
Structure of DCCP NDP count option [RFC 4340 Section 7.7]:
+--------+--------+-------- ... --------+ |00100101| Length | NDP Count | +--------+--------+-------- ... --------+ Type=37 Len=3-8 (1-6 bytes)
- Parameters:
schema (
NDPCount) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_ack_vector(schema, *, options)[source]¶
Read DCCP Ack Vector option.
Structure of DCCP Ack Vector options [RFC 4340 Section 11.4]:
+--------+--------+--------+--------+--------+-------- |0010011?| Length |SSLLLLLL|SSLLLLLL|SSLLLLLL| ... +--------+--------+--------+--------+--------+-------- Type=38/39 \___________ Vector ___________...
- Parameters:
schema (
AckVector) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_data_dropped(schema, *, options)[source]¶
Read DCCP data dropped option.
Structure of DCCP data dropped option [RFC 4340 Section 11.7]:
+--------+--------+--------+--------+--------+-------- |00101000| Length | Block | Block | Block | ... +--------+--------+--------+--------+--------+-------- Type=40 \___________ Vector ___________ ...
A block is a normal block,
0then a 7-bit run length, or a drop block,1then a 3-bit drop code and a 4-bit run length.- Parameters:
schema (
DataDropped) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_timestamp(schema, *, options)[source]¶
Read DCCP timestamp option.
Structure of DCCP timestamp option [RFC 4340 Section 13.1]:
+--------+--------+--------+--------+--------+--------+ |00101001|00000110| Timestamp Value | +--------+--------+--------+--------+--------+--------+ Type=41 Length=6
- Parameters:
schema (
Timestamp) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_timestamp_echo(schema, *, options)[source]¶
Read DCCP timestamp echo option.
Structure of DCCP timestamp echo option [RFC 4340 Section 13.3]:
+--------+--------+--------+--------+--------+--------+ |00101010| Length | Timestamp Echo | +--------+--------+--------+--------+--------+--------+ Type=42 +--------+--------+------- ... -------+ | Elapsed Time | (6 or 8 octets) | (Length 8 or 10) +--------+--------+------- ... -------+
- Parameters:
schema (
TimestampEcho) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_elapsed_time(schema, *, options)[source]¶
Read DCCP elapsed time option.
Structure of DCCP elapsed time option [RFC 4340 Section 13.2]:
+--------+--------+--------+--------+ |00101011|00000100| Elapsed Time | +--------+--------+--------+--------+ Type=43 Len=4 +--------+--------+--------+--------+--------+--------+ |00101011|00000110| Elapsed Time | +--------+--------+--------+--------+--------+--------+ Type=43 Len=6
- Parameters:
schema (
ElapsedTime) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _read_opt_data_checksum(schema, *, options)[source]¶
Read DCCP data checksum option.
Structure of DCCP data checksum option [RFC 4340 Section 9.3]:
+--------+--------+--------+--------+--------+--------+ |00101100|00000110| CRC-32c | +--------+--------+--------+--------+--------+--------+ Type=44 Length=6
- Parameters:
schema (
DataChecksum) – parsed option schemaoptions (
OrderedMultiDict[Option,Option]) – extracted DCCP options
- Return type:
- Returns:
Parsed option data.
- _make_dccp_options(options)[source]¶
Make options for DCCP.
- Parameters:
options (
list[Option|tuple[Option|int,dict[str,Any]] |bytes] |OrderedMultiDict[Option,Option]) – DCCP options- Return type:
- Returns:
Tuple of options and total length of options.
- Raises:
ProtocolError – If the type of an option, given in a
(type, kwargs)pair or as the key of a container, is a name, aboolor a code its field cannot carry, or if an option given as raw octets is empty (#2723).
Note
The options are emitted in the given order, Padding included, so that a parsed option list re-emits the same octets. Padding options are added after them only when the list does not end on a 32-bit boundary (RFC 4340 Section 5.8).
- _make_opt_unassigned(code, opt=None, *, data=b'', **kwargs)[source]¶
Make DCCP unassigned option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If
datais given for a single-octet type.
- _make_opt_slow_receiver(code, opt=None, **kwargs)[source]¶
Make DCCP slow receiver option.
- Parameters:
code (
Option) – option typeopt (
SlowReceiver|None) – option data**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- _make_opt_change(code, opt=None, *, feature=Feature.Congestion_Control_ID, value=b'', **kwargs)[source]¶
Make DCCP Change L or Change R option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If
valueis given without afeature, orfeatureis a name, abool, or a member or code that does not fit 8 bits.
- _make_opt_confirm(code, opt=None, *, feature=Feature.Congestion_Control_ID, value=b'', **kwargs)[source]¶
Make DCCP Confirm L or Confirm R option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If
valueis given without afeature, orfeatureis a name, abool, or a member or code that does not fit 8 bits.
- _make_opt_init_cookie(code, opt=None, *, cookie=b'', **kwargs)[source]¶
Make DCCP init cookie option.
- Parameters:
code (
Option) – option typeopt (
InitCookie|None) – option datacookie (
bytes) – cookie**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ndp_count(code, opt=None, *, count=0, **kwargs)[source]¶
Make DCCP NDP count option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If
countis not an unsigned integer that fits six octets.
- _make_opt_ack_vector(code, opt=None, *, vector=(), **kwargs)[source]¶
Make DCCP Ack Vector option.
- Parameters:
code (
Option) – option type, whose nonce the option carriesvector (
Iterable[AckVectorRun|tuple[AckVectorState|int,int]]) – runs, each aAckVectorRunor a(state, run_length)pair**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If a state is a name, a
bool, or a member or code that does not fit 2 bits, or a run length does not fit 6 bits.
- _make_opt_data_dropped(code, opt=None, *, vector=(), **kwargs)[source]¶
Make DCCP data dropped option.
- Parameters:
code (
Option) – option typeopt (
DataDropped|None) – option datavector (
Iterable[DataDroppedBlock|tuple[DropCode|int|None,int]]) – blocks, each aDataDroppedBlockor a(code, run_length)pair,codebeingNonefor a normal block**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If a run length does not fit 7 bits in a normal block, or in a drop block a run length does not fit 4 bits or the drop code is a name, a
bool, or a member or code that does not fit 3 bits.
- _make_opt_timestamp(code, opt=None, *, timestamp=0, **kwargs)[source]¶
Make DCCP timestamp option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If
timestampdoes not fit four octets.
- _make_opt_timestamp_echo(code, opt=None, *, timestamp=0, elapsed=None, **kwargs)[source]¶
Make DCCP timestamp echo option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If
timestamporelapseddoes not fit four octets.
- _make_opt_elapsed_time(code, opt=None, *, elapsed=0, **kwargs)[source]¶
Make DCCP elapsed time option.
- Parameters:
code (
Option) – option typeopt (
ElapsedTime|None) – option dataelapsed (
int) – elapsed time, in hundredths of milliseconds, in two octets if it fits and four otherwise**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If
elapseddoes not fit four octets.
- _make_opt_data_checksum(code, opt=None, *, checksum=bytes(4), **kwargs)[source]¶
Make DCCP data checksum option.
- Parameters:
code (
Option) – option typeopt (
DataChecksum|None) – option datachecksum (
bytes) – CRC-32c of the application data, as on the wire**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- __proto__: DefaultDict[int, ModuleDescriptor[ProtocolBase] | Type[ProtocolBase]]¶
Protocol index mapping for decoding next layer, see
self._decode_next_layer&self._import_next_layer. Keyed by port number, and empty until a protocol is registered.
- __proto_key__: ClassVar[tuple[Type[EnumRegistry], bool]]¶
What
__proto__is keyed by – the enum a key must be a member of, and whether a bareintis a valid key there too, as forTCP.__proto_key__.
- __option__: DefaultDict[int, str | tuple[Callable[[Option, OrderedMultiDict[Option, Option]], Option], Callable[[Option, Option | None, Any], Option]]]¶
Option type to method mapping, see
_read_dccp_options()and_make_dccp_options(). Astrvalue names the methods_read_opt_${name}and_make_opt_${name}, falling back to_read_opt_unassigned()and_make_opt_unassigned()when the class has no such method; any other value is a(parser, constructor)pair of callables.
- pcapkit.protocols.transport.dccp.DCCP_MAX_HEADER_LEN = 1020¶
Longest a DCCP header can be – a Data Offset of 255 words, RFC 4340 Section 5.
Header Schemas¶
- pcapkit.protocols.schema.transport.dccp.DCCP_MIN_HEADER_LEN = 12¶
Length of the generic header with 24-bit sequence numbers (
Xclear), the shortest a DCCP header can be, RFC 4340 Section 5.1. The one home of this value (#1739); it is fixed by the RFC, so it is never configurable.
- pcapkit.protocols.schema.transport.dccp.DCCP_SINGLE_OCTET_OPTION_MAX = 31¶
Option types up to this one are single octets, without a length, RFC 4340 Section 5.8.
- pcapkit.protocols.schema.transport.dccp.ACK_TYPES¶
Packet types carrying an Acknowledgement Number Subheader – every one RFC 4340 Section 5 defines but DCCP-Request and DCCP-Data. DCCP-Listen (RFC 5596 Section 2.2.1) carries none either.
- pcapkit.protocols.schema.transport.dccp.SERVICE_TYPES¶
Packet types carrying a Service Code – DCCP-Request, DCCP-Response and DCCP-Listen (RFC 4340 Section 5.2, RFC 5596 Section 2.2.1).
- pcapkit.protocols.schema.transport.dccp.RESET_TYPE = <PacketType.DCCP_Reset: 7>¶
Packet type of DCCP-Reset, which carries a Reset Code and three Data octets, RFC 4340 Section 5.6.
- pcapkit.protocols.schema.transport.dccp.header_length(field)[source]¶
Length of the generic header and the fields its packet type adds.
- Parameters:
field (
TypeField) – The packet type and extended sequence numbers flag.- Return type:
- Returns:
The octets ahead of the options, RFC 4340 Section 5.
- class pcapkit.protocols.schema.transport.dccp.DCCP(srcport=NO_VALUE, dstport=NO_VALUE, offset=NO_VALUE, cscov=NO_VALUE, checksum=NO_VALUE, type=NO_VALUE, seq_reserved=NO_VALUE, seq=NO_VALUE, ack_reserved=NO_VALUE, ack=NO_VALUE, service_code=NO_VALUE, reset_code=NO_VALUE, reset_data=NO_VALUE, options=NO_VALUE, payload=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
SchemaHeader schema for DCCP packet.
- seq_reserved: int = <ConditionalField seq_reserved>¶
Reserved octet ahead of a 48-bit sequence number.
- ack_reserved: int = <ConditionalField ack_reserved>¶
Reserved bits of the acknowledgement number subheader.
- class pcapkit.protocols.schema.transport.dccp.Coverage[source]¶
Bases:
TypedDictDCCP
CCValand checksum coverage field.
- class pcapkit.protocols.schema.transport.dccp.TypeField[source]¶
Bases:
TypedDictDCCP reserved bits, packet type and extended sequence numbers flag.
- class pcapkit.protocols.schema.transport.dccp.Option(*args, **kwargs)[source]¶
Bases:
EnumSchema[Option]Header schema for DCCP options.
- class pcapkit.protocols.schema.transport.dccp.UnassignedOption(type=NO_VALUE, length=NO_VALUE, data=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
OptionHeader schema for DCCP unassigned options.
- class pcapkit.protocols.schema.transport.dccp.Padding(type=NO_VALUE, length=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
OptionHeader schema for DCCP padding option.
- class pcapkit.protocols.schema.transport.dccp.Mandatory(type=NO_VALUE, length=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
OptionHeader schema for DCCP mandatory option.
- class pcapkit.protocols.schema.transport.dccp.SlowReceiver(type=NO_VALUE, length=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
OptionHeader schema for DCCP slow receiver option.
- class pcapkit.protocols.schema.transport.dccp.Change(type=NO_VALUE, length=NO_VALUE, feature=NO_VALUE, value=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
OptionHeader schema for DCCP Change L and Change R options.
- value: bytes = <BytesField value>¶
Preference list or value; a length under 2 is refused, as in every option that has a length (RFC 4340 Section 5.8).
- class pcapkit.protocols.schema.transport.dccp.Confirm(type=NO_VALUE, length=NO_VALUE, feature=NO_VALUE, value=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
OptionHeader schema for DCCP Confirm L and Confirm R options.
- value: bytes = <BytesField value>¶
Value, then the preference list for a server-priority feature; a length under 2 is refused, as in every option that has a length (RFC 4340 Section 5.8).
- class pcapkit.protocols.schema.transport.dccp.InitCookie(type=NO_VALUE, length=NO_VALUE, cookie=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
OptionHeader schema for DCCP init cookie option.
- class pcapkit.protocols.schema.transport.dccp.NDPCount(type=NO_VALUE, length=NO_VALUE, count=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
OptionHeader schema for DCCP NDP count option.
- count: int = <NumberField count>¶
NDP count,
length - 2octets, read and rebuilt at that width; RFC 4340 Section 7.7 allows one to six.
- class pcapkit.protocols.schema.transport.dccp.AckVector(type=NO_VALUE, length=NO_VALUE, vector=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
OptionHeader schema for DCCP Ack Vector options.
- class pcapkit.protocols.schema.transport.dccp.DataDropped(type=NO_VALUE, length=NO_VALUE, vector=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
OptionHeader schema for DCCP data dropped option.
- class pcapkit.protocols.schema.transport.dccp.Timestamp(type=NO_VALUE, length=NO_VALUE, timestamp=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
OptionHeader schema for DCCP timestamp option.
- class pcapkit.protocols.schema.transport.dccp.TimestampEcho(type=NO_VALUE, length=NO_VALUE, timestamp=NO_VALUE, elapsed=NO_VALUE, *, __packet__=None, **kwargs)[source]¶
Bases:
OptionHeader schema for DCCP timestamp echo option.
Data Models¶
- class pcapkit.protocols.data.transport.dccp.DCCP(srcport, dstport, hdr_len, ccval, cscov, checksum, reserved, type, x, seq)[source]¶
Bases:
ProtocolData model for DCCP packet.
- type: PacketType¶
Packet type.
- ack_reserved: int¶
Reserved bits of the acknowledgement number subheader, present only in a packet type that carries one.
- options: OrderedMultiInfo[Option, Option]¶
Options, present only when the header has an option area.
- checksum_status: ChecksumStatus¶
Outcome of verifying
checksum, present only when the enclosing IP layer verified it underCHECKSUM_VERIFY.
- class pcapkit.protocols.data.transport.dccp.Option(*args, **kwargs)[source]¶
Bases:
DataData model for DCCP options.
- class pcapkit.protocols.data.transport.dccp.UnassignedOption(type, length, data)[source]¶
Bases:
OptionData model for unassigned DCCP option.
- class pcapkit.protocols.data.transport.dccp.Padding(type, length)[source]¶
Bases:
OptionData model for DCCP padding option.
- class pcapkit.protocols.data.transport.dccp.Mandatory(type, length)[source]¶
Bases:
OptionData model for DCCP mandatory option.
- class pcapkit.protocols.data.transport.dccp.SlowReceiver(type, length)[source]¶
Bases:
OptionData model for DCCP slow receiver option.
- class pcapkit.protocols.data.transport.dccp.Change(type, length, feature, value)[source]¶
Bases:
OptionData model for DCCP Change L and Change R options.
- class pcapkit.protocols.data.transport.dccp.Confirm(type, length, feature, value)[source]¶
Bases:
OptionData model for DCCP Confirm L and Confirm R options.
- class pcapkit.protocols.data.transport.dccp.InitCookie(type, length, cookie)[source]¶
Bases:
OptionData model for DCCP init cookie option.
- class pcapkit.protocols.data.transport.dccp.NDPCount(type, length, count)[source]¶
Bases:
OptionData model for DCCP NDP count option.
- class pcapkit.protocols.data.transport.dccp.AckVector(type, length, nonce, vector)[source]¶
Bases:
OptionData model for DCCP Ack Vector options.
- vector: tuple[AckVectorRun, ...]¶
Vector, newest packet first.
- class pcapkit.protocols.data.transport.dccp.AckVectorRun(state, run_length)[source]¶
Bases:
DataData model for one octet of a DCCP Ack Vector.
- state: AckVectorState¶
State of the packets in the run.
- class pcapkit.protocols.data.transport.dccp.DataDropped(type, length, vector)[source]¶
Bases:
OptionData model for DCCP data dropped option.
- vector: tuple[DataDroppedBlock, ...]¶
Vector, newest packet first.
- class pcapkit.protocols.data.transport.dccp.DataDroppedBlock(dropped, code, run_length)[source]¶
Bases:
DataData model for one octet of a DCCP Data Dropped vector.
- class pcapkit.protocols.data.transport.dccp.Timestamp(type, length, timestamp)[source]¶
Bases:
OptionData model for DCCP timestamp option.
- class pcapkit.protocols.data.transport.dccp.TimestampEcho(type, length, timestamp, elapsed)[source]¶
Bases:
OptionData model for DCCP timestamp echo option.
- class pcapkit.protocols.data.transport.dccp.ElapsedTime(type, length, elapsed)[source]¶
Bases:
OptionData model for DCCP elapsed time option.
- class pcapkit.protocols.data.transport.dccp.DataChecksum(type, length, checksum)[source]¶
Bases:
OptionData model for DCCP data checksum option.
Footnotes