cmd

package
v0.0.0-202406181927 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0, MIT Imports: 19 Imported by: 0

Documentation

Overview

Package cmd implements the subcommands of xdp_loader.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RedirectLinkPath

func RedirectLinkPath(iface string) string

RedirectLinkPath returns the path where the eBPF link will be pinned when xdp_loader is run against iface.

func RedirectMapPath

func RedirectMapPath(iface string) string

RedirectMapPath returns the path where the eBPF map will be pinned when xdp_loader is run against iface.

func RedirectPinDir

func RedirectPinDir(iface string) string

RedirectPinDir returns the directory to which eBPF objects will be pinned when xdp_loader is run against iface.

func RedirectProgramPath

func RedirectProgramPath(iface string) string

RedirectProgramPath returns the path where the eBPF program will be pinned when xdp_loader is run against iface.

func TunnelHostLinkPath

func TunnelHostLinkPath(iface string) string

TunnelHostLinkPath returns the path where the eBPF link will be pinned when xdp_loader is run against iface.

func TunnelHostMapPath

func TunnelHostMapPath(iface string) string

TunnelHostMapPath returns the path where the eBPF map will be pinned when xdp_loader is run against iface.

func TunnelHostProgramPath

func TunnelHostProgramPath(iface string) string

TunnelHostProgramPath returns the path where the eBPF program will be pinned when xdp_loader is run against iface.

func TunnelPinDir

func TunnelPinDir(iface string) string

TunnelPinDir returns the directory to which eBPF objects will be pinned when xdp_loader is run against iface.

func TunnelVethLinkPath

func TunnelVethLinkPath(iface string) string

TunnelVethLinkPath returns the path where the eBPF link should be pinned when xdp_loader is run against iface.

func TunnelVethMapPath

func TunnelVethMapPath(iface string) string

TunnelVethMapPath returns the path where the eBPF map should be pinned when xdp_loader is run against iface.

func TunnelVethProgramPath

func TunnelVethProgramPath(iface string) string

TunnelVethProgramPath returns the path where the eBPF program should be pinned when xdp_loader is run against iface.

Types

type DropCommand

type DropCommand struct {
	// contains filtered or unexported fields
}

DropCommand is a subcommand for dropping packets.

func (*DropCommand) Execute

Execute implements subcommands.Command.Execute.

func (*DropCommand) Name

func (*DropCommand) Name() string

Name implements subcommands.Command.Name.

func (*DropCommand) SetFlags

func (pc *DropCommand) SetFlags(fs *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*DropCommand) Synopsis

func (*DropCommand) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*DropCommand) Usage

func (*DropCommand) Usage() string

Usage implements subcommands.Command.Usage.

type PassCommand

type PassCommand struct {
	// contains filtered or unexported fields
}

PassCommand is a subcommand for passing packets to the kernel network stack.

func (*PassCommand) Execute

Execute implements subcommands.Command.Execute.

func (*PassCommand) Name

func (*PassCommand) Name() string

Name implements subcommands.Command.Name.

func (*PassCommand) SetFlags

func (pc *PassCommand) SetFlags(fs *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*PassCommand) Synopsis

func (*PassCommand) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*PassCommand) Usage

func (*PassCommand) Usage() string

Usage implements subcommands.Command.Usage.

type RedirectHostCommand

type RedirectHostCommand struct {
	// contains filtered or unexported fields
}

RedirectHostCommand is a subcommand for redirecting incoming packets based on a pinned eBPF map. It redirects all non-SSH traffic to a single AF_XDP socket.

func (*RedirectHostCommand) Execute

Execute implements subcommands.Command.Execute.

func (*RedirectHostCommand) Name

func (*RedirectHostCommand) Name() string

Name implements subcommands.Command.Name.

func (*RedirectHostCommand) SetFlags

func (rc *RedirectHostCommand) SetFlags(fs *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*RedirectHostCommand) Synopsis

func (*RedirectHostCommand) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*RedirectHostCommand) Usage

func (*RedirectHostCommand) Usage() string

Usage implements subcommands.Command.Usage.

type TcpdumpCommand

type TcpdumpCommand struct {
	// contains filtered or unexported fields
}

TcpdumpCommand is a subcommand for capturing incoming packets.

func (*TcpdumpCommand) Execute

Execute implements subcommands.Command.Execute.

func (*TcpdumpCommand) Name

func (*TcpdumpCommand) Name() string

Name implements subcommands.Command.Name.

func (*TcpdumpCommand) SetFlags

func (pc *TcpdumpCommand) SetFlags(fs *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*TcpdumpCommand) Synopsis

func (*TcpdumpCommand) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*TcpdumpCommand) Usage

func (*TcpdumpCommand) Usage() string

Usage implements subcommands.Command.Usage.

type TunnelCommand

type TunnelCommand struct {
	// contains filtered or unexported fields
}

TunnelCommand is a subcommand for tunneling traffic between two NICs. It is intended as a fast path between the host NIC and the veth of a container.

SSH traffic is not tunneled. It is passed through to the Linux network stack.

func (*TunnelCommand) Execute

Execute implements subcommands.Command.Execute.

func (*TunnelCommand) Name

func (*TunnelCommand) Name() string

Name implements subcommands.Command.Name.

func (*TunnelCommand) SetFlags

func (tn *TunnelCommand) SetFlags(fs *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*TunnelCommand) Synopsis

func (*TunnelCommand) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*TunnelCommand) Usage

func (*TunnelCommand) Usage() string

Usage implements subcommands.Command.Usage.

Jump to

Keyboard shortcuts

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