2000-08-02 00:24:26 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS TCP/IP protocol driver
|
|
|
|
* FILE: include/address.h
|
|
|
|
* PURPOSE: Address manipulation prototypes
|
|
|
|
*/
|
2010-02-26 11:43:19 +00:00
|
|
|
|
|
|
|
#pragma once
|
2000-08-02 00:24:26 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Initialize an IPv4 style address
|
|
|
|
* VOID AddrInitIPv4(
|
|
|
|
* PIP_ADDRESS IPAddress,
|
|
|
|
* IPv4_RAW_ADDRESS RawAddress)
|
|
|
|
*/
|
|
|
|
#define AddrInitIPv4(IPAddress, RawAddress) \
|
|
|
|
{ \
|
|
|
|
(IPAddress)->Type = IP_ADDRESS_V4; \
|
|
|
|
(IPAddress)->Address.IPv4Address = (RawAddress); \
|
|
|
|
}
|
|
|
|
|
2009-06-17 12:44:05 +00:00
|
|
|
#if DBG
|
2001-05-01 22:34:01 +00:00
|
|
|
|
|
|
|
PCHAR A2S(
|
|
|
|
PIP_ADDRESS Address);
|
|
|
|
|
|
|
|
#endif /* DBG */
|
2000-08-02 00:24:26 +00:00
|
|
|
|
2001-07-04 20:40:24 +00:00
|
|
|
VOID IPAddressFree(
|
|
|
|
PVOID Object);
|
|
|
|
|
2000-08-02 00:24:26 +00:00
|
|
|
BOOLEAN AddrIsUnspecified(
|
|
|
|
PIP_ADDRESS Address);
|
|
|
|
|
|
|
|
NTSTATUS AddrGetAddress(
|
|
|
|
PTRANSPORT_ADDRESS AddrList,
|
2004-08-19 21:39:00 +00:00
|
|
|
PIP_ADDRESS Address,
|
|
|
|
PUSHORT Port);
|
2000-08-02 00:24:26 +00:00
|
|
|
|
2001-07-04 20:40:24 +00:00
|
|
|
NTSTATUS AddrBuildAddress(
|
2004-10-03 21:44:43 +00:00
|
|
|
PTRANSPORT_ADDRESS TdiAddress,
|
2004-11-30 00:10:41 +00:00
|
|
|
PIP_ADDRESS Address,
|
2001-07-04 20:40:24 +00:00
|
|
|
PUSHORT Port);
|
|
|
|
|
2000-08-02 00:24:26 +00:00
|
|
|
BOOLEAN AddrIsEqual(
|
|
|
|
PIP_ADDRESS Address1,
|
|
|
|
PIP_ADDRESS Address2);
|
|
|
|
|
|
|
|
INT AddrCompare(
|
|
|
|
PIP_ADDRESS Address1,
|
|
|
|
PIP_ADDRESS Address2);
|
|
|
|
|
|
|
|
BOOLEAN AddrIsEqualIPv4(
|
|
|
|
PIP_ADDRESS Address1,
|
|
|
|
IPv4_RAW_ADDRESS Address2);
|
|
|
|
|
2009-08-20 17:25:39 +00:00
|
|
|
PIP_INTERFACE AddrLocateInterface(
|
|
|
|
PIP_ADDRESS MatchAddress);
|
2000-08-02 00:24:26 +00:00
|
|
|
|
|
|
|
PADDRESS_FILE AddrSearchFirst(
|
|
|
|
PIP_ADDRESS Address,
|
|
|
|
USHORT Port,
|
|
|
|
USHORT Protocol,
|
|
|
|
PAF_SEARCH SearchContext);
|
|
|
|
|
|
|
|
PADDRESS_FILE AddrSearchNext(
|
|
|
|
PAF_SEARCH SearchContext);
|
|
|
|
|
2008-11-27 15:02:47 +00:00
|
|
|
unsigned long NTAPI inet_addr(const char*);
|
2003-12-17 23:34:35 +00:00
|
|
|
|
2004-03-12 04:21:59 +00:00
|
|
|
ULONG IPv4NToHl( ULONG Address );
|
|
|
|
|
|
|
|
UINT AddrCountPrefixBits( PIP_ADDRESS Netmask );
|
|
|
|
|
2004-11-26 06:55:17 +00:00
|
|
|
VOID AddrWidenAddress( PIP_ADDRESS Network, PIP_ADDRESS Source,
|
|
|
|
PIP_ADDRESS Netmask );
|
|
|
|
|
2000-08-02 00:24:26 +00:00
|
|
|
/* EOF */
|