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

http.length

Length

3

24

http.type

Type

4

32

http.flags

Flags

5

40

Reserved

5

41

http.sid

Stream Identifier

9

72

http.payload

Frame Payload


class pcapkit.protocols.application.httpv2.HTTP(file=None, length=None, **kwargs)[source]

Bases: HTTP[HTTP, HTTP]

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:

property alias: Literal['HTTP/2']

Acronym of current protocol.

property length: Literal[9]

Header length of current protocol.

property version: Literal['2']

Version of current protocol.

classmethod id()[source]

Index ID of the protocol.

Return type:

tuple[Literal['HTTP'], Literal['HTTPv2']]

Returns:

Index ID of the protocol.

classmethod register_frame(code, meth)[source]

Register a frame parser.

Parameters:
Return type:

None

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:
  • length (Optional[int]) – Length of packet data.

  • **kwargs (Any) – Arbitrary keyword arguments.

Return type:

HTTP

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:
Return type:

HTTP

Returns:

Constructed packet data.

classmethod _make_data(data)[source]

Create key-value pairs from data for protocol construction.

Parameters:

data (HTTP) – protocol data

Return type:

dict[str, Any]

Returns:

Key-value pairs for protocol construction.

_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:

UnassignedFrame

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:
  • schema (DataFrame) – Parsed frame schema.

  • header (HTTP) – Parsed HTTP/2 header schema.

Return type:

DataFrame

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:

HeadersFrame

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:

PriorityFrame

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:

RSTStreamFrame

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:

SettingsFrame

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:
Return type:

PushPromiseFrame

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:
  • schema (PingFrame) – Parsed frame schema.

  • header (HTTP) – Parsed HTTP/2 header schema.

Return type:

PingFrame

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:

GoawayFrame

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:
Return type:

WindowUpdateFrame

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:
Return type:

ContinuationFrame

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:
Return type:

tuple[UnassignedFrame, Flags]

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.

Parameters:
  • frame (Optional[DataFrame]) – Frame data model.

  • end_stream (bool) – End of stream flag.

  • data (bytes) – Frame data.

  • **kwargs (Any) – Arbitrary keyword arguments.

Return type:

tuple[DataFrame, Flags]

Returns:

Constructed frame schema and updated flags.

_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.

  • sid_dep (Optional[int]) – Dependency stream identifier.

  • weight (int) – Priority weight value.

  • fragment (bytes) – Header block fragment.

  • **kwargs (Any) – Arbitrary keyword arguments.

Return type:

tuple[HeadersFrame, Flags]

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:
  • frame (Optional[PriorityFrame]) – Frame data model.

  • excl_dep (bool) – Exclusive dependency flag.

  • sid_dep (int) – Dependency stream identifier.

  • weight (int) – Priority weight value.

  • **kwargs (Any) – Arbitrary keyword arguments.

Return type:

tuple[PriorityFrame, Flags]

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:

tuple[RSTStreamFrame, Flags]

Returns:

Constructed frame schema and updated flags.

_make_http_settings(frame=None, *, ack=False, settings=None, **kwargs)[source]

Make HTTP/2 SETTINGS frame.

Parameters:
Return type:

tuple[SettingsFrame, Flags]

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:
  • frame (Optional[PushPromiseFrame]) – Frame data model.

  • end_headers (bool) – End of headers flag.

  • pad_len (int) – Padding length.

  • promised_sid (int) – Promised stream identifier.

  • fragment (bytes) – Header block fragment.

  • **kwargs (Any) – Arbitrary keyword arguments.

Return type:

tuple[PushPromiseFrame, Flags]

Returns:

Constructed frame schema and updated flags.

_make_http_ping(frame=None, *, ack=False, opaque_data=b'', **kwargs)[source]

Make HTTP/2 PING frame.

Parameters:
  • frame (Optional[PingFrame]) – Frame data model.

  • ack (bool) – Acknowledge flag.

  • opaque_data (bytes) – Opaque data.

  • **kwargs (Any) – Arbitrary keyword arguments.

Return type:

tuple[PingFrame, Flags]

Returns:

Constructed frame schema and updated flags.

_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:
Return type:

tuple[GoawayFrame, Flags]

Returns:

Constructed frame schema and updated flags.

_make_http_window_update(frame=None, *, incr=0, **kwargs)[source]

Make HTTP/2 WINDOW_UPDATE frame.

Parameters:
Return type:

tuple[WindowUpdateFrame, Flags]

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:

tuple[ContinuationFrame, Flags]

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.

Type:

DefaultDict[Enum_Frame, str | tuple[FrameParser, FrameConstructor]]

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

post_process(packet)[source]

Revise schema data after unpacking process.

Parameters:
  • schema – parsed schema

  • packet (dict[str, Any]) – Unpacked data.

Return type:

Schema

Returns:

Revised schema.

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.

sid: int

Steam identifier.

class pcapkit.protocols.schema.application.httpv2.StreamDependency[source]

Bases: TypedDict

Stream dependency.

exclusive: int

Exclusive flag.

sid: int

Stream dependency identifier.

class pcapkit.protocols.schema.application.httpv2.WindowSize[source]

Bases: TypedDict

Window size increment.

incr: int

Window size increment.

Auxiliary Functions

pcapkit.protocols.schema.application.httpv2.http_frame_selector(pkt)[source]

Selector function for HTTP.frame field.

Parameters:

pkt (dict[str, Any]) – Packet data.

Return type:

FieldBase

Returns:

Returns a SchemaField wrapped FrameType instance.

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