2004-11-14 19:45:16 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS TCP/IP protocol driver
|
|
|
|
* FILE: include/ports.h
|
|
|
|
* PURPOSE: Port allocation
|
|
|
|
* PROGRAMMERS: arty (ayerkes@speakeasy.net)
|
|
|
|
* REVISIONS:
|
|
|
|
* arty 20041114 Created
|
|
|
|
*/
|
|
|
|
|
2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
|
|
|
|
2004-11-14 19:45:16 +00:00
|
|
|
typedef struct _PORT_SET {
|
|
|
|
RTL_BITMAP ProtoBitmap;
|
|
|
|
PVOID ProtoBitBuffer;
|
|
|
|
UINT StartingPort;
|
|
|
|
UINT PortsToOversee;
|
2010-01-08 18:21:52 +00:00
|
|
|
KSPIN_LOCK Lock;
|
2004-11-14 19:45:16 +00:00
|
|
|
} PORT_SET, *PPORT_SET;
|
|
|
|
|
2008-09-06 22:21:56 +00:00
|
|
|
NTSTATUS PortsStartup( PPORT_SET PortSet,
|
|
|
|
UINT StartingPort,
|
|
|
|
UINT PortsToManage );
|
2004-11-14 19:45:16 +00:00
|
|
|
VOID PortsShutdown( PPORT_SET PortSet );
|
|
|
|
VOID DeallocatePort( PPORT_SET PortSet, ULONG Port );
|
|
|
|
BOOLEAN AllocatePort( PPORT_SET PortSet, ULONG Port );
|
|
|
|
ULONG AllocateAnyPort( PPORT_SET PortSet );
|
2004-12-11 16:36:06 +00:00
|
|
|
ULONG AllocatePortFromRange( PPORT_SET PortSet, ULONG Lowest, ULONG Highest );
|