Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Plugins = make(map[Protocol][]Plugin)
Functions ¶
func RegisterPlugin ¶
func RegisterPlugin(p Plugin)
This function must not be run concurrently. This function should only be run once per plugin.
Types ¶
type Plugin ¶
type Plugin interface { // If the PluginResults != nil, and error == nil the service was found // If the PluginResults == nil, and error == nil the service was not found // If the PluginResults == nil, and error != nil an error was encountered while looking for the plugin // Never return both PluginResults and error as not nil Run(net.Conn, PluginConfig) (*PluginResults, error) PortPriority(uint16) bool Name() string Type() Protocol Priority() int }
type PluginConfig ¶
type PluginExtended ¶
type PluginExtended interface { Plugin // Return true if the dst port must be skipped PortReject(uint16) bool // Return 0 if any src port is allowed SrcPort() uint16 SupportedIPVersion() SupportedIPVersion }
type PluginID ¶
type PluginID struct {
// contains filtered or unexported fields
}
Used as a key for maps to plugins. i.e.: map[Service] Plugin
func CreatePluginID ¶
type PluginResults ¶
type SupportedIPVersion ¶
type SupportedIPVersion uint64
const ( IPv4 SupportedIPVersion = 1 << iota IPv6 )
Click to show internal directories.
Click to hide internal directories.