Documentation ¶
Overview ¶
Package cmd implements the subcommands of xdp_loader.
Index ¶
- func RedirectLinkPath(iface string) string
- func RedirectMapPath(iface string) string
- func RedirectPinDir(iface string) string
- func RedirectProgramPath(iface string) string
- func TunnelHostLinkPath(iface string) string
- func TunnelHostMapPath(iface string) string
- func TunnelHostProgramPath(iface string) string
- func TunnelPinDir(iface string) string
- func TunnelVethLinkPath(iface string) string
- func TunnelVethMapPath(iface string) string
- func TunnelVethProgramPath(iface string) string
- type DropCommand
- type PassCommand
- type RedirectHostCommand
- type TcpdumpCommand
- type TunnelCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RedirectLinkPath ¶
RedirectLinkPath returns the path where the eBPF link will be pinned when xdp_loader is run against iface.
func RedirectMapPath ¶
RedirectMapPath returns the path where the eBPF map will be pinned when xdp_loader is run against iface.
func RedirectPinDir ¶
RedirectPinDir returns the directory to which eBPF objects will be pinned when xdp_loader is run against iface.
func RedirectProgramPath ¶
RedirectProgramPath returns the path where the eBPF program will be pinned when xdp_loader is run against iface.
func TunnelHostLinkPath ¶
TunnelHostLinkPath returns the path where the eBPF link will be pinned when xdp_loader is run against iface.
func TunnelHostMapPath ¶
TunnelHostMapPath returns the path where the eBPF map will be pinned when xdp_loader is run against iface.
func TunnelHostProgramPath ¶
TunnelHostProgramPath returns the path where the eBPF program will be pinned when xdp_loader is run against iface.
func TunnelPinDir ¶
TunnelPinDir returns the directory to which eBPF objects will be pinned when xdp_loader is run against iface.
func TunnelVethLinkPath ¶
TunnelVethLinkPath returns the path where the eBPF link should be pinned when xdp_loader is run against iface.
func TunnelVethMapPath ¶
TunnelVethMapPath returns the path where the eBPF map should be pinned when xdp_loader is run against iface.
func TunnelVethProgramPath ¶
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 ¶
func (pc *DropCommand) Execute(context.Context, *flag.FlagSet, ...any) subcommands.ExitStatus
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 ¶
func (pc *PassCommand) Execute(context.Context, *flag.FlagSet, ...any) subcommands.ExitStatus
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 ¶
func (rc *RedirectHostCommand) Execute(context.Context, *flag.FlagSet, ...any) subcommands.ExitStatus
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 ¶
func (pc *TcpdumpCommand) Execute(context.Context, *flag.FlagSet, ...any) subcommands.ExitStatus
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 ¶
func (tn *TunnelCommand) Execute(context.Context, *flag.FlagSet, ...any) subcommands.ExitStatus
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.