pcap

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

* Copyright (c) 2022 Manabu Sonoda * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

View Source
const DNSPort uint32 = 53

Variables

This section is empty.

Functions

func Setup

func Setup(bs json.RawMessage) (types.InputPlugin, error)

Types

type PCAP

type PCAP struct {
	plugin.PluginCommon

	// Device is the network interface to capture packets from.
	Device string

	// BPF is the Berkeley Packet Filter expression to filter packets.
	BPF string

	// Direction specifies the packet direction to capture: `in`, `out`, or `inout`.
	Direction string

	// Enable or disable processing of resolver queries.
	ResolverQueryEnabled bool

	// Enable or disable processing of resolver responses.
	ResolverResponseEnabled bool

	// Enable or disable processing of client queries.
	ClientQueryEnabled bool

	// Enable or disable processing of client responses.
	ClientResponseEnabled bool

	// WorkerNum specifies the number of workers to process packets concurrently.
	// The default value is 1.
	WorkerNum int64
	// contains filtered or unexported fields
}

The UnixSocket plugin get messages from the unix socket.

func (*PCAP) Start

func (p *PCAP) Start(ctx context.Context, ic *types.InputContext) error

Jump to

Keyboard shortcuts

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