//go:build !linux
// +build !linux

package io

import (
	"context"
	"errors"
	"net"
)

var errNFQueueUnsupported = errors.New("nfqueue packet io is only supported on linux")

type NFQueuePacketIOConfig struct {
	QueueSize    uint32
	ReadBuffer   int
	WriteBuffer  int
	Local        bool
	RST          bool
	NumQueues    int
	MaxPacketLen uint32
}

func NewNFQueuePacketIO(config NFQueuePacketIOConfig) (PacketIO, error) {
	_ = config
	return nil, errNFQueueUnsupported
}

func (*unsupportedPacketIO) Register(context.Context, PacketCallback) error {
	return errNFQueueUnsupported
}

func (*unsupportedPacketIO) SetVerdict(Packet, Verdict, []byte) error {
	return errNFQueueUnsupported
}

func (*unsupportedPacketIO) ProtectedDialContext(context.Context, string, string) (net.Conn, error) {
	return nil, errNFQueueUnsupported
}

func (*unsupportedPacketIO) Close() error { return nil }

type unsupportedPacketIO struct{}
