tap

package
v0.0.0-...-94a1d89 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

A wrapper for the github.com/songgao/water library to fit in the gopacket terminology.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface struct {
	*water.Interface
	MTU uint
}

func New

func New(ifName string) (i Interface, err error)

Opens a new TAP device.

func (Interface) ReadPacketData

func (i Interface) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error)

func (Interface) ReadPacketDataTo

func (i Interface) ReadPacketDataTo(data []byte) (ci gopacket.CaptureInfo, err error)

func (Interface) WritePacketData

func (i Interface) WritePacketData(pkt []byte) (err error)

Jump to

Keyboard shortcuts

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