wifi

package
v1.10.4-0...-52d5685 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDWhisperPayload      layers.Dot11InformationElementID = 222
	IDWhisperCompression  layers.Dot11InformationElementID = 223
	IDWhisperIdentity     layers.Dot11InformationElementID = 224
	IDWhisperSignature    layers.Dot11InformationElementID = 225
	IDWhisperStreamHeader layers.Dot11InformationElementID = 226
)

Variables

View Source
var (
	SignatureAddr    = net.HardwareAddr{0xde, 0xad, 0xbe, 0xef, 0xde, 0xad}
	SignatureAddrStr = "de:ad:be:ef:de:ad"
	BroadcastAddr    = net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
)
View Source
var SerializationOptions = gopacket.SerializeOptions{
	FixLengths:       true,
	ComputeChecksums: true,
}

Functions

func Chan2Freq

func Chan2Freq(channel int) int

func Compress

func Compress(data []byte) (bool, []byte, error)

func Decompress

func Decompress(data []byte) ([]byte, error)

func Freq2Chan

func Freq2Chan(freq int) int

func IsBroadcast

func IsBroadcast(dot11 *layers.Dot11) bool

func Pack

func Pack(from, to net.HardwareAddr, payload []byte, compress bool) (error, []byte)

func PackOneOf

func PackOneOf(from, to net.HardwareAddr, peerID []byte, signature []byte, streamID uint64, seqNum uint64, seqTot uint64, payload []byte, compress bool) (error, []byte)

func Parse

func Parse(packet gopacket.Packet) (ok bool, radio *layers.RadioTap, dot11 *layers.Dot11)

func Serialize

func Serialize(layers ...gopacket.SerializableLayer) (error, []byte)

func Unpack

func Unpack(pkt gopacket.Packet, radio *layers.RadioTap, dot11 *layers.Dot11) (error, []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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