forked from jessfraz/junk
/
types.go
43 lines (35 loc) · 1.32 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package types
import (
"github.com/google/gopacket/layers"
)
// PacketBlob holds the object structure for a packet blob.
type PacketBlob struct {
LayerType string `json:"type,omitempty"`
Device string `json:"device,omitempty"`
Payload string `json:"payload,omitempty"`
FoundHTTP bool `json:"foundHTTP,omitempty"`
// Ethernet options.
SrcMAC string `json:"srcMAC,omitempty"`
DstMAC string `json:"dstMAC,omitempty"`
EthernetType layers.EthernetType `json:"ethernetType,omitempty"`
// IPv4 options.
SrcIP string `json:"srcIP,omitempty"`
DstIP string `json:"dstIP,omitempty"`
IPProtocol layers.IPProtocol `json:"ipProtocol,omitempty"`
// TCP options.
SrcPort string `json:"srcPort,omitempty"`
DstPort string `json:"dstPort,omitempty"`
SequenceNumber uint32 `json:"sequenceNumber,omitempty"`
SYN bool `json:"syn,omitempty"`
ACK bool `json:"ack,omitempty"`
// Raw layer info.
Layers interface{} `json:"layers,omitempty"`
}
// ProcBlob holds the object structure for a /proc blob.
type ProcBlob struct {
PID int `json:"pid,omitempty"`
Env []string `json:"env,omitempty"`
Cmdline []string `json:"cmdline,omitempty"`
Cwd string `json:"cwd,omitempty"`
Exe string `json:"exe,omitempty"`
}