package wire

Import Path
	github.com/tmc/go-iroh/internal/qng/internal/wire (on go.dev)

Dependency Relation
	imports 16 packages, and imported by 4 packages


Package-Level Type Names (total 42)
/* sort by: | */
An AckFrame is an ACK frame // has to be ordered. The highest ACK range goes first, the lowest ACK range goes last DelayTime time.Duration ECNCE uint64 ECT0 uint64 ECT1 uint64 AcksPacket determines if this ACK frame acks a certain packet number Append appends an ACK frame. HasMissingRanges returns if this frame reports any missing packets LargestAcked is the largest acked packet number Length of a written frame LowestAcked is the lowest acked packet number (*AckFrame) Reset() Truncate truncates the ACK frame to fit into maxSize, and to at most 64 ACK ranges. maxSize must be large enough to fit at least one ACK range. *AckFrame : Frame func (*FrameParser).ParseAckFrame(frameType FrameType, data []byte, encLevel protocol.EncryptionLevel, v protocol.Version) (*AckFrame, int, error) func github.com/tmc/go-iroh/internal/qng/internal/ackhandler.(*ReceivedPacketHandler).GetAckFrame(encLevel protocol.EncryptionLevel, now monotime.Time, onlyIfQueued bool) *AckFrame func github.com/tmc/go-iroh/internal/qng/internal/ackhandler.(*ReceivedPacketHandler).GetAckFrameForPath(pid protocol.PathID, now monotime.Time, onlyIfQueued bool) *AckFrame func github.com/tmc/go-iroh/internal/qng/internal/ackhandler.SentPacketHandler.ReceivedAck(f *AckFrame, encLevel protocol.EncryptionLevel, rcvTime monotime.Time) (bool, error) func github.com/tmc/go-iroh/internal/qng/internal/ackhandler.SentPacketHandler.ReceivedAckForPath(f *AckFrame, pid protocol.PathID, rcvTime monotime.Time) (bool, error)
AckElicitingThreshold uint64 ReorderingThreshold protocol.PacketNumber RequestMaxAckDelay time.Duration SequenceNumber uint64 (*AckFrequencyFrame) Append(b []byte, _ protocol.Version) ([]byte, error) (*AckFrequencyFrame) Length(_ protocol.Version) protocol.ByteCount *AckFrequencyFrame : Frame
AckRange is an ACK range Largest protocol.PacketNumber Smallest protocol.PacketNumber Len returns the number of packets contained in this ACK range
AddAddressFrame advertises an address for n0 NAT traversal. See reference/frame.rs:2285-2368. Addr is the observed IP address. Its family (4 vs 16 bytes on the wire) is determined by the frame type, matching get_type (frame.rs:2126-2132). Port is the observed UDP port. SeqNo is a per-connection monotonically increasing sequence number (frame.rs:2108-2109). The recipient keeps the report with the highest SeqNo (paths.rs update_observed_addr_report). (*AddAddressFrame) Append(b []byte, _ protocol.Version) ([]byte, error) (*AddAddressFrame) Length(_ protocol.Version) protocol.ByteCount *AddAddressFrame : Frame
AddressDiscoveryRole is the peer's role in QUIC Address Discovery (draft-seemann-quic-address-discovery), carried in the observed_address transport parameter. It mirrors address_discovery::Role (n0ext/reference/address_discovery.rs:10-22). The zero value (AddressDiscoveryDisabled) means the parameter is absent. ShouldReport reports whether a peer with role r should report observed addresses to a peer with role other: r must be a reporter and other must accept reports (address_discovery.rs:54-56). func AddressDiscoveryRole.ShouldReport(other AddressDiscoveryRole) bool const AddressDiscoveryBoth const AddressDiscoveryDisabled const AddressDiscoveryReceiveOnly const AddressDiscoverySendOnly
A ConnectionCloseFrame is a CONNECTION_CLOSE frame ErrorCode uint64 FrameType uint64 IsApplicationError bool ReasonPhrase string (*ConnectionCloseFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *ConnectionCloseFrame : Frame
A CryptoFrame is a CRYPTO frame Data []byte Offset protocol.ByteCount (*CryptoFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame MaxDataLen returns the maximum data length MaybeSplitOffFrame splits a frame such that it is not bigger than n bytes. It returns if the frame was actually split. The frame might not be split if: * the size is large enough to fit the whole frame * the size is too small to fit even a 1-byte frame. In that case, the frame returned is nil. *CryptoFrame : Frame func (*CryptoFrame).MaybeSplitOffFrame(maxSize protocol.ByteCount, version protocol.Version) (*CryptoFrame, bool)
A DataBlockedFrame is a DATA_BLOCKED frame MaximumData protocol.ByteCount (*DataBlockedFrame) Append(b []byte, version protocol.Version) ([]byte, error) Length of a written frame *DataBlockedFrame : Frame
A DatagramFrame is a DATAGRAM frame Data []byte DataLenPresent bool (*DatagramFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame MaxDataLen returns the maximum data length *DatagramFrame : Frame func (*FrameParser).ParseDatagramFrame(frameType FrameType, data []byte, v protocol.Version) (*DatagramFrame, int, error)
ExtendedHeader is the header of a QUIC packet. Header Header Header.DestConnectionID protocol.ConnectionID Header.Length protocol.ByteCount Header.SrcConnectionID protocol.ConnectionID Header.Token []byte Header.Type protocol.PacketType Header.Version protocol.Version KeyPhase protocol.KeyPhaseBit PacketNumber protocol.PacketNumber PacketNumberLen protocol.PacketNumberLen Append appends the Header. GetLength determines the length of the Header. Log logs the Header PacketType is the type of the packet, for logging purposes ParseExtended parses the version dependent part of the header. The Reader has to be set such that it points to the first byte of the header. ParsedLen returns the number of bytes that were consumed when parsing the header func (*Header).ParseExtended(data []byte) (*ExtendedHeader, error)
A Frame in QUIC ( Frame) Append(b []byte, version protocol.Version) ([]byte, error) ( Frame) Length(version protocol.Version) protocol.ByteCount *AckFrame *AckFrequencyFrame *AddAddressFrame *ConnectionCloseFrame *CryptoFrame *DataBlockedFrame *DatagramFrame *HandshakeDoneFrame *ImmediateAckFrame *MaxDataFrame *MaxPathIDFrame *MaxStreamDataFrame *MaxStreamsFrame *NewConnectionIDFrame *NewTokenFrame *ObservedAddrFrame *PathAbandonFrame *PathAckFrame *PathChallengeFrame *PathCIDsBlockedFrame *PathResponseFrame *PathStatusAvailableFrame *PathStatusBackupFrame *PathsBlockedFrame *PingFrame *ReachOutFrame *RemoveAddressFrame *ResetStreamFrame *RetireConnectionIDFrame *StopSendingFrame *StreamDataBlockedFrame *StreamFrame *StreamsBlockedFrame func (*FrameParser).ParseLessCommonFrame(frameType FrameType, data []byte, v protocol.Version) (Frame, int, error) func IsProbingFrame(f Frame) bool func LogFrame(logger utils.Logger, frame Frame, sent bool) func github.com/tmc/go-iroh/internal/qng/internal/ackhandler.IsFrameAckEliciting(f Frame) bool func github.com/tmc/go-iroh/internal/qng/internal/ackhandler.FrameHandler.OnAcked(Frame) func github.com/tmc/go-iroh/internal/qng/internal/ackhandler.FrameHandler.OnLost(Frame)
The FrameParser parses QUIC frames, one by one. (*FrameParser) ParseAckFrame(frameType FrameType, data []byte, encLevel protocol.EncryptionLevel, v protocol.Version) (*AckFrame, int, error) (*FrameParser) ParseDatagramFrame(frameType FrameType, data []byte, v protocol.Version) (*DatagramFrame, int, error) ParseLessCommonFrame parses everything except STREAM, ACK or DATAGRAM. These cases should be handled separately for performance reasons. (*FrameParser) ParseStreamFrame(frameType FrameType, data []byte, v protocol.Version) (*StreamFrame, int, error) ParseType parses the frame type of the next frame. It skips over PADDING frames. SetAckDelayExponent sets the acknowledgment delay exponent (sent in the transport parameters). This value is used to scale the ACK Delay field in the ACK frame. SetSupportsAddressDiscovery admits the QUIC Address Discovery OBSERVED_ADDRESS frame types (draft-seemann-quic-address-discovery). It is set after the handshake, once the peer's address-discovery role permits it to report observed addresses to us (i.e. peer.should_report(local) is true). Before that the parser rejects OBSERVED_ADDRESS frames as unknown, keeping un-negotiated connections byte-identical. SetSupportsMultipath admits the QUIC multipath frame types (draft-ietf-quic-multipath). It is set after the handshake, once both peers have advertised the initial_max_path_id transport parameter. Before that the parser stays in single-path mode and rejects multipath frames as unknown. SetSupportsNATTraversal admits the n0 NAT traversal frame types. It is set after the handshake once both peers negotiated the n0_nat_traversal transport parameter. Before that the parser rejects QNT frames as unknown. func NewFrameParser(supportsDatagrams, supportsResetStreamAt, supportsAckFrequency, supportsMultipath bool) *FrameParser
( FrameType) IsAckFrameType() bool ( FrameType) IsDatagramFrameType() bool ( FrameType) IsStreamFrameType() bool func (*FrameParser).ParseType(b []byte, encLevel protocol.EncryptionLevel) (FrameType, int, error) func IsProbingFrameType(f FrameType) bool func ParseStreamFrame(b []byte, typ FrameType, _ protocol.Version) (*StreamFrame, int, error) func (*FrameParser).ParseAckFrame(frameType FrameType, data []byte, encLevel protocol.EncryptionLevel, v protocol.Version) (*AckFrame, int, error) func (*FrameParser).ParseDatagramFrame(frameType FrameType, data []byte, v protocol.Version) (*DatagramFrame, int, error) func (*FrameParser).ParseLessCommonFrame(frameType FrameType, data []byte, v protocol.Version) (Frame, int, error) func (*FrameParser).ParseStreamFrame(frameType FrameType, data []byte, v protocol.Version) (*StreamFrame, int, error) func github.com/tmc/go-iroh/internal/qng/internal/ackhandler.IsFrameTypeAckEliciting(t FrameType) bool const FrameTypeAck const FrameTypeAckECN const FrameTypeAckFrequency const FrameTypeAddIPv4Address const FrameTypeAddIPv6Address const FrameTypeApplicationClose const FrameTypeBidiMaxStreams const FrameTypeBidiStreamBlocked const FrameTypeConnectionClose const FrameTypeCrypto const FrameTypeDataBlocked const FrameTypeDatagramNoLength const FrameTypeDatagramWithLength const FrameTypeHandshakeDone const FrameTypeImmediateAck const FrameTypeMaxData const FrameTypeMaxPathID const FrameTypeMaxStreamData const FrameTypeNewConnectionID const FrameTypeNewToken const FrameTypeObservedIPv4Addr const FrameTypeObservedIPv6Addr const FrameTypePathAbandon const FrameTypePathAck const FrameTypePathAckECN const FrameTypePathChallenge const FrameTypePathCIDsBlocked const FrameTypePathNewConnectionID const FrameTypePathResponse const FrameTypePathRetireConnectionID const FrameTypePathsBlocked const FrameTypePathStatusAvailable const FrameTypePathStatusBackup const FrameTypePing const FrameTypeReachOutAtIPv4 const FrameTypeReachOutAtIPv6 const FrameTypeRemoveAddress const FrameTypeResetStream const FrameTypeResetStreamAt const FrameTypeRetireConnectionID const FrameTypeStopSending const FrameTypeStreamDataBlocked const FrameTypeUniMaxStreams const FrameTypeUniStreamBlocked
A HandshakeDoneFrame is a HANDSHAKE_DONE frame (*HandshakeDoneFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *HandshakeDoneFrame : Frame
The Header is the version independent part of the header DestConnectionID protocol.ConnectionID Length protocol.ByteCount SrcConnectionID protocol.ConnectionID Token []byte Type protocol.PacketType Version protocol.Version PacketType is the type of the packet, for logging purposes ParseExtended parses the version dependent part of the header. The Reader has to be set such that it points to the first byte of the header. ParsedLen returns the number of bytes that were consumed when parsing the header func ParsePacket(data []byte) (*Header, []byte, []byte, error)
An ImmediateAckFrame is an IMMEDIATE_ACK frame (*ImmediateAckFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *ImmediateAckFrame : Frame
A MaxDataFrame carries flow control information for the connection MaximumData protocol.ByteCount (*MaxDataFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *MaxDataFrame : Frame
A MaxPathIDFrame raises the largest path id the sender will accept. See frame.rs MaxPathId (lines 1410-1432): path_id. PathID protocol.PathID (*MaxPathIDFrame) Append(b []byte, _ protocol.Version) ([]byte, error) (*MaxPathIDFrame) Length(_ protocol.Version) protocol.ByteCount *MaxPathIDFrame : Frame
A MaxStreamDataFrame is a MAX_STREAM_DATA frame MaximumStreamData protocol.ByteCount StreamID protocol.StreamID (*MaxStreamDataFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *MaxStreamDataFrame : Frame
A MaxStreamsFrame is a MAX_STREAMS frame MaxStreamNum protocol.StreamNum Type protocol.StreamType (*MaxStreamsFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *MaxStreamsFrame : Frame
A NewConnectionIDFrame is a NEW_CONNECTION_ID frame. When PathID is non-nil the frame is the QUIC multipath path-qualified variant PATH_NEW_CONNECTION_ID (0x3e78): the path id is encoded immediately after the frame type, before the sequence number (frame.rs:2015-2030, NewConnectionId encode with Option<PathId>). A nil PathID encodes a plain NEW_CONNECTION_ID (0x18) byte-for-byte as before. ConnectionID protocol.ConnectionID PathID *protocol.PathID RetirePriorTo uint64 SequenceNumber uint64 StatelessResetToken protocol.StatelessResetToken (*NewConnectionIDFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *NewConnectionIDFrame : Frame
A NewTokenFrame is a NEW_TOKEN frame Token []byte (*NewTokenFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *NewTokenFrame : Frame
An ObservedAddrFrame reports the source address a peer observed for the connection, so the recipient can learn its own reflexive (publicly observed) address. See frame.rs:2107-2178. Addr is the observed IP address. Its family (4 vs 16 bytes on the wire) is determined by the frame type, matching get_type (frame.rs:2126-2132). Port is the observed UDP port. SeqNo is a per-connection monotonically increasing sequence number (frame.rs:2108-2109). The recipient keeps the report with the highest SeqNo (paths.rs update_observed_addr_report). Append encodes f, mirroring the Encodable impl (frame.rs:2164-2178): frame type, seq_no varint, raw address bytes (4 for v4, 16 for v6), then the port as a big-endian u16. Length returns the encoded size of f, matching ObservedAddr::size (frame.rs:2134-2141): type size + seq_no varint size + ip bytes (16 for v6, 4 otherwise) + 2 port bytes. *ObservedAddrFrame : Frame
A PathAbandonFrame signals that the sender is abandoning a path. See frame.rs PathAbandon (lines 2185-2213): path_id, error_code. ErrorCode uint64 PathID protocol.PathID (*PathAbandonFrame) Append(b []byte, _ protocol.Version) ([]byte, error) (*PathAbandonFrame) Length(_ protocol.Version) protocol.ByteCount *PathAbandonFrame : Frame
A PathAckFrame is the QUIC multipath PATH_ACK / PATH_ACK_ECN frame (draft-ietf-quic-multipath). It is an ACK frame qualified by a path id: the wire layout is the frame type, then the path id, then a standard ACK frame body (largest, delay, ack ranges, and optional ECN counts). The ECN counts are present iff the frame type is PATH_ACK_ECN (0x3f); a plain PATH_ACK (0x3e) carries no ECN counts. This mirrors the base ACK/ACK_ECN distinction. See internal/qng/n0ext/reference/frame.rs PathAck / PathAckEncoder (lines 992-1118): the body is byte-identical to a base ACK frame, with the path id inserted immediately after the frame type. Ack AckFrame PathID protocol.PathID (*PathAckFrame) Append(b []byte, v protocol.Version) ([]byte, error) (*PathAckFrame) Length(v protocol.Version) protocol.ByteCount *PathAckFrame : Frame
A PathChallengeFrame is a PATH_CHALLENGE frame Data [8]byte (*PathChallengeFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *PathChallengeFrame : Frame
A PathCIDsBlockedFrame signals the sender wants more connection ids for a path than its peer has issued. See frame.rs PathCidsBlocked (lines 1465-1494): path_id, next_seq. NextSeq uint64 PathID protocol.PathID (*PathCIDsBlockedFrame) Append(b []byte, _ protocol.Version) ([]byte, error) (*PathCIDsBlockedFrame) Length(_ protocol.Version) protocol.ByteCount *PathCIDsBlockedFrame : Frame
A PathResponseFrame is a PATH_RESPONSE frame Data [8]byte (*PathResponseFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *PathResponseFrame : Frame
A PathsBlockedFrame signals the sender wants more paths than its peer allows. See frame.rs PathsBlocked (lines 1437-1460): remote_max_path_id. MaxPathID protocol.PathID (*PathsBlockedFrame) Append(b []byte, _ protocol.Version) ([]byte, error) (*PathsBlockedFrame) Length(_ protocol.Version) protocol.ByteCount *PathsBlockedFrame : Frame
A PathStatusAvailableFrame marks a path as available (non-backup). See frame.rs PathStatusAvailable (lines 2218-2247): path_id, status_seq_no. PathID protocol.PathID SeqNo uint64 (*PathStatusAvailableFrame) Append(b []byte, _ protocol.Version) ([]byte, error) (*PathStatusAvailableFrame) Length(_ protocol.Version) protocol.ByteCount *PathStatusAvailableFrame : Frame
A PathStatusBackupFrame marks a path as a backup path. See frame.rs PathStatusBackup (lines 2252-2280): path_id, status_seq_no. PathID protocol.PathID SeqNo uint64 (*PathStatusBackupFrame) Append(b []byte, _ protocol.Version) ([]byte, error) (*PathStatusBackupFrame) Length(_ protocol.Version) protocol.ByteCount *PathStatusBackupFrame : Frame
A PingFrame is a PING frame (*PingFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *PingFrame : Frame
PreferredAddress is the value encoding in the preferred_address transport parameter ConnectionID protocol.ConnectionID IPv4 netip.AddrPort IPv6 netip.AddrPort StatelessResetToken protocol.StatelessResetToken
ReachOutFrame asks the peer to send a NAT traversal probe to the encoded address. See reference/frame.rs:2375-2441. Addr netip.Addr Port uint16 Round uint64 (*ReachOutFrame) Append(b []byte, _ protocol.Version) ([]byte, error) (*ReachOutFrame) Length(_ protocol.Version) protocol.ByteCount *ReachOutFrame : Frame
RemoveAddressFrame stops advertising an address sequence number. See reference/frame.rs:2448-2491. SeqNo uint64 (*RemoveAddressFrame) Append(b []byte, _ protocol.Version) ([]byte, error) (*RemoveAddressFrame) Length(_ protocol.Version) protocol.ByteCount *RemoveAddressFrame : Frame
A ResetStreamFrame is a RESET_STREAM or RESET_STREAM_AT frame in QUIC ErrorCode qerr.StreamErrorCode FinalSize protocol.ByteCount ReliableSize protocol.ByteCount StreamID protocol.StreamID (*ResetStreamFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *ResetStreamFrame : Frame
A RetireConnectionIDFrame is a RETIRE_CONNECTION_ID frame. When PathID is non-nil the frame is the QUIC multipath path-qualified variant PATH_RETIRE_CONNECTION_ID (0x3e79): the path id is encoded immediately after the frame type, before the sequence number (frame.rs:811-819, RetireConnectionId encode with Option<PathId>). A nil PathID encodes a plain RETIRE_CONNECTION_ID (0x19) byte-for-byte as before. PathID *protocol.PathID SequenceNumber uint64 (*RetireConnectionIDFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *RetireConnectionIDFrame : Frame
A StopSendingFrame is a STOP_SENDING frame ErrorCode qerr.StreamErrorCode StreamID protocol.StreamID (*StopSendingFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *StopSendingFrame : Frame
A StreamDataBlockedFrame is a STREAM_DATA_BLOCKED frame MaximumStreamData protocol.ByteCount StreamID protocol.StreamID (*StreamDataBlockedFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *StreamDataBlockedFrame : Frame
A StreamFrame of QUIC Data []byte DataLenPresent bool Fin bool Offset protocol.ByteCount StreamID protocol.StreamID (*StreamFrame) Append(b []byte, _ protocol.Version) ([]byte, error) DataLen gives the length of data in bytes Length returns the total length of the STREAM frame MaxDataLen returns the maximum data length If 0 is returned, writing will fail (a STREAM frame must contain at least 1 byte of data). MaybeSplitOffFrame splits a frame such that it is not bigger than n bytes. It returns if the frame was actually split. The frame might not be split if: * the size is large enough to fit the whole frame * the size is too small to fit even a 1-byte frame. In that case, the frame returned is nil. (*StreamFrame) PutBack() *StreamFrame : Frame func GetStreamFrame() *StreamFrame func ParseStreamFrame(b []byte, typ FrameType, _ protocol.Version) (*StreamFrame, int, error) func (*FrameParser).ParseStreamFrame(frameType FrameType, data []byte, v protocol.Version) (*StreamFrame, int, error) func (*StreamFrame).MaybeSplitOffFrame(maxSize protocol.ByteCount, version protocol.Version) (*StreamFrame, bool)
A StreamsBlockedFrame is a STREAMS_BLOCKED frame StreamLimit protocol.StreamNum Type protocol.StreamType (*StreamsBlockedFrame) Append(b []byte, _ protocol.Version) ([]byte, error) Length of a written frame *StreamsBlockedFrame : Frame
TransportParameters are parameters sent to the peer during the handshake AckDelayExponent uint8 ActiveConnectionIDLimit uint64 AddressDiscoveryRole is the QUIC Address Discovery role (draft-seemann-quic-address-discovery) carried in the observed_address transport parameter. AddressDiscoveryDisabled (the default) means the parameter was not sent. See n0ext/reference/transport_parameters.rs:118,404-411,522-536 and address_discovery.rs. DisableActiveMigration bool // https://datatracker.ietf.org/doc/draft-ietf-quic-reliable-stream-reset/06/ InitialMaxData protocol.ByteCount InitialMaxPathID is the multipath extension's initial_max_path_id transport parameter (draft-ietf-quic-multipath). A nil pointer means the parameter was not sent (multipath disabled); a non-nil pointer carries the largest path id the endpoint is initially willing to use. See n0ext/reference/transport_parameters.rs:121,537-548. InitialMaxStreamDataBidiLocal protocol.ByteCount InitialMaxStreamDataBidiRemote protocol.ByteCount InitialMaxStreamDataUni protocol.ByteCount InitialSourceConnectionID protocol.ConnectionID MaxAckDelay time.Duration MaxBidiStreamNum protocol.StreamNum // RFC 9221 MaxIdleTimeout time.Duration MaxRemoteNATTraversalAddresses is the n0_nat_traversal transport parameter. A nil pointer means QNT was not advertised; a non-nil value is the maximum number of remote NAT-traversal addresses and must be non-zero. Decoding this parameter does not by itself enable QNT frame admission; the connection admits QNT frames only after both peers advertised the parameter. MaxUDPPayloadSize protocol.ByteCount MaxUniStreamNum protocol.StreamNum MinAckDelay *time.Duration OriginalDestinationConnectionID protocol.ConnectionID PreferredAddress *PreferredAddress // use a pointer here to distinguish zero-length connection IDs from missing transport parameters StatelessResetToken *protocol.StatelessResetToken Marshal the transport parameters MarshalForSessionTicket marshals the transport parameters we save in the session ticket. When sending a 0-RTT enabled TLS session tickets, we need to save the transport parameters. The client will remember the transport parameters used in the last session, and apply those to the 0-RTT data it sends. Saving the transport parameters in the ticket gives the server the option to reject 0-RTT if the transport parameters changed. Since the session ticket is encrypted, the serialization format is defined by the server. For convenience, we use the same format that we also use for sending the transport parameters. String returns a string representation, intended for logging. Unmarshal the transport parameters UnmarshalFromSessionTicket unmarshals transport parameters from a session ticket. ValidFor0RTT checks if the transport parameters match those saved in the session ticket. ValidForUpdate checks that the new transport parameters don't reduce limits after resuming a 0-RTT connection. It is only used on the client side. *TransportParameters : expvar.Var *TransportParameters : fmt.Stringer func (*TransportParameters).ValidFor0RTT(saved *TransportParameters) bool func (*TransportParameters).ValidForUpdate(saved *TransportParameters) bool func github.com/tmc/go-iroh/internal/qng/internal/handshake.NewCryptoSetupClient(connID protocol.ConnectionID, tp *TransportParameters, tlsConf *tls.Config, enable0RTT bool, rttStats *utils.RTTStats, qlogger qlogwriter.Recorder, logger utils.Logger, version protocol.Version) handshake.CryptoSetup func github.com/tmc/go-iroh/internal/qng/internal/handshake.NewCryptoSetupServer(connID protocol.ConnectionID, localAddr, remoteAddr net.Addr, tp *TransportParameters, tlsConf *tls.Config, allow0RTT bool, rttStats *utils.RTTStats, qlogger qlogwriter.Recorder, logger utils.Logger, version protocol.Version) handshake.CryptoSetup
Package-Level Functions (total 22)
AppendShortHeader writes a short header.
ComposeVersionNegotiation composes a Version Negotiation
Is0RTTPacket says if this is a 0-RTT packet. A packet sent with a version we don't understand can never be a 0-RTT packet.
IsLongHeaderPacket says if this is a Long Header packet
IsProbingFrame returns true if the frame is a probing frame. See section 9.1 of RFC 9000.
IsProbingFrameType returns true if the FrameType is a probing frame. See section 9.1 of RFC 9000.
IsVersionNegotiationPacket says if this is a version negotiation packet
LogFrame logs a frame, either sent or received
NewFrameParser creates a new frame parser. supportsMultipath admits the QUIC multipath frame types (draft-ietf-quic-multipath); it is false unless the connection has negotiated multipath, so single-path parsing is unchanged.
ParseArbitraryLenConnectionIDs parses the most general form of a Long Header packet, using only the version-independent packet format as described in Section 5.1 of RFC 8999: https://datatracker.ietf.org/doc/html/rfc8999#section-5.1. This function should only be called on Long Header packets for which we don't support the version.
ParseConnectionID parses the destination connection ID of a packet.
ParseMaxDataFrame parses the payload of a MAX_DATA frame.
ParseMaxStreamDataFrame parses the payload of a MAX_STREAM_DATA frame.
ParsePacket parses a long header packet. The packet is cut according to the length field. If we understand the version, the packet is parsed up unto the packet number. Otherwise, only the invariant part of the header is parsed.
ParseShortHeader parses a short header packet. It must be called after header protection was removed. Otherwise, the check for the reserved bits will (most likely) fail.
ParseVersion parses the QUIC version. It should only be called for Long Header packets (Short Header packets don't contain a version number).
ParseVersionNegotiationPacket parses a Version Negotiation packet.
Package-Level Variables (total 4)
AdditionalTransportParametersClient are additional transport parameters that will be added to the client's transport parameters. This is not intended for production use, but _only_ to increase the size of the ClientHello beyond the usual size of less than 1 MTU.
ErrInvalidReservedBits is returned when the reserved bits are incorrect. When this error is returned, parsing continues, and an ExtendedHeader is returned. This is necessary because we need to decrypt the packet in that case, in order to avoid a timing side-channel.
MaxDatagramSize is the maximum size of a DATAGRAM frame (RFC 9221). By setting it to a large value, we allow all datagrams that fit into a QUIC packet. The value is chosen such that it can still be encoded as a 2 byte varint. This is a var and not a const so it can be set in tests.
Package-Level Constants (total 48)
AddressDiscoveryBoth both reports and accepts reports (TP varint value 2).
AddressDiscoveryDisabled means address discovery is off; the observed_address transport parameter is not sent. This is the default.
AddressDiscoveryReceiveOnly accepts reports about its own observed address but does not report back (TP varint value 1).
AddressDiscoverySendOnly reports observed addresses to the peer but does not accept reports about its own address (TP varint value 0).
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
iroh NAT traversal frame types, as used by iroh's noq QUIC fork. See internal/qng/n0ext/reference/frame.rs:126-135.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
QUIC Address Discovery OBSERVED_ADDRESS frame types (draft-seemann-quic-address-discovery), as used by iroh's noq QUIC fork. The frame type selects the reported address family. See internal/qng/n0ext/reference/frame.rs:100-103.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
QUIC multipath frame types (draft-ietf-quic-multipath), as used by iroh's noq QUIC fork. See internal/qng/n0ext/reference/frame.rs (lines 104-124). These constants are defined so the multipath frame codecs can reference them; they are not yet admitted by the frame parser or emitted by the packer (that wiring is a later stage of the multipath port).
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.
These constants correspond to those defined in RFC 9000. Stream frame types are not listed explicitly here; use FrameType.IsStreamFrameType() to identify them.