/**
 * Port allocation info
 */
export interface PortAllocation {
    /** The logical port (USB hub position) */
    logicalPort: number;
    /** The allocated local port for forwarding */
    localPort: number;
    /** The device port being forwarded to */
    devicePort: number;
}
/**
 * Manages port allocation for device forwarding.
 * Ensures each logical port gets a unique, available local port.
 */
export declare class PortManager {
    private allocations;
    private readonly basePort;
    private readonly maxPortRange;
    /**
     * Create a new PortManager
     *
     * @param basePort Starting port number for allocation (default: 30000)
     * @param maxPortRange Maximum range of ports to search (default: 1000)
     */
    constructor(basePort?: number, maxPortRange?: number);
    /**
     * Find an available port starting from the given port number
     */
    private findAvailablePort;
    /**
     * Check if a port is available for binding
     */
    private isPortAvailable;
    /**
     * Allocate a local port for a logical port
     *
     * @param logicalPort The logical port number (USB hub position)
     * @param devicePort The device port to forward to
     * @returns The allocated port info
     */
    allocate(logicalPort: number, devicePort: number): Promise<PortAllocation>;
    /**
     * Release the port allocation for a logical port
     */
    release(logicalPort: number): void;
    /**
     * Get the current allocation for a logical port
     */
    getAllocation(logicalPort: number): PortAllocation | undefined;
    /**
     * Get all current allocations
     */
    getAllAllocations(): PortAllocation[];
    /**
     * Release all allocations
     */
    releaseAll(): void;
    /**
     * Check if a logical port has an allocation
     */
    hasAllocation(logicalPort: number): boolean;
}
/**
 * Get the shared port manager instance
 */
export declare function getSharedPortManager(): PortManager;
//# sourceMappingURL=portManager.d.ts.map