plvp

package
v0.0.0-...-d0596d9 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2017 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Overview

Package plvp is the library for creating a vantage poing on a planet-lab node

Package plvp is the library for creating a vantage poing on a planet-lab node

Package plvp is the library for creating a vantage poing on a planet-lab node

Index

Constants

View Source
const (
	// ID is the ICMDPID magic number
	ID = 0xf0f1
	// SEQ is the ICMP seq number magic number
	SEQ = 0xf2f3
)

Variables

View Source
var (
	// ErrorNotICMPEcho is returned when the probe is not of the right type
	ErrorNotICMPEcho = fmt.Errorf("Received Non ICMP Probe")
	// ErrorNonSpoofedProbe is returned when the probe is not spoofed
	ErrorNonSpoofedProbe = fmt.Errorf("Received ICMP Probe that was not spoofed")
	// ErrorSpoofedProbeNoID is returned when the probe has no ID
	ErrorSpoofedProbeNoID = fmt.Errorf("Received a spoofed probe with no id")
	// ErrorNoSpooferIP is returned when there is no spoofer ip in the packet
	ErrorNoSpooferIP = fmt.Errorf("No spoofer IP found in packet")
	// ErrorFailedToParseOptions is returned when there was an error parsing options
	ErrorFailedToParseOptions = fmt.Errorf("Failed to parse IPv4 options")
	// ErrorFailedToConvertOption is returned when there is an issue converting an option
	ErrorFailedToConvertOption = fmt.Errorf("Failed to convert IPv4 option")
	// ErrorSpooferIP is returned when the spoofer ip is invalid
	ErrorSpooferIP = fmt.Errorf("Failed to convert spoofer ip")
	// ErrorReadError is returned when there is an error reading from the icmp monitoring conn
	ErrorReadError = fmt.Errorf("Failed to read from conn")
)

Functions

func HandleSig

func HandleSig(s os.Signal)

HandleSig handles signals

func Start

func Start(c Config, s SendCloser) chan error

Start a plvp with the given config

Types

type Config

type Config struct {
	Local   LocalConfig
	Scamper ScamperConfig
}

Config represents the configuration of the vantage-point

func NewConfig

func NewConfig() Config

NewConfig creates a new config struct for the plvp

type Flags

type Flags struct {
	Local   LocalConfig
	Scamper ScamperConfig
}

Flags represents the arguments to the vantage-point

type LocalConfig

type LocalConfig struct {
	Addr         *string `flag:"a"`
	CloseStdDesc *bool   `flag:"d"`
	Port         *int    `flag:"p"`
	PProfAddr    *string `flag:"pprof-addr"`
	AutoConnect  *bool   `flag:"auto-connect"`
	SecureConn   *bool   `flag:"secure-conn"`
	CertPath     *string `flag:"cert-path"`
	KeyPath      *string `flag:"key-path"`
	StartScamp   *bool   `flag:"start-scamper"`
	Host         *string `flag:"host"`
	RootCA       *string `flag:"root-ca"`
}

LocalConfig represents the configuration of the vantage-point minus Scamper

type PLControllerSender

type PLControllerSender struct {
	RootCA string
	// contains filtered or unexported fields
}

func (*PLControllerSender) Close

func (cs *PLControllerSender) Close() error

func (*PLControllerSender) Send

func (cs *PLControllerSender) Send(ps []*dm.Probe) error

type ScamperConfig

type ScamperConfig struct {
	BinPath *string `flag:"b"`
	Host    *string `flag:"scamper-host"`
	Port    *string `flag:"scamper-port"`
}

ScamperConfig represents the scamper configuration options

type SendCloser

type SendCloser interface {
	Send([]*dm.Probe) error
	Close() error
}

type SpoofPingMonitor

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

SpoofPingMonitor monitors for ICMP echo replies that match the magic numbers

func NewSpoofPingMonitor

func NewSpoofPingMonitor() *SpoofPingMonitor

NewSpoofPingMonitor makes a SpoofPingMonitor

func (*SpoofPingMonitor) Quit

func (sm *SpoofPingMonitor) Quit()

Quit shuts down the monitor

func (*SpoofPingMonitor) Start

func (sm *SpoofPingMonitor) Start(addr string, probes chan<- dm.Probe, ec chan error)

Start the SpoofPingMonitor

Jump to

Keyboard shortcuts

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