/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterError } from "../MatterError.js";
import type { MaybePromise } from "../util/Promises.js";
import type { TcpConnection, TcpListener, TcpListenerOptions } from "./tcp/TcpConnection.js";
import type { UdpSocket, UdpSocketOptions } from "./udp/UdpSocket.js";
export declare class NetworkError extends MatterError {
}
export declare class NoAddressAvailableError extends NetworkError {
}
export declare class BindError extends NetworkError {
}
export declare class AddressInUseError extends BindError {
}
export declare class AddressUnreachableError extends NetworkError {
}
export declare class NetworkUnreachableError extends NetworkError {
}
export declare const STANDARD_MATTER_PORT = 5540;
/**
 * @see {@link MatterSpecification.v11.Core} § 11.11.4.4
 * Duplicated from the GeneralDiagnostics cluster to avoid circular dependencies.
 */
export declare enum InterfaceType {
    /**
     * Indicates an interface of an unspecified type.
     */
    Unspecified = 0,
    /**
     * Indicates a Wi-Fi interface.
     */
    WiFi = 1,
    /**
     * Indicates a Ethernet interface.
     */
    Ethernet = 2,
    /**
     * Indicates a Cellular interface.
     */
    Cellular = 3,
    /**
     * Indicates a Thread interface.
     */
    Thread = 4
}
export type NetworkInterface = {
    name: string;
    type?: InterfaceType;
};
export type NetworkInterfaceDetails = {
    mac: string;
    ipV4: string[];
    ipV6: string[];
};
export type NetworkInterfaceDetailed = NetworkInterface & NetworkInterfaceDetails;
export declare abstract class Network {
    abstract getNetInterfaces(configuration?: NetworkInterface[]): MaybePromise<NetworkInterface[]>;
    abstract getIpMac(netInterface: string): MaybePromise<NetworkInterfaceDetails | undefined>;
    abstract createUdpSocket(options: UdpSocketOptions): Promise<UdpSocket>;
    /** Create a TCP server socket. Override in platform implementations that support TCP. */
    createTcpListener(_options: TcpListenerOptions): Promise<TcpListener>;
    /** Connect to a remote TCP endpoint. Override in platform implementations that support TCP. */
    connectTcp(_host: string, _port: number, _options?: {
        timeout?: number;
    }): Promise<TcpConnection>;
    close(): Promise<void>;
}
//# sourceMappingURL=Network.d.ts.map