adversary

package
v0.0.0-...-26ee366 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdversaryRouter

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

func NewAdversaryRouter

func NewAdversaryRouter(log *log.Logger, sk ed25519.PrivateKey, debug bool) *AdversaryRouter

func (*AdversaryRouter) ConfigureFilterDefaults

func (a *AdversaryRouter) ConfigureFilterDefaults(rates DropRates)

func (*AdversaryRouter) ConfigureFilterPeer

func (a *AdversaryRouter) ConfigureFilterPeer(peer types.PublicKey, rates DropRates)

func (*AdversaryRouter) Connect

func (a *AdversaryRouter) Connect(conn net.Conn, options ...router.ConnectionOption) (types.SwitchPortID, error)

func (*AdversaryRouter) Coords

func (a *AdversaryRouter) Coords() types.Coordinates

func (*AdversaryRouter) ManholeHandler

func (a *AdversaryRouter) ManholeHandler(w http.ResponseWriter, req *http.Request)

func (*AdversaryRouter) OverlayReadHandler

func (a *AdversaryRouter) OverlayReadHandler(quit <-chan bool)

func (*AdversaryRouter) Ping

func (a *AdversaryRouter) Ping(ctx context.Context, addr net.Addr) (uint16, time.Duration, error)

func (*AdversaryRouter) PublicKey

func (a *AdversaryRouter) PublicKey() types.PublicKey

func (*AdversaryRouter) Subscribe

func (a *AdversaryRouter) Subscribe(ch chan events.Event)

type DropCounts

type DropCounts PeerFrameCount

type DropRates

type DropRates struct {
	Overall uint64
	Frames  FrameDropRates
}

func NewDropRates

func NewDropRates() DropRates

type DropSettings

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

func NewDropSettings

func NewDropSettings() DropSettings

type FrameCounts

type FrameCounts map[types.FrameType]*atomic.Uint64

type FrameDropRates

type FrameDropRates map[types.FrameType]uint64

type PacketsDropped

type PacketsDropped PacketsReceived

type PacketsReceived

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

func NewPacketsReceived

func NewPacketsReceived() PacketsReceived

type PeerDropCounts

type PeerDropCounts PeerDropRates

type PeerDropRates

type PeerDropRates map[types.PublicKey]DropRates

type PeerFrameCount

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

type PeerFrameCounts

type PeerFrameCounts map[types.PublicKey]PeerFrameCount

Jump to

Keyboard shortcuts

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