{"modulePath":"github.com/nextlinux/tracee","version":"v0.0.0-20230527010910-d4ca6f93c448","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package pcaps\n\n## Constants\n\n```go\nconst AF_INET = 2\n```\n\n```go\nconst AF_INET6 = 10\n```\n\n## Functions\n\n```go\nfunc PcapsEnabled(simple Config) bool\n```\nPcapsEnabled checks if the simple config has any bool value set\n\n## Types\n\n```go\ntype Config struct {\n\tCaptureSingle    bool\n\tCaptureProcess   bool\n\tCaptureContainer bool\n\tCaptureCommand   bool\n\tCaptureFiltered  bool\n\tCaptureLength    uint32\n}\n```\n\n```go\ntype Pcap struct {\n\t// contains filtered or unexported fields\n}\n```\nPcap is a representation of a pcap file\n\n```go\nfunc NewPcap(e *trace.Event, t PcapType) (*Pcap, error)\n```\n\n```go\ntype PcapCache struct {\n\t// contains filtered or unexported fields\n}\n```\nPcapCache is an intermediate LRU cache in between Pcap and Pcaps\n\n```go\ntype PcapOption uint32\n```\n\n```go\nconst (\n\tFiltered PcapOption = 0x1\n)\n```\n\n```go\nfunc GetPcapOptions(c Config) PcapOption\n```\n\n```go\ntype PcapType uint\n```\n\n```go\nconst (\n\t//\n\t// 1 (0001): process:   1 pcap file per process (default)\n\t// 2 (0010): container: 1 pcap file per container\n\t// 4 (0011): command:   1 pcap file per command\n\t// 8 (1000): single:    1 single pcap file for all\n\t//\n\t// or a combination:\n\t//\n\t// 3 (0011): process + container\n\t// 5 (0010): process + command\n\t// 6 (0110): container + command\n\t// 7 (0111): process + container + command\n\t//\n\tNone      PcapType = 0x0\n\tProcess   PcapType = 0x1\n\tContainer PcapType = 0x2\n\tCommand   PcapType = 0x4\n\tSingle    PcapType = 0x8\n)\n```\n\n```go\nfunc (t *PcapType) String() string\n```\n\n```go\ntype Pcaps struct {\n\t// contains filtered or unexported fields\n}\n```\nPcaps holds all Pcap for different PcapTypes\n\n```go\nfunc New(simple Config, output *os.File) (*Pcaps, error)\n```\n\n```go\nfunc (p *Pcaps) Destroy() error\n```\nDestroy destroys all opened pcap files from all supported pcap types\n\n```go\nfunc (p *Pcaps) Write(event *trace.Event, payload []byte) error\n```\nWrite writes a packet to all opened pcap files from all supported pcap types\n\n","path":"github.com/nextlinux/tracee/pkg/pcaps","name":"pcaps","synopsis":"","isRedistributable":true}
