Documentation ¶
Index ¶
- Variables
- func Headers(h2 HTTP2) map[string]string
- type HTTP2
- func (h *HTTP2) CanDecode() gopacket.LayerClass
- func (h *HTTP2) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (h *HTTP2) Frames() []http2.Frame
- func (h HTTP2) LayerType() gopacket.LayerType
- func (h *HTTP2) NextLayerType() gopacket.LayerType
- func (h *HTTP2) Payload() []byte
- func (h HTTP2) String() string
- type HeadersState
- func (s *HeadersState) Headers(srcip string, srctcp uint16, dstip string, dsttcp uint16) map[string]string
- func (s *HeadersState) SetHeaders(srcip string, srctcp uint16, dstip string, dsttcp uint16, key string, ...)
- func (s *HeadersState) UpdateState(srcip string, srctcp uint16, dstip string, dsttcp uint16, ...)
- type InterceptedPacket
- type PacketInterceptor
Constants ¶
This section is empty.
Variables ¶
View Source
var LayerTypeHTTP2 = gopacket.RegisterLayerType(12345, gopacket.LayerTypeMetadata{Name: "HTTP2", Decoder: gopacket.DecodeFunc(decodeHTTP2)})
Create a layer type, should be unique and high, so it doesn't conflict, giving it a name and a decoder to use.
View Source
var State = &HeadersState{state: map[ipTcpConn]map[string]string{}}
Functions ¶
Types ¶
type HTTP2 ¶
Implement my layer
func (*HTTP2) CanDecode ¶
func (h *HTTP2) CanDecode() gopacket.LayerClass
func (*HTTP2) DecodeFromBytes ¶
func (h *HTTP2) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*HTTP2) NextLayerType ¶
type HeadersState ¶
type HeadersState struct {
// contains filtered or unexported fields
}
func (*HeadersState) SetHeaders ¶
func (*HeadersState) UpdateState ¶
type InterceptedPacket ¶
type PacketInterceptor ¶
type PacketInterceptor struct {
// contains filtered or unexported fields
}
func NewPacketInterceptor ¶
func (*PacketInterceptor) Close ¶
func (i *PacketInterceptor) Close()
func (*PacketInterceptor) Packets ¶
func (i *PacketInterceptor) Packets() chan InterceptedPacket
Click to show internal directories.
Click to hide internal directories.