gpi

package module
v1.20200421.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

README

Protocol Identification

Network traffic classification library written purely in GoLang. See godoc for more details.

GoDoc

Supported Protocols

  • ICMPv4
  • ICMPv6
  • HTTP
  • SMTP
  • SSH
  • SSL
  • TLS
  • DNS
  • RPC
  • RDP
  • SMB
  • FTP
  • NetBIOS
  • JABBER
  • MQTT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol

type Protocol string
const (
	ProtocolICMPv4  Protocol = "ICMPv4"
	ProtocolICMPv6  Protocol = "ICMPv6"
	ProtocolHTTP    Protocol = "HTTP"
	ProtocolTLS     Protocol = "TLS"
	ProtocolSSL     Protocol = "SSL"
	ProtocolFTP     Protocol = "FTP"
	ProtocolSSH     Protocol = "SSH"
	ProtocolSMTP    Protocol = "SMTP"
	ProtocolDNS     Protocol = "DNS"
	ProtocolTCP     Protocol = "TCP"
	ProtocolUDP     Protocol = "UDP"
	ProtocolUnknown Protocol = "UNKNOWN"
)

func Classify

func Classify(packet gopacket.Packet) Protocol

Classify tries to identify network traffic by doing spot checks of the provided packet. The function will cache certain packages to improve detection rate

func ClassifyByPorts added in v1.20200421.0

func ClassifyByPorts(packet gopacket.Packet) Protocol

ClassifyByPorts will return protocol associated by the standard port mapping. This can be seen as fallback option in case e.g. the packet inspection of Classify returns ProtocolUnknown.

func (Protocol) String

func (protocol Protocol) String() string

type TCPModule

type TCPModule interface {
	Match(*layers.TCP) bool
	Protocol() Protocol
}

type TCPModuleFTP

type TCPModuleFTP struct{}

func (TCPModuleFTP) Match

func (module TCPModuleFTP) Match(tcp *layers.TCP) bool

func (TCPModuleFTP) Protocol

func (module TCPModuleFTP) Protocol() Protocol

type TCPModuleHTTP

type TCPModuleHTTP struct{}

func (TCPModuleHTTP) Match

func (module TCPModuleHTTP) Match(tcp *layers.TCP) bool

func (TCPModuleHTTP) Protocol

func (module TCPModuleHTTP) Protocol() Protocol

type TCPModuleSMTP

type TCPModuleSMTP struct{}

func (TCPModuleSMTP) Match

func (module TCPModuleSMTP) Match(tcp *layers.TCP) bool

func (TCPModuleSMTP) Protocol

func (module TCPModuleSMTP) Protocol() Protocol

type TCPModuleSSH

type TCPModuleSSH struct{}

func (TCPModuleSSH) Match

func (module TCPModuleSSH) Match(tcp *layers.TCP) bool

func (TCPModuleSSH) Protocol

func (module TCPModuleSSH) Protocol() Protocol

type TCPModuleSSL

type TCPModuleSSL struct{}

func (TCPModuleSSL) Match

func (module TCPModuleSSL) Match(tcp *layers.TCP) bool

func (TCPModuleSSL) Protocol

func (module TCPModuleSSL) Protocol() Protocol

type TCPModuleTLS

type TCPModuleTLS struct{}

func (TCPModuleTLS) Match

func (module TCPModuleTLS) Match(tcp *layers.TCP) bool

func (TCPModuleTLS) Protocol

func (module TCPModuleTLS) Protocol() Protocol

type TCPModules

type TCPModules []TCPModule

type UDPModule

type UDPModule interface {
	Match(*layers.UDP) bool
	Protocol() Protocol
}

type UDPModuleDNS

type UDPModuleDNS struct{}

func (UDPModuleDNS) Match

func (module UDPModuleDNS) Match(udp *layers.UDP) bool

func (UDPModuleDNS) Protocol

func (module UDPModuleDNS) Protocol() Protocol

type UDPModules

type UDPModules []UDPModule

Jump to

Keyboard shortcuts

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