/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Bytes } from "#util/Bytes.js";
export interface MockRouter extends MockRouter.Route {
    intercept(route: MockRouter.Interceptor): void;
    add(route: MockRouter.Route): void;
    delete(route: MockRouter.Route): void;
}
export declare function MockRouter(): MockRouter;
export declare namespace MockRouter {
    /**
     * A mock network packet.
     */
    type Packet = UdpPacket | TcpPacket;
    interface UdpPacket {
        kind: "udp";
        sourceAddress: string;
        sourcePort: number;
        destAddress: string;
        destPort: number;
        payload: Bytes;
    }
    interface TcpPacket {
        kind: "tcp";
        sourceAddress: string;
        sourcePort: number;
        destAddress: string;
        destPort: number;
        payload: Bytes;
    }
    /**
     * A route.
     *
     * Takes a packet and does something with it.
     */
    interface Route {
        (packet: Packet): void;
    }
    /**
     * A route wrapper.
     *
     * Takes a packet and a route.  Does something with {@link packet}, optionally passing along to {@link route} to
     * allow normal routing to proceed.
     */
    interface Interceptor {
        (packet: Packet, route: Route): void;
    }
}
//# sourceMappingURL=MockRouter.d.ts.map