tlv

package
v1.5.1-0...-0ef3752 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package tlv contains code to read and write type-length-value messages.

Index

Constants

View Source
const MaxMessageSize = 1024 * 1024 * 1024 // 1GB

MaxMessageSize defines how large a message can be before we reject it.

Variables

This section is empty.

Functions

func ReadLV

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

ReadLV reads the length-value from a TLV record.

func ReadTLV

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

ReadTLV reads a type-length-value record from r.

func ReadType

func ReadType(r io.Reader) (byte, error)

ReadType reads the type from a TLV record.

func WriteLV

func WriteLV(w io.Writer, buf []byte) error

WriteLV writes the length-value in a TLV record to w.

func WriteTLV

func WriteTLV(w io.Writer, typ byte, buf []byte) error

WriteTLV writes a type-length-value record to w.

func WriteType

func WriteType(w io.Writer, typ byte) error

WriteType writes the type in a TLV record to w.

Types

This section is empty.

Jump to

Keyboard shortcuts

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