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