Documentation ¶
Index ¶
- type Event
- type EventFunc
- type HTTPEvent
- type HTTPHeaderItem
- type HTTPRequestEvent
- type HTTPResponseEvent
- type HTTPStreamFactory
- type Handle
- func (slf *Handle) EventHandle()
- func (slf *Handle) Listen() error
- func (slf *Handle) SetBpf(bpf string) *Handle
- func (slf *Handle) SetEventHandle(goroutineNum int, handle EventFunc) *Handle
- func (slf *Handle) SetFlushTime(timer time.Duration) *Handle
- func (slf *Handle) SetPromisc(promise bool) *Handle
- type StreamDataBlock
- type StreamReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPHeaderItem ¶
HTTPHeaderItem is HTTP header key-value pair
type HTTPRequestEvent ¶
type HTTPRequestEvent struct { HTTPEvent ClientAddr string ServerAddr string Method string URI string Version string Headers []HTTPHeaderItem Body []byte }
HTTPRequestEvent is HTTP request
type HTTPResponseEvent ¶
type HTTPResponseEvent struct { HTTPEvent ClientAddr string ServerAddr string Version string Code uint Reason string Headers []HTTPHeaderItem Body []byte }
HTTPResponseEvent is HTTP response
type HTTPStreamFactory ¶
type HTTPStreamFactory struct {
// contains filtered or unexported fields
}
HTTPStreamFactory implements StreamFactory interface for tcpassembly
func NewHTTPStreamFactory ¶
func NewHTTPStreamFactory(out chan<- interface{}) HTTPStreamFactory
NewHTTPStreamFactory create a NewHTTPStreamFactory.
func (HTTPStreamFactory) New ¶
func (f HTTPStreamFactory) New(netFlow, tcpFlow gopacket.Flow) (ret tcpassembly.Stream)
New creates a HTTPStreamFactory.
func (*HTTPStreamFactory) RunningStreamCount ¶
func (f *HTTPStreamFactory) RunningStreamCount() int32
RunningStreamCount 当前流计数.
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
func NewPacketHandle ¶
func (*Handle) SetEventHandle ¶
SetEventHandle 设置多协程事件处理.
func (*Handle) SetFlushTime ¶
SetFlushTime 设置清理缓存时间, 清除收到的最后一个数据包时间加上此时间之前的所有的数据包.
type StreamDataBlock ¶
StreamDataBlock is copied from tcpassembly.Reassembly
func NewStreamDataBlock ¶
func NewStreamDataBlock(bytes []byte, seen time.Time) *StreamDataBlock
NewStreamDataBlock create a new StreamDataBlock.
type StreamReader ¶
type StreamReader struct {
// contains filtered or unexported fields
}
StreamReader read data from tcp stream
func NewStreamReader ¶
func NewStreamReader() *StreamReader
NewStreamReader create a new StreamReader.
Click to show internal directories.
Click to hide internal directories.