receiver

package
v0.0.0-...-eacd88d Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: GPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Log = logging.MustGetLogger("")

Functions

func PacketMatcherGreaterThan

func PacketMatcherGreaterThan(p1 *PacketMatcher, p2 *PacketMatcher) bool

Function to order the PacketMatcher from the General Network to the Particular one

Types

type Dispatcher

type Dispatcher struct {
	// contains filtered or unexported fields
}

func NewDispatcher

func NewDispatcher(waitGroup *sync.WaitGroup,
	packetChan chan gopacket.Packet) *Dispatcher

Constructor

func (*Dispatcher) AddPacketMatcher

func (self *Dispatcher) AddPacketMatcher(pm *PacketMatcher) error

*

  • @brief Adds a packet matcher. *
  • @param pm { parameter_description } *
  • @return { description_of_the_return_value }

func (*Dispatcher) Finish

func (self *Dispatcher) Finish()

*

  • @brief { function_description } *
  • @return { description_of_the_return_value }

func (*Dispatcher) RemovePacketMatcher

func (self *Dispatcher) RemovePacketMatcher(pm *PacketMatcher) error

*

  • @brief Removes a packet matcher. *
  • @param pm { parameter_description } *
  • @return { description_of_the_return_value }

func (*Dispatcher) Run

func (self *Dispatcher) Run()

*

  • @brief { function_description } *
  • @return { description_of_the_return_value }

type IPAddrProcessing

type IPAddrProcessing func(packet gopacket.Packet, data *IPHeaderInfo) error

type IPHeaderInfo

type IPHeaderInfo struct {
	// contains filtered or unexported fields
}

type PacketMatcher

type PacketMatcher struct {
	Task processing.ITask
	// contains filtered or unexported fields
}

func NewPacketMatcher

func NewPacketMatcher(dstSubnet *net.IPNet,
	srcSubnet *net.IPNet,
	dstPort uint16,
	task processing.ITask) *PacketMatcher

func (*PacketMatcher) Match

func (p *PacketMatcher) Match(srcAddress *net.IP) bool

func (*PacketMatcher) MatchOnlySrc

func (p *PacketMatcher) MatchOnlySrc(srcAddress *net.IP,
	dstAddress *net.IP,
	dstPort uint16) bool

func (*PacketMatcher) MatchSrcAndPort

func (p *PacketMatcher) MatchSrcAndPort(srcAddress *net.IP, dstPort uint16) bool

func (*PacketMatcher) String

func (p *PacketMatcher) String() string

String Interface

type PacketMatchingLogic

type PacketMatchingLogic interface {
	LogicName() string
	AddPacketMatcher() error
	RemovePacketPacket() error
	GetTask(srcAddress net.IP,
		dstAddress net.IP,
		dstPort uint16) (task processing.ITask, err error)
}

type SimplePacketMatchingLogic

type SimplePacketMatchingLogic struct {
	// contains filtered or unexported fields
}

func (*SimplePacketMatchingLogic) AddPacketMatcher

func (s *SimplePacketMatchingLogic) AddPacketMatcher(pm *PacketMatcher) error

*

  • @brief Adds a packet matcher. *
  • @param pm { parameter_description } *
  • @return { description_of_the_return_value }

func (*SimplePacketMatchingLogic) Dump

func (s *SimplePacketMatchingLogic) Dump()

*

  • @brief { function_description } *
  • @return { description_of_the_return_value }

func (*SimplePacketMatchingLogic) GetTask

func (s *SimplePacketMatchingLogic) GetTask(srcAddress *net.IP,
	dstAddress *net.IP,
	dstPort uint16) (task processing.ITask, ok bool)

*

  • @brief Gets the task. *
  • @param srcAddress The source address
  • @param dstAddress The destination address
  • @param dstPort The destination port *
  • @return The task.

func (*SimplePacketMatchingLogic) LogicName

func (s *SimplePacketMatchingLogic) LogicName() string

*

  • @brief { function_description } *
  • @return { description_of_the_return_value }

func (*SimplePacketMatchingLogic) RemovePacketMatcher

func (s *SimplePacketMatchingLogic) RemovePacketMatcher(pm *PacketMatcher) error

type Sniffer

type Sniffer struct {
	// contains filtered or unexported fields
}

func NewSniffer

func NewSniffer(netIface string,
	waitGroup *sync.WaitGroup,
	packetChan chan gopacket.Packet) *Sniffer

Constructor

func (*Sniffer) Finish

func (sniffer *Sniffer) Finish()

func (*Sniffer) Run

func (sniffer *Sniffer) Run()

type TransportHeaderInfo

type TransportHeaderInfo struct {
	// contains filtered or unexported fields
}

type TransportHeaderProcessing

type TransportHeaderProcessing func(packet gopacket.Packet, data *TransportHeaderInfo) error

Jump to

Keyboard shortcuts

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