read

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package read provides convenience read functions to extract values from a reader.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Protocol

func Protocol(p uint8) string

Protocol returns the protocol name

func TCPFlags

func TCPFlags(f uint8) string

TCPFlags returns the TCP flags

func Uint16

func Uint16(v *uint16, r io.Reader) error

Uint16 reads an unsigned word

func Uint32

func Uint32(v *uint32, r io.Reader) error

Uint32 reads an unsigned dword

func Uint32IPv4

func Uint32IPv4(v *LongIPv4, r io.Reader) error

Uint32IPv4 reads an unsigned dword as IP address

func Uint64

func Uint64(v *uint64, r io.Reader) error

Uint64 reads an unsigned quad word

func Uint8

func Uint8(v *uint8, r io.Reader) error

Uint8 reads a single byte

func VariableLength

func VariableLength(p []byte, r io.Reader) ([]byte, error)

VariableLength reads a variable length byte stream as per RFC 7011 section 7.

Types

type LongIPv4

type LongIPv4 uint32

LongIPv4 is a 32 bit packed IPv4 address.

func (LongIPv4) String

func (l LongIPv4) String() string

Jump to

Keyboard shortcuts

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