tftp

package
v0.0.0-...-5111589 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateExecutor

func CreateExecutor(client *tftp.Client, validator ResponseValidator) bender.RequestExecutor

CreateExecutor creates a new TFTP RequestExecutor.

func DiscardingValidator

func DiscardingValidator(request *Request, writer io.WriterTo) (interface{}, error)

DiscardingValidator reads the whole request and discards its body.

Types

type Request

type Request struct {
	Filename string
	Mode     RequestMode
}

Request represents a tftp receive request

type RequestMode

type RequestMode string

RequestMode represents a mode of the tftp request

const (
	ModeOctet    RequestMode = "octet"
	ModeNetascii             = "netascii"
)

Available request modes

type ResponseValidator

type ResponseValidator func(request *Request, writer io.WriterTo) (interface{}, error)

ResponseValidator validates a udp response.

Jump to

Keyboard shortcuts

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