gre

package
v0.0.0-...-3db2b82 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

handle provides utility functions to configure interface BPF handles.

gre/packet provides a function to GRE encapsulate existing packets.

handle provides utility functions to configure interface BPF handles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncapsulatePacket

func EncapsulatePacket(packet []byte, key uint32) gopacket.Packet

Build an new packet that encapsulates the existing packet with GRE header.

func GetLanPacketHandle

func GetLanPacketHandle(writeHandle *pcap.Handle) func(packet gopacket.Packet)

func GetStartHandler

func GetStartHandler(LanBPFFilter string, TapBPFFilter string, runLan chan bool, runTap chan bool, quitLan chan bool, quitTap chan bool) func(http.ResponseWriter, *http.Request)

func GetStopHandler

func GetStopHandler(runTap chan bool, runLan chan bool, quitLan chan bool, quitTap chan bool) func(http.ResponseWriter, *http.Request)

func GetTapPacketHandle

func GetTapPacketHandle(writeHandle *pcap.Handle, writeIface *net.Interface) func(packet gopacket.Packet)

func PktSourceHandle

func PktSourceHandle(tapSrc gopacket.PacketDataSource, run chan bool, quit chan bool, packetHandle func(packet gopacket.Packet), name string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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