qilib

package
v0.0.0-...-9657bc3 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2015 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package qilib contains the necessary structs and funcs to create sniffing sessions detecting quantum injection attacks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The source of packets.
	Handle *pcap.Handle
	// Progress indicator.
	Progress func(pkt gopacket.Packet)
	// Warning indicator.
	Warning func(pkt gopacket.Packet, diff Diff)
	// Unparseable packet indicator.
	Unparseable func(pkt gopacket.Packet)
}

The parameters to create a new Session.

type Diff

type Diff struct {
	A   []byte
	B   []byte
	Seq uint32
	ID  StreamID
}

A difference detected.

type Session

type Session struct {
	Config
	// contains filtered or unexported fields
}

Session encapsulates a sniffing session.

func NewSession

func NewSession(c Config) *Session

func (*Session) Clean

func (s *Session) Clean() error

Clean will remove all created tempfiles.

func (*Session) Next

func (s *Session) Next() error

Next looks at the next packet in the source.

func (*Session) Run

func (s *Session) Run() error

Run goes through all packets in the source.

type StreamID

type StreamID struct {
	SrcIP   net.IP
	DstIP   net.IP
	SrcPort layers.TCPPort
	DstPort layers.TCPPort
}

The public representation of a stream.

func (StreamID) String

func (i StreamID) String() string

Jump to

Keyboard shortcuts

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