[LICCPA] Fix translation and align dialog controls
[reactos.git] / drivers / network / tcpip / include / ports.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS TCP/IP protocol driver
4 * FILE: include/ports.h
5 * PURPOSE: Port allocation
6 * PROGRAMMERS: arty (ayerkes@speakeasy.net)
7 * REVISIONS:
8 * arty 20041114 Created
9 */
10
11 #pragma once
12
13 typedef struct _PORT_SET {
14 RTL_BITMAP ProtoBitmap;
15 PVOID ProtoBitBuffer;
16 UINT StartingPort;
17 UINT PortsToOversee;
18 KSPIN_LOCK Lock;
19 } PORT_SET, *PPORT_SET;
20
21 NTSTATUS PortsStartup( PPORT_SET PortSet,
22 UINT StartingPort,
23 UINT PortsToManage );
24 VOID PortsShutdown( PPORT_SET PortSet );
25 VOID DeallocatePort( PPORT_SET PortSet, ULONG Port );
26 BOOLEAN AllocatePort( PPORT_SET PortSet, ULONG Port );
27 ULONG AllocateAnyPort( PPORT_SET PortSet );
28 ULONG AllocatePortFromRange( PPORT_SET PortSet, ULONG Lowest, ULONG Highest );