import type { NobjcObject } from "objc-js";
import type { _NEPacketTunnelFlow } from "./NEPacketTunnelFlow.js";
import type { _NETunnelProvider } from "./NETunnelProvider.js";
import type { _NWEndpoint } from "./NWEndpoint.js";
import type { _NWHostEndpoint } from "./NWHostEndpoint.js";
import type { _NWTCPConnection } from "./NWTCPConnection.js";
import type { _NWTLSParameters } from "./NWTLSParameters.js";
import type { _NWUDPSession } from "./NWUDPSession.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { NEProviderStopReason } from "./NEProviderStopReason.js";
export declare class _NEPacketTunnelProvider extends _NETunnelProvider {
    static alloc(): _NEPacketTunnelProvider;
    static new(): _NEPacketTunnelProvider;
    init(): _NEPacketTunnelProvider;
    /**
     * This function is called by the framework when a new tunnel is being created. Subclasses must override this method to perform whatever steps are necessary to establish the tunnel. A dictionary containing keys and values passed by the provider's containing app. If the containing app did not start the tunnel then this parameter will be nil. A block that must be called when the process of starting the tunnel is complete. If the tunnel cannot be established then the subclass' implementation of this method must pass a non-nil NSError object to this block. A value of nil passed to the completion handler indicates that the tunnel was successfully established.
     */
    startTunnelWithOptions$completionHandler$(options: _NSDictionary | null, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * This function is called by the framework when the tunnel is being destroyed. Subclasses must override this method to perform whatever steps are necessary to tear down the tunnel. An NEProviderStopReason indicating why the tunnel is being stopped. A block that must be called when the tunnel is completely torn down.
     */
    stopTunnelWithReason$completionHandler$(reason: NEProviderStopReason, completionHandler: () => void): void;
    /**
     * This function is called by tunnel provider implementations to initiate tunnel destruction when a network error is encountered that renders the tunnel no longer viable. Subclasses should not override this method. An NSError object containing details about the error that the tunnel provider implementation encountered.
     */
    cancelTunnelWithError$(error: _NSError | null): void;
    /**
     * This function can be called by subclass implementations to create a TCP connection to a given network endpoint, through the tunnel established by the provider. This function should not be overridden by subclasses. An NWEndpoint object that specifies the remote network endpoint to connect to. A flag indicating if a TLS session should be negotiated on the connection. A set of optional TLS parameters. Only valid if enableTLS is YES. If TLSParameters is nil, the default system parameters will be used for TLS negotiation. An object to use as the connection delegate. This object should conform to the NWTCPConnectionAuthenticationDelegate protocol. An NWTCPConnection object.
     * @deprecated Use the `virtualInterface` property with `nw_parameters_require_interface`
     */
    createTCPConnectionThroughTunnelToEndpoint$enableTLS$TLSParameters$delegate$(remoteEndpoint: _NWEndpoint, enableTLS: boolean, TLSParameters: _NWTLSParameters | null, delegate: NobjcObject | null): _NWTCPConnection;
    /**
     * This function can be called by subclass implementations to create a UDP session between a local network endpoint and a remote network endpoint, through the tunnel established by the provider. This function should not be overridden by subclasses. An NWEndpoint object that specifies the remote endpoint to which UDP datagrams will be sent by the UDP session. An NWHostEndpoint object that specifies the local IP address endpoint to use as the source endpoint of the UDP session. An NWUDPSession object.
     * @deprecated Use the `virtualInterface` property with `nw_parameters_require_interface`
     */
    createUDPSessionThroughTunnelToEndpoint$fromEndpoint$(remoteEndpoint: _NWEndpoint, localEndpoint: _NWHostEndpoint | null): _NWUDPSession;
    /**
     * An NEPacketFlow object that the tunnel provider implementation should use to receive packets from the network stack and inject packets into the network stack. Every time the tunnel is started the packet flow object is in an initialized state and must be explicitly opened before any packets can be received or injected.
     */
    packetFlow(): _NEPacketTunnelFlow;
    /**
     * The virtual network interface used to route packets to the packet tunnel provider. For NEPacketTunnelProvider sub-classes, this property will be non-nil when `-[NEPacketTunnelProvider startTunnelWithOptions:completionHandler:]` is called. For NEEthernetTunnelProvider sub-classes, this property will be non-nil when the completion handler passed to `-[NETunnelProvider setTunnelNetworkSettings:completionHandler:]` is executed. To create a connection through the tunnel, pass this interface to `nw_parameters_require_interface`.
     */
    virtualInterface(): _NSObject;
}
