packetmap

package
v0.0.0-...-0cdedd5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Credit to Galene https://github.com/jech/galene/blob/master/packetmap/packetmap.go Package packetmap implements remapping of sequence numbers and picture ids.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map struct {
	// contains filtered or unexported fields
}

func New

func New() *Map

New creates a new Map.

func (*Map) Drop

func (m *Map) Drop(seqno uint16, pid uint16) bool

Drop attempts to record a dropped packet. It returns true if the packet is safe to drop.

func (*Map) Map

func (m *Map) Map(seqno uint16, pid uint16) (bool, uint16, uint16)

Map maps a seqno, adding the mapping if required. It returns whether the seqno could be mapped, the target seqno, and the pid delta to apply.

func (*Map) Reverse

func (m *Map) Reverse(seqno uint16) (bool, uint16, uint16)

Reverse maps a target seqno to the original seqno. It returns true if the seqno could be mapped, the original seqno, and the pid delta to apply in reverse.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL