setup

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package setup provides cross-platform detection and installation of Wireshark CLI tools (tshark, capinfos, editcap, mergecap).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(ctx context.Context, logger *slog.Logger) error

Install attempts to install Wireshark/tshark for the current platform.

func InstallNpcap added in v1.2.0

func InstallNpcap(ctx context.Context, logger *slog.Logger) error

InstallNpcap downloads and installs Npcap on Windows.

func NpcapInstructions added in v1.2.0

func NpcapInstructions() string

NpcapInstructions returns manual install instructions for Npcap.

func PrintInstructions

func PrintInstructions() string

PrintInstructions prints manual installation instructions for the current platform.

Types

type Status

type Status struct {
	Installed      bool
	TSharkPath     string
	Version        string
	CapinfosPath   string
	EditcapPath    string
	MergecapPath   string
	NpcapInstalled bool // Windows only: whether Npcap is installed for live capture
}

Status describes the current tshark installation state.

func Check

func Check(logger *slog.Logger) *Status

Check detects whether tshark and related tools are installed.

Jump to

Keyboard shortcuts

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