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.Frame
enumeration: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
DATA
frames.Structure of HTTP/2
DATA
frame [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
HEADERS
frames.Structure of HTTP/2
HEADERS
frame [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
PRIORITY
frames.Structure of HTTP/2
PRIORITY
frame [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_STREAM
frames.Structure of HTTP/2
RST_STREAM
frame [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
SETTINGS
frames.Structure of HTTP/2
SETTINGS
frame [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_PROMISE
frames.Structure of HTTP/2
PUSH_PROMISE
frame [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
PING
frames.Structure of HTTP/2
PING
frame [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
GOAWAY
frames.Structure of HTTP/2
GOAWAY
frame [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_UPDATE
frames.Structure of HTTP/2
WINDOW_UPDATE
frame [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
CONTINUATION
frames.Structure of HTTP/2
CONTINUATION
frame [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
DATA
frame.
- _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
HEADERS
frame.- 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
PRIORITY
frame.- 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_STREAM
frame.- Parameters:
- Return type:
- Returns:
Constructed frame schema and updated flags.
- _make_http_settings(frame=None, *, ack=False, settings=None, **kwargs)[source]¶
Make HTTP/2
SETTINGS
frame.- 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_PROMISE
frame.- 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
PING
frame.
- _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
GOAWAY
frame.- 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_UPDATE
frame.- 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
CONTINUATION
frame.- 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:
Schema
Header 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:
IntFlag
Flags 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:
FrameType
Header 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:
FrameType
Header schema for HTTP/2
DATA
frames.- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Flags
Flags enumeration for HTTP/2
DATA
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
- 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:
FrameType
Header schema for HTTP/2
HEADERS
frames.- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Flags
Flags enumeration for HTTP/2
DATA
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
- 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:
FrameType
Header schema for HTTP/2
PRIORITY
frames.- 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:
FrameType
Header schema for HTTP/2
RST_STREAM
frames.- error: Enum_ErrorCode = <EnumField error>¶
Error code.
- class pcapkit.protocols.schema.application.httpv2.SettingPair(dict_=None, **kwargs)[source]¶
Bases:
Schema
Header schema for HTTP/2
SETTINGS
frame 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:
FrameType
Header schema for HTTP/2
SETTINGS
frames.- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Flags
Flags enumeration for HTTP/2
SETTINGS
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
- settings: list[SettingPair] = <ListField settings>¶
Settings.
- class pcapkit.protocols.schema.application.httpv2.PushPromiseFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameType
Header schema for HTTP/2
PUSH_PROMISE
frames.- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Flags
Flags enumeration for HTTP/2
PUSH_PROMISE
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
- 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:
FrameType
Header schema for HTTP/2
PING
frames.- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Flags
Flags enumeration for HTTP/2
PING
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
- data: bytes = <BytesField data>¶
Opaque data.
- class pcapkit.protocols.schema.application.httpv2.GoawayFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameType
Header schema for HTTP/2
GOAWAY
frames.- 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:
FrameType
Header schema for HTTP/2
WINDOW_UPDATE
frames.- size: WindowSize = <BitField size>¶
Window size increment.
- class pcapkit.protocols.schema.application.httpv2.ContinuationFrame(dict_=None, **kwargs)[source]¶
Bases:
FrameType
Header schema for HTTP/2
CONTINUATION
frames.- class Flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Flags
Flags enumeration for HTTP/2
CONTINUATION
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
- fragment: bytes = <BytesField fragment>¶
Header block fragment.
Type Stubs¶
- class pcapkit.protocols.schema.application.httpv2.FrameFlags[source]¶
Bases:
TypedDict
HTTP frame specific flags.
- class pcapkit.protocols.schema.application.httpv2.StreamID[source]¶
Bases:
TypedDict
Stream identifier.
Auxiliary Functions¶
- pcapkit.protocols.schema.application.httpv2.http_frame_selector(pkt)[source]¶
Selector function for
HTTP.frame
field.
Data Models¶
- class pcapkit.protocols.data.application.httpv2.HTTP(dict_=None, **kwargs)[source]¶
Bases:
Protocol
Data 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:
Data
Data model for HTTP/2 flags.
- class pcapkit.protocols.data.application.httpv2.UnassignedFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTP
Data 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:
HTTP
Data model for HTTP/2
DATA
frame.- 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:
Flags
Data model for HTTP/2
DATA
frame flags.- END_STREAM: bool¶
END_STREAM
flag.
- PADDED: bool¶
PADDED
flag.
- class pcapkit.protocols.data.application.httpv2.HeadersFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTP
Data model for HTTP/2
HEADERS
frame.- 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:
Flags
Data model for HTTP/2
HEADERS
frame flags.- END_STREAM: bool¶
END_STREAM
flag.
- END_HEADERS: bool¶
END_HEADERS
flag.
- PADDED: bool¶
PADDED
flag.
- PRIORITY: bool¶
PRIORITY
flag.
- class pcapkit.protocols.data.application.httpv2.PriorityFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTP
Data model for HTTP/2
PRIORITY
frame.- 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:
HTTP
Data model for HTTP/2
RST_STREAM
frame.- flags: Literal[None]¶
Flags.
- error: ErrorCode¶
Error code.
- class pcapkit.protocols.data.application.httpv2.SettingsFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTP
Data model for HTTP/2
SETTINGS
frame.- flags: SettingsFrameFlags¶
Flags.
- settings: OrderedMultiDict[Setting, int]¶
Settings.
- class pcapkit.protocols.data.application.httpv2.SettingsFrameFlags(*args: VT, **kwargs: VT)[source]¶
Bases:
Flags
Data model for HTTP/2
SETTINGS
frame flags.- ACK: bool¶
ACK
flag.
- class pcapkit.protocols.data.application.httpv2.PushPromiseFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTP
Data model for HTTP/2
PUSH_PROMISE
frame.- 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:
Flags
Data model for HTTP/2
PUSH_PROMISE
frame flags.- END_HEADERS: bool¶
END_HEADERS
flag.
- PADDED: bool¶
PADDED
flag.
- class pcapkit.protocols.data.application.httpv2.PingFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTP
Data model for HTTP/2
PING
frame.- flags: PingFrameFlags¶
Flags.
- data: bytes¶
Opaque data.
- class pcapkit.protocols.data.application.httpv2.PingFrameFlags(*args: VT, **kwargs: VT)[source]¶
Bases:
Flags
Data model for HTTP/2
PING
frame flags.- ACK: bool¶
ACK
flag.
- class pcapkit.protocols.data.application.httpv2.GoawayFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTP
Data model for HTTP/2
GOAWAY
frame.- 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:
HTTP
Data moddel for HTTP/2
WINDOW_UPDATE
frame.- flags: Literal[None]¶
Flags.
- increment: int¶
Window size increment.
- class pcapkit.protocols.data.application.httpv2.ContinuationFrame(*args: VT, **kwargs: VT)[source]¶
Bases:
HTTP
Data model for HTTP/2
CONTINUATION
frame.- flags: ContinuationFrameFlags¶
Flags.
- fragment: bytes¶
Header block fragment.
- class pcapkit.protocols.data.application.httpv2.ContinuationFrameFlags(*args: VT, **kwargs: VT)[source]¶
Bases:
Flags
Data model for HTTP/2
CONTINUATION
frame flags.- END_HEADERS: bool¶
END_HEADERS
flag.
Footnotes