filter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

sessionfiltertrace

Index

Constants

This section is empty.

Variables

View Source
var (
	AuthenticationFilterName = "session-filter-auth"
	SessionAttributeAuth     = &AuthenticationFilter{}
)
View Source
var (
	DefaultAllowedInterval       = 500 //ms
	ConnectionThrottleFilterName = "session-filter-connectionthrottle"
)
View Source
var (
	LimiterFilterName       = "session-filter-limiter"
	SessionAttributeLimiter = &LimiterFilter{}
)
View Source
var (
	BlackListFilterName = "session-filter-blacklist"
)
View Source
var (
	KeepAliveFilterName = "session-filter-keepalive"
)
View Source
var (
	SessionFilterTraceName = "session-filter-trace"
)

Functions

This section is empty.

Types

type AuthenticationFilter

type AuthenticationFilter struct {
	SessionAuthHandler AuthenticationHandler
}

func (*AuthenticationFilter) GetInterestOps

func (af *AuthenticationFilter) GetInterestOps() uint

func (*AuthenticationFilter) GetName

func (af *AuthenticationFilter) GetName() string

func (*AuthenticationFilter) OnPacketReceived

func (af *AuthenticationFilter) OnPacketReceived(s *netlib.Session, packetid int, logicNo uint32, packet interface{}) bool

func (*AuthenticationFilter) OnPacketSent

func (af *AuthenticationFilter) OnPacketSent(s *netlib.Session, packetid int, logicNo uint32, data []byte) bool

func (*AuthenticationFilter) OnSessionClosed

func (af *AuthenticationFilter) OnSessionClosed(s *netlib.Session) bool

func (*AuthenticationFilter) OnSessionIdle

func (af *AuthenticationFilter) OnSessionIdle(s *netlib.Session) bool

func (*AuthenticationFilter) OnSessionOpened

func (af *AuthenticationFilter) OnSessionOpened(s *netlib.Session) bool

type AuthenticationHandler

type AuthenticationHandler func(s *netlib.Session, bSuc bool)

type BlackListFilter

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

func (*BlackListFilter) Block

func (blf *BlackListFilter) Block(ipnet *net.IPNet)

func (*BlackListFilter) GetInterestOps

func (blf *BlackListFilter) GetInterestOps() uint

func (*BlackListFilter) GetName

func (blf *BlackListFilter) GetName() string

func (*BlackListFilter) OnPacketReceived

func (blf *BlackListFilter) OnPacketReceived(s *netlib.Session, packetid int, logicNo uint32, packet interface{}) bool

func (*BlackListFilter) OnPacketSent

func (blf *BlackListFilter) OnPacketSent(s *netlib.Session, packetid int, logicNo uint32, data []byte) bool

func (*BlackListFilter) OnSessionClosed

func (blf *BlackListFilter) OnSessionClosed(s *netlib.Session) bool

func (*BlackListFilter) OnSessionIdle

func (blf *BlackListFilter) OnSessionIdle(s *netlib.Session) bool

func (*BlackListFilter) OnSessionOpened

func (blf *BlackListFilter) OnSessionOpened(s *netlib.Session) bool

func (*BlackListFilter) UnBlock

func (blf *BlackListFilter) UnBlock(ipnet *net.IPNet)

type ConnectionThrottleFilter

type ConnectionThrottleFilter struct {
	AllowedInterval int //ms
	// contains filtered or unexported fields
}

func (*ConnectionThrottleFilter) GetInterestOps

func (ctf *ConnectionThrottleFilter) GetInterestOps() uint

func (*ConnectionThrottleFilter) GetName

func (ctf *ConnectionThrottleFilter) GetName() string

func (*ConnectionThrottleFilter) OnPacketReceived

func (ctf *ConnectionThrottleFilter) OnPacketReceived(s *netlib.Session, packetid int, logicNo uint32, packet interface{}) bool

func (*ConnectionThrottleFilter) OnPacketSent

func (ctf *ConnectionThrottleFilter) OnPacketSent(s *netlib.Session, packetid int, logicNo uint32, data []byte) bool

func (*ConnectionThrottleFilter) OnSessionClosed

func (ctf *ConnectionThrottleFilter) OnSessionClosed(s *netlib.Session) bool

func (*ConnectionThrottleFilter) OnSessionIdle

func (ctf *ConnectionThrottleFilter) OnSessionIdle(s *netlib.Session) bool

func (*ConnectionThrottleFilter) OnSessionOpened

func (ctf *ConnectionThrottleFilter) OnSessionOpened(s *netlib.Session) bool

type KeepAliveFilter

type KeepAliveFilter struct {
}

func (*KeepAliveFilter) GetInterestOps

func (kf *KeepAliveFilter) GetInterestOps() uint

func (*KeepAliveFilter) GetName

func (kf *KeepAliveFilter) GetName() string

func (*KeepAliveFilter) OnPacketReceived

func (kf *KeepAliveFilter) OnPacketReceived(s *netlib.Session, packetid int, logicNo uint32, packet interface{}) bool

func (*KeepAliveFilter) OnPacketSent

func (kf *KeepAliveFilter) OnPacketSent(s *netlib.Session, packetid int, logicNo uint32, data []byte) bool

func (*KeepAliveFilter) OnSessionClosed

func (kf *KeepAliveFilter) OnSessionClosed(s *netlib.Session) bool

func (*KeepAliveFilter) OnSessionIdle

func (kf *KeepAliveFilter) OnSessionIdle(s *netlib.Session) bool

func (*KeepAliveFilter) OnSessionOpened

func (kf *KeepAliveFilter) OnSessionOpened(s *netlib.Session) bool

type LimiterFilter

type LimiterFilter struct {
	netlib.BasicSessionFilter
}

func (*LimiterFilter) GetInterestOps

func (lf *LimiterFilter) GetInterestOps() uint

func (*LimiterFilter) GetName

func (lf *LimiterFilter) GetName() string

func (*LimiterFilter) OnPacketReceived

func (lf *LimiterFilter) OnPacketReceived(s *netlib.Session, packetid int, logicNo uint32, packet interface{}) bool

type SessionFilterTrace

type SessionFilterTrace struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*SessionFilterTrace) GetInterestOps

func (sft *SessionFilterTrace) GetInterestOps() uint

func (SessionFilterTrace) GetName

func (sft SessionFilterTrace) GetName() string

func (*SessionFilterTrace) OnPacketReceived

func (sft *SessionFilterTrace) OnPacketReceived(s *netlib.Session, packetid int, logicNo uint32, packet interface{}) bool

func (*SessionFilterTrace) OnPacketSent

func (sft *SessionFilterTrace) OnPacketSent(s *netlib.Session, packetid int, logicNo uint32, data []byte) bool

func (*SessionFilterTrace) OnSessionClosed

func (sft *SessionFilterTrace) OnSessionClosed(s *netlib.Session) bool

func (*SessionFilterTrace) OnSessionIdle

func (sft *SessionFilterTrace) OnSessionIdle(s *netlib.Session) bool

func (*SessionFilterTrace) OnSessionOpened

func (sft *SessionFilterTrace) OnSessionOpened(s *netlib.Session) bool

Jump to

Keyboard shortcuts

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