HTTP/2 - Hypertext Transfer Protocol¶
pcapkit.protocols.application.httpv2 contains
HTTP
only, which implements extractor for Hypertext Transfer
Protocol (HTTP/2) [*], whose structure is described as
below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Length |
3 |
24 |
|
Type |
4 |
32 |
|
Flags |
5 |
40 |
Reserved |
|
5 |
41 |
|
Stream Identifier |
9 |
72 |
|
Frame Payload |
- class pcapkit.protocols.application.httpv2.HTTP(file=None, length=None, **kwargs)[source]¶
-
This class implements Hypertext Transfer Protocol (HTTP/2).
This class currently supports parsing of the following HTTP/2 frames, which are directly mapped to the
pcapkit.const.http.frame.Frameenumeration:Frame Code
Frame Parser
Frame Constructor
- read(length=None, **kwargs)[source]¶
Read Hypertext Transfer Protocol (HTTP/2).
Structure of HTTP/2 packet [RFC 7540]:
+-----------------------------------------------+ | Length (24) | +---------------+---------------+---------------+ | Type (8) | Flags (8) | +-+-------------+---------------+-------------------------------+ |R| Stream Identifier (31) | +=+=============================================================+ | Frame Payload (0...) ... +---------------------------------------------------------------+
- Parameters:
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- make(type=<Frame.DATA: 0>, type_default=None, type_namespace=None, type_reversed=False, flags=0, sid=0, frame=b'', **kwargs)[source]¶
Make (construct) packet data.
- Parameters:
type (
Frame|IntEnum|IntEnum|str|int) – Type of HTTP/2 frame.type_namespace (
Union[dict[str,int],dict[int,str],Type[IntEnum],Type[IntEnum],None]) – Namespace of frame type.type_reversed (
bool) – Whether to reverse the namespace.flags (
Flags) – Flags of HTTP/2 frame.sid (
int) – Stream ID of HTTP/2 frame.frame (
bytes|HTTP|FrameType|dict[str,Any]) – Frame data of HTTP/2 frame.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed packet data.
- _read_http_none(schema, *, header)[source]¶
Read HTTP packet with unassigned type.
- Parameters:
schema (
UnassignedFrame) – Parsed frame schema.header (
HTTP) – Parsed HTTP/2 header schema.
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- _read_http_data(schema, *, header)[source]¶
Read HTTP/2
DATAframes.Structure of HTTP/2
DATAframe [RFC 7540]:+-----------------------------------------------+ | Length (24) | +---------------+---------------+---------------+ | Type (8) | Flags (8) | +-+-------------+---------------+-------------------------------+ |R| Stream Identifier (31) | +---------------+-----------------------------------------------+ |Pad Length? (8)| +---------------+-----------------------------------------------+ | Data (*) ... +---------------------------------------------------------------+ | Padding (*) ... +---------------------------------------------------------------+
- Parameters:
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- _read_http_headers(schema, *, header)[source]¶
Read HTTP/2
HEADERSframes.Structure of HTTP/2
HEADERSframe [RFC 7540]:+-----------------------------------------------+ | Length (24) | +---------------+---------------+---------------+ | Type (8) | Flags (8) | +-+-------------+---------------+-------------------------------+ |R| Stream Identifier (31) | +---------------+-----------------------------------------------+ |Pad Length? (8)| +-+-------------+-----------------------------------------------+ |E| Stream Dependency? (31) | +-+-------------+-----------------------------------------------+ | Weight? (8) | +-+-------------+-----------------------------------------------+ | Header Block Fragment (*) ... +---------------------------------------------------------------+ | Padding (*) ... +---------------------------------------------------------------+
- Parameters:
schema (
HeadersFrame) – Parsed frame schema.header (
HTTP) – Parsed HTTP/2 header schema.
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- _read_http_priority(schema, *, header)[source]¶
Read HTTP/2
PRIORITYframes.Structure of HTTP/2
PRIORITYframe [RFC 7540]:+-----------------------------------------------+ | Length (24) | +---------------+---------------+---------------+ | Type (8) | Flags (8) | +-+-------------+---------------+-------------------------------+ |R| Stream Identifier (31) | +-+-------------------------------------------------------------+ |E| Stream Dependency (31) | +-+-------------+-----------------------------------------------+ | Weight (8) | +-+-------------+
- Parameters:
schema (
PriorityFrame) – Parsed frame schema.header (
HTTP) – Parsed HTTP/2 header schema.
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- _read_http_rst_stream(schema, *, header)[source]¶
Read HTTP/2
RST_STREAMframes.Structure of HTTP/2
RST_STREAMframe [RFC 7540]:+-----------------------------------------------+ | Length (24) | +---------------+---------------+---------------+ | Type (8) | Flags (8) | +-+-------------+---------------+-------------------------------+ |R| Stream Identifier (31) | +---------------------------------------------------------------+ | Error Code (32) | +---------------------------------------------------------------+
- Parameters:
schema (
RSTStreamFrame) – Parsed frame schema.header (
HTTP) – Parsed HTTP/2 header schema.
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- _read_http_settings(schema, *, header)[source]¶
Read HTTP/2
SETTINGSframes.Structure of HTTP/2
SETTINGSframe [RFC 7540]:+-----------------------------------------------+ | Length (24) | +---------------+---------------+---------------+ | Type (8) | Flags (8) | +-+-------------+---------------+-------------------------------+ |R| Stream Identifier (31) | +---------------------------------------------------------------+ | Identifier (16) | +-------------------------------+-------------------------------+ | Value (32) | +---------------------------------------------------------------+ | ...... |
- Parameters:
schema (
SettingsFrame) – Parsed frame schema.header (
HTTP) – Parsed HTTP/2 header schema.
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- _read_http_push_promise(schema, *, header)[source]¶
Read HTTP/2
PUSH_PROMISEframes.Structure of HTTP/2
PUSH_PROMISEframe [RFC 7540]:+-----------------------------------------------+ | Length (24) | +---------------+---------------+---------------+ | Type (8) | Flags (8) | +-+-------------+---------------+-------------------------------+ |R| Stream Identifier (31) | +---------------+-----------------------------------------------+ |Pad Length? (8)| +-+-------------+-----------------------------------------------+ |R| Promised Stream ID (31) | +-+-----------------------------+-------------------------------+ | Header Block Fragment (*) ... +---------------------------------------------------------------+ | Padding (*) ... +---------------------------------------------------------------+
- Parameters:
schema (
PushPromiseFrame) – Parsed frame schema.header (
HTTP) – Parsed HTTP/2 header schema.
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- _read_http_ping(schema, *, header)[source]¶
Read HTTP/2
PINGframes.Structure of HTTP/2
PINGframe [RFC 7540]:+-----------------------------------------------+ | Length (24) | +---------------+---------------+---------------+ | Type (8) | Flags (8) | +-+-------------+---------------+-------------------------------+ |R| Stream Identifier (31) | +---------------------------------------------------------------+ | | | Opaque Data (64) | | | +---------------------------------------------------------------+
- Parameters:
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- _read_http_goaway(schema, *, header)[source]¶
Read HTTP/2
GOAWAYframes.Structure of HTTP/2
GOAWAYframe [RFC 7540]:+-----------------------------------------------+ | Length (24) | +---------------+---------------+---------------+ | Type (8) | Flags (8) | +-+-------------+---------------+-------------------------------+ |R| Stream Identifier (31) | +-+-------------+---------------+-------------------------------+ |R| Last-Stream-ID (31) | +-+-------------------------------------------------------------+ | Error Code (32) | +---------------------------------------------------------------+ | Additional Debug Data (*) | +---------------------------------------------------------------+
- Parameters:
schema (
GoawayFrame) – Parsed frame schema.header (
HTTP) – Parsed HTTP/2 header schema.
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- _read_http_window_update(schema, *, header)[source]¶
Read HTTP/2
WINDOW_UPDATEframes.Structure of HTTP/2
WINDOW_UPDATEframe [RFC 7540]:+-----------------------------------------------+ | Length (24) | +---------------+---------------+---------------+ | Type (8) | Flags (8) | +-+-------------+---------------+-------------------------------+ |R| Stream Identifier (31) | +-+-------------+---------------+-------------------------------+ |R| Window Size Increment (31) | +-+-------------------------------------------------------------+
- Parameters:
schema (
WindowUpdateFrame) – Parsed frame schema.header (
HTTP) – Parsed HTTP/2 header schema.
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- _read_http_continuation(schema, *, header)[source]¶
Read HTTP/2
CONTINUATIONframes.Structure of HTTP/2
CONTINUATIONframe [RFC 7540]:+-----------------------------------------------+ | Length (24) | +---------------+---------------+---------------+ | Type (8) | Flags (8) | +-+-------------+---------------+-------------------------------+ |R| Stream Identifier (31) | +---------------------------------------------------------------+ | Header Block Fragment (*) ... +---------------------------------------------------------------+
- Parameters:
schema (
ContinuationFrame) – Parsed frame schema.header (
HTTP) – Parsed HTTP/2 header schema.
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- _make_http_none(frame=None, *, data=b'', **kwargs)[source]¶
Make HTTP/2 unassigned frame type.
- Parameters:
frame (
Optional[UnassignedFrame]) – Frame data model.data (
bytes) – Unspecified frame data.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed frame schema and updated flags.
- _make_http_data(frame=None, *, end_stream=False, pad_len=0, data=b'', **kwargs)[source]¶
Make HTTP/2
DATAframe.
- _make_http_headers(frame=None, *, end_stream=False, end_headers=False, pad_len=0, excl_dep=False, sid_dep=None, weight=0, fragment=b'', **kwargs)[source]¶
Make HTTP/2
HEADERSframe.- Parameters:
frame (
Optional[HeadersFrame]) – Frame data model.end_stream (
bool) – End of stream flag.end_headers (
bool) – End of headers flag.excl_dep (
bool) – Exclusive dependency flag.weight (
int) – Priority weight value.fragment (
bytes) – Header block fragment.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed frame schema and updated flags.
- _make_http_priority(frame=None, *, sid_dep=0, excl_dep=False, weight=0, **kwargs)[source]¶
Make HTTP/2
PRIORITYframe.- Parameters:
- Return type:
- Returns:
Constructed frame schema and updated flags.
- _make_http_rst_stream(frame=None, *, error=<ErrorCode.HTTP_1_1_REQUIRED: 13>, error_default=None, error_namespace=None, error_reversed=False, **kwargs)[source]¶
Make HTTP/2
RST_STREAMframe.- Parameters:
- Return type:
- Returns:
Constructed frame schema and updated flags.
- _make_http_settings(frame=None, *, ack=False, settings=None, **kwargs)[source]¶
Make HTTP/2
SETTINGSframe.- Parameters:
frame (
Optional[SettingsFrame]) – Frame data model.ack (
bool) – Acknowledge flag.settings (
Union[OrderedMultiDict[Setting,int],bytes,list[SettingPair|tuple[Setting,int]],None]) – Settings.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed frame schema and updated flags.
- _make_http_push_promise(frame=None, *, end_headers=False, pad_len=0, promised_sid=0, fragment=b'', **kwargs)[source]¶
Make HTTP/2
PUSH_PROMISEframe.- Parameters:
- Return type:
- Returns:
Constructed frame schema and updated flags.
- _make_http_ping(frame=None, *, ack=False, opaque_data=b'', **kwargs)[source]¶
Make HTTP/2
PINGframe.
- _make_http_goaway(frame=None, *, last_sid=0, error=<ErrorCode.HTTP_1_1_REQUIRED: 13>, error_default=None, error_namespace=None, error_reversed=False, debug_data=b'', **kwargs)[source]¶
Make HTTP/2
GOAWAYframe.- Parameters:
frame (
Optional[GoawayFrame]) – Frame data model.last_sid (
int) – Last stream identifier.error (
ErrorCode|str|int|IntEnum|IntEnum) – Error code.error_default (
Optional[int]) – Default value of error code.error_namespace (
Union[dict[str,int],dict[int,str],Type[IntEnum],Type[IntEnum],None]) – Namespace of error code.error_reversed (
bool) – Reversed namespace of error code.debug_data (
bytes) – Additional debug data.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed frame schema and updated flags.
- _make_http_window_update(frame=None, *, incr=0, **kwargs)[source]¶
Make HTTP/2
WINDOW_UPDATEframe.- Parameters:
frame (
Optional[WindowUpdateFrame]) – Frame data model.incr (
int) – Window size increment.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed frame schema and updated flags.
- _make_http_continuation(frame=None, *, end_headers=False, fragment=b'', **kwargs)[source]¶
Make HTTP/2
CONTINUATIONframe.- Parameters:
frame (
Optional[ContinuationFrame]) – Frame data model.end_headers (
bool) – End of headers flag.fragment (
bytes) – Header block fragment.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed frame schema and updated flags.
- __frame__: DefaultDict[Enum_Frame | int, str | tuple[FrameParser, FrameConstructor]]¶
Frame code to method mapping. Method names are expected to be referred to the class by
_read_http_${name}and/or_make_http_${name}, and if such name not found, the value should then be a method that can parse the frame by itself.
Header Schemas¶
- class pcapkit.protocols.schema.application.httpv2.HTTP(dict_=None, **kwargs)[source]¶
Bases:
SchemaHeader schema for HTTP/2 packet.
- length: int = <NumberField length>¶
Length.
- type: Enum_Frame = <EnumField type>¶
Frame type.
- flags: FrameFlags = <BitField flags>¶
Frame specific flags.
- stream: StreamID = <BitField stream>¶
Stream identifier.
- frame: FrameType = <SwitchField frame>¶
Frame payload.
- class pcapkit.protocols.schema.application.httpv2.FrameType(dict_=None, **kwargs)[source]¶
Bases:
EnumSchema[Frame]Header schema for HTTP/2 frame payload.
- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
IntFlagFlags enumeration for HTTP/2 frames.
- static _generate_next_value_(name, start, count, last_values)¶
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_values: the last value assigned or None
- class pcapkit.protocols.schema.application.httpv2.UnassignedFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameTypeHeader schema for unassigned HTTP/2 frame payload.
- data: bytes = <BytesField data>¶
Frame payload.
- class pcapkit.protocols.schema.application.httpv2.DataFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameTypeHeader schema for HTTP/2
DATAframes.- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
FlagsFlags enumeration for HTTP/2
DATAframes.- static _generate_next_value_(name, start, count, last_values)¶
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_values: the last value assigned or None
- pad_len: int = <ConditionalField pad_len>¶
Padding length.
- data: bytes = <BytesField data>¶
Data.
- padding: bytes = <ConditionalField padding>¶
Padding.
- class pcapkit.protocols.schema.application.httpv2.HeadersFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameTypeHeader schema for HTTP/2
HEADERSframes.- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
FlagsFlags enumeration for HTTP/2
DATAframes.- static _generate_next_value_(name, start, count, last_values)¶
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_values: the last value assigned or None
- pad_len: int = <ConditionalField pad_len>¶
Padding length.
- stream_dep: StreamDependency = <ConditionalField stream_dep>¶
Stream dependency.
- weight: int = <ConditionalField weight>¶
Weight.
- fragment: bytes = <BytesField fragment>¶
Header block fragment.
- padding: bytes = <ConditionalField padding>¶
Padding.
- class pcapkit.protocols.schema.application.httpv2.PriorityFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameTypeHeader schema for HTTP/2
PRIORITYframes.- stream: StreamDependency = <BitField stream>¶
Stream dependency (exclusive, stream ID).
- weight: int = <UInt8Field weight>¶
Weight.
- class pcapkit.protocols.schema.application.httpv2.RSTStreamFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameTypeHeader schema for HTTP/2
RST_STREAMframes.- error: Enum_ErrorCode = <EnumField error>¶
Error code.
- class pcapkit.protocols.schema.application.httpv2.SettingPair(dict_=None, **kwargs)[source]¶
Bases:
SchemaHeader schema for HTTP/2
SETTINGSframe setting pairs.- id: Enum_Setting = <EnumField id>¶
Identifier.
- value: int = <UInt32Field value>¶
Value.
- class pcapkit.protocols.schema.application.httpv2.SettingsFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameTypeHeader schema for HTTP/2
SETTINGSframes.- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
FlagsFlags enumeration for HTTP/2
SETTINGSframes.- static _generate_next_value_(name, start, count, last_values)¶
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_values: the last value assigned or None
- settings: list[SettingPair] = <ListField settings>¶
Settings.
- class pcapkit.protocols.schema.application.httpv2.PushPromiseFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameTypeHeader schema for HTTP/2
PUSH_PROMISEframes.- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
FlagsFlags enumeration for HTTP/2
PUSH_PROMISEframes.- static _generate_next_value_(name, start, count, last_values)¶
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_values: the last value assigned or None
- pad_len: int = <ConditionalField pad_len>¶
Padding length.
- stream: StreamID = <BitField stream>¶
Promised stream ID.
- fragment: bytes = <BytesField fragment>¶
Header block fragment.
- padding: bytes = <ConditionalField padding>¶
Padding.
- class pcapkit.protocols.schema.application.httpv2.PingFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameTypeHeader schema for HTTP/2
PINGframes.- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
FlagsFlags enumeration for HTTP/2
PINGframes.- static _generate_next_value_(name, start, count, last_values)¶
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_values: the last value assigned or None
- data: bytes = <BytesField data>¶
Opaque data.
- class pcapkit.protocols.schema.application.httpv2.GoawayFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameTypeHeader schema for HTTP/2
GOAWAYframes.- stream: StreamID = <BitField stream>¶
Last stream ID.
- error: Enum_ErrorCode = <EnumField error>¶
Error code.
- debug: bytes = <BytesField debug>¶
Additional debug data.
- class pcapkit.protocols.schema.application.httpv2.WindowUpdateFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameTypeHeader schema for HTTP/2
WINDOW_UPDATEframes.- size: WindowSize = <BitField size>¶
Window size increment.
- class pcapkit.protocols.schema.application.httpv2.ContinuationFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameTypeHeader schema for HTTP/2
CONTINUATIONframes.- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
FlagsFlags enumeration for HTTP/2
CONTINUATIONframes.- static _generate_next_value_(name, start, count, last_values)¶
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_values: the last value assigned or None
- fragment: bytes = <BytesField fragment>¶
Header block fragment.
Type Stubs¶
- class pcapkit.protocols.schema.application.httpv2.FrameFlags[source]¶
Bases:
TypedDictHTTP frame specific flags.
- class pcapkit.protocols.schema.application.httpv2.StreamID[source]¶
Bases:
TypedDictStream identifier.
Auxiliary Functions¶
- pcapkit.protocols.schema.application.httpv2.http_frame_selector(pkt)[source]¶
Selector function for
HTTP.framefield.
Data Models¶
- class pcapkit.protocols.data.application.httpv2.HTTP(dict_=None, **kwargs)[source]¶
Bases:
ProtocolData model for HTTP/2 protocol.
- length: int¶
Length.
- type: Frame¶
Frame type.
- flags: Optional[Flags]¶
Flags.
- sid: int¶
Stream ID.
- class pcapkit.protocols.data.application.httpv2.Flags(dict_=None, **kwargs)[source]¶
Bases:
DataData model for HTTP/2 flags.
- class pcapkit.protocols.data.application.httpv2.UnassignedFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTPData model for HTTP/2 unassigned frame.
- flags: Literal[None]¶
Flags.
- data: bytes¶
Frame payload.
- class pcapkit.protocols.data.application.httpv2.DataFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTPData model for HTTP/2
DATAframe.- flags: DataFrameFlags¶
Flags.
- pad_len: int¶
Padded length.
- data: bytes¶
Frame payload.
- class pcapkit.protocols.data.application.httpv2.DataFrameFlags(*args: VT, **kwargs: VT)[source]¶
Bases:
FlagsData model for HTTP/2
DATAframe flags.- END_STREAM: bool¶
END_STREAMflag.
- PADDED: bool¶
PADDEDflag.
- class pcapkit.protocols.data.application.httpv2.HeadersFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTPData model for HTTP/2
HEADERSframe.- flags: HeadersFrameFlags¶
Flags.
- pad_len: int¶
Padded length.
- excl_dependency: bool¶
Exclusive dependency.
- stream_dependency: int¶
Stream dependency.
- weight: int¶
Weight.
- fragment: bytes¶
Header block fragment.
- class pcapkit.protocols.data.application.httpv2.HeadersFrameFlags(*args: VT, **kwargs: VT)[source]¶
Bases:
FlagsData model for HTTP/2
HEADERSframe flags.- END_STREAM: bool¶
END_STREAMflag.
- END_HEADERS: bool¶
END_HEADERSflag.
- PADDED: bool¶
PADDEDflag.
- PRIORITY: bool¶
PRIORITYflag.
- class pcapkit.protocols.data.application.httpv2.PriorityFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTPData model for HTTP/2
PRIORITYframe.- flags: Literal[None]¶
Flags.
- excl_dependency: bool¶
Exclusive dependency.
- stream_dependency: int¶
Stream dependency.
- weight: int¶
Weight.
- class pcapkit.protocols.data.application.httpv2.RSTStreamFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTPData model for HTTP/2
RST_STREAMframe.- flags: Literal[None]¶
Flags.
- error: ErrorCode¶
Error code.
- class pcapkit.protocols.data.application.httpv2.SettingsFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTPData model for HTTP/2
SETTINGSframe.- flags: SettingsFrameFlags¶
Flags.
- settings: OrderedMultiDict[Setting, int]¶
Settings.
- class pcapkit.protocols.data.application.httpv2.SettingsFrameFlags(*args: VT, **kwargs: VT)[source]¶
Bases:
FlagsData model for HTTP/2
SETTINGSframe flags.- ACK: bool¶
ACKflag.
- class pcapkit.protocols.data.application.httpv2.PushPromiseFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTPData model for HTTP/2
PUSH_PROMISEframe.- flags: PushPromiseFrameFlags¶
Flags.
- pad_len: int¶
Padded length.
- promised_sid: int¶
Promised stream ID.
- fragment: bytes¶
Header block fragment.
- class pcapkit.protocols.data.application.httpv2.PushPromiseFrameFlags(*args: VT, **kwargs: VT)[source]¶
Bases:
FlagsData model for HTTP/2
PUSH_PROMISEframe flags.- END_HEADERS: bool¶
END_HEADERSflag.
- PADDED: bool¶
PADDEDflag.
- class pcapkit.protocols.data.application.httpv2.PingFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTPData model for HTTP/2
PINGframe.- flags: PingFrameFlags¶
Flags.
- data: bytes¶
Opaque data.
- class pcapkit.protocols.data.application.httpv2.PingFrameFlags(*args: VT, **kwargs: VT)[source]¶
Bases:
FlagsData model for HTTP/2
PINGframe flags.- ACK: bool¶
ACKflag.
- class pcapkit.protocols.data.application.httpv2.GoawayFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTPData model for HTTP/2
GOAWAYframe.- flags: Literal[None]¶
Flags.
- last_sid: int¶
Last stream ID.
- error: ErrorCode¶
Error code.
- debug_data: bytes¶
Additional debug data.
- class pcapkit.protocols.data.application.httpv2.WindowUpdateFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTPData moddel for HTTP/2
WINDOW_UPDATEframe.- flags: Literal[None]¶
Flags.
- increment: int¶
Window size increment.
- class pcapkit.protocols.data.application.httpv2.ContinuationFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTPData model for HTTP/2
CONTINUATIONframe.- flags: ContinuationFrameFlags¶
Flags.
- fragment: bytes¶
Header block fragment.
- class pcapkit.protocols.data.application.httpv2.ContinuationFrameFlags(*args: VT, **kwargs: VT)[source]¶
Bases:
FlagsData model for HTTP/2
CONTINUATIONframe flags.- END_HEADERS: bool¶
END_HEADERSflag.
Footnotes