Go to the source code of this file.
|
VOID | IPAddressFree (PVOID Object) |
|
BOOLEAN | AddrIsUnspecified (PIP_ADDRESS Address) |
|
NTSTATUS | AddrGetAddress (PTRANSPORT_ADDRESS AddrList, PIP_ADDRESS Address, PUSHORT Port) |
|
NTSTATUS | AddrBuildAddress (PTRANSPORT_ADDRESS TdiAddress, PIP_ADDRESS Address, PUSHORT Port) |
|
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) |
|
PIP_INTERFACE | AddrLocateInterface (PIP_ADDRESS MatchAddress) |
|
PADDRESS_FILE | AddrSearchFirst (PIP_ADDRESS Address, USHORT Port, USHORT Protocol, PAF_SEARCH SearchContext) |
|
PADDRESS_FILE | AddrSearchNext (PAF_SEARCH SearchContext) |
|
unsigned long NTAPI | inet_addr (const char *) |
|
ULONG | IPv4NToHl (ULONG Address) |
|
UINT | AddrCountPrefixBits (PIP_ADDRESS Netmask) |
|
VOID | AddrWidenAddress (PIP_ADDRESS Network, PIP_ADDRESS Source, PIP_ADDRESS Netmask) |
|
◆ AddrInitIPv4
#define AddrInitIPv4 |
( |
|
IPAddress, |
|
|
|
RawAddress |
|
) |
| |
Value:{ \
(IPAddress)->
Address.IPv4Address = (RawAddress); \
}
Definition at line 16 of file address.h.
◆ AddrBuildAddress()
Definition at line 184 of file address.c.
188{
191
196 }
199 (
MID_TRACE,(
"AddressLength %x, Not valid (expected %x)\n",
202 }
203
204
206
209
211}
#define AddrInitIPv4(IPAddress, RawAddress)
#define TI_DbgPrint(_t_, _x_)
#define STATUS_INVALID_ADDRESS
struct _TDI_ADDRESS_IP * PTDI_ADDRESS_IP
#define TDI_ADDRESS_LENGTH_IP
#define TDI_ADDRESS_TYPE_IP
Referenced by TCPConnect().
◆ AddrCompare()
Definition at line 257 of file address.c.
260{
261 switch (Address1->
Type) {
267 if (Addr1 < Addr2)
268 return -1;
269 else
270 if (Addr1 == Addr2)
271 return 0;
272 else
273 return 1;
274 } else
275
276 return -1;
277
279
280 break;
281 }
282 }
283
285}
union IP_ADDRESS::@1014 Address
IPv4_RAW_ADDRESS IPv4Address
◆ AddrCountPrefixBits()
◆ AddrGetAddress()
Definition at line 146 of file address.c.
150{
153
154
156
161
168 }
169 }
170 }
171
173}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Referenced by DGReceiveDatagram().
◆ AddrIsEqual()
Definition at line 221 of file address.c.
224{
225 if (Address1->
Type != Address2->
Type) {
226 DbgPrint(
"AddrIsEqual: Unequal Address Types\n");
228 }
229
230 switch (Address1->
Type) {
233
237 break;
238
239 default:
240 DbgPrint(
"AddrIsEqual: Bad address type\n");
241 break;
242 }
243
245}
USHORT IPv6_RAW_ADDRESS[8]
#define RtlCompareMemory(s1, s2, l)
Referenced by AddrIsBroadcastMatch(), AddrLocateInterface(), AddrReceiveMatch(), ARPReceive(), DGDeliverData(), GetReassemblyInfo(), NBCopyNeighbors(), NBFindOrCreateNeighbor(), NBLocateNeighbor(), NBResetNeighborTimeout(), RouterCreateRoute(), and RouterRemoveRoute().
◆ AddrIsEqualIPv4()
◆ AddrIsUnspecified()
Definition at line 113 of file address.c.
122{
125 return (
Address->Address.IPv4Address == 0 ||
126 Address->Address.IPv4Address == 0xFFFFFFFF);
127
129
130 default:
132 }
133}
Referenced by AddrIsBroadcastMatch(), AddrReceiveMatch(), DGDeliverData(), DispTdiQueryIpHwAddress(), FileOpenAddress(), FindOnLinkInterface(), GetDefaultInterface(), NBFindOrCreateNeighbor(), RawIPSendDatagram(), ReadIpConfiguration(), TCPConnect(), and UDPSendDatagram().
◆ AddrLocateInterface()
Definition at line 89 of file interface.c.
91{
95
97
99 if(
AddrIsEqual( &CurrentIF->Unicast, MatchAddress ) ||
100 AddrIsEqual( &CurrentIF->Broadcast, MatchAddress ) ) {
101 RetIF = CurrentIF;
102 break;
103 }
105
107
108 return RetIF;
109}
BOOLEAN AddrIsEqual(PIP_ADDRESS Address1, PIP_ADDRESS Address2)
KSPIN_LOCK InterfaceListLock
VOID TcpipReleaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL Irql)
VOID TcpipAcquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL Irql)
#define ForEachInterface(n)
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Referenced by DispTdiQueryIpHwAddress(), and FileOpenAddress().
◆ AddrSearchFirst()
Definition at line 38 of file fileobjs.c.
43{
45
49
51
53
56
58
60}
#define IsListEmpty(ListHead)
KSPIN_LOCK AddressFileListLock
PADDRESS_FILE AddrSearchNext(PAF_SEARCH SearchContext)
LIST_ENTRY AddressFileListHead
struct _LIST_ENTRY * Flink
#define ReferenceObject(Object)
#define CONTAINING_RECORD(address, type, field)
Referenced by RawIpReceive(), and UDPReceive().
◆ AddrSearchNext()
Definition at line 231 of file fileobjs.c.
233{
240
242
244 {
247 }
248
249
251
252 CurrentEntry = SearchContext->
Next;
253
256
258
266
267
268 if ((Current->
Port == SearchContext->
Port) &&
271
273 break;
274 }
275 CurrentEntry = CurrentEntry->
Flink;
276 }
277
279 {
280 SearchContext->
Next = CurrentEntry->
Flink;
281
283 {
284
286 }
287
288
289
291 }
292 else
294
296
298
299 return Current;
300}
PCHAR A2S(PIP_ADDRESS Address)
BOOLEAN AddrReceiveMatch(PIP_ADDRESS LocalAddress, PIP_ADDRESS RemoteAddress)
#define DereferenceObject(Object)
Referenced by AddrSearchFirst(), RawIpReceive(), and UDPReceive().
◆ AddrWidenAddress()
◆ inet_addr()
Definition at line 307 of file address.c.
315{
316 ULONG Octets[4] = {0,0,0,0};
318
319 if(!AddrString)
320 return -1;
321
322 while(*AddrString)
323 {
324 CHAR c = *AddrString;
325 AddrString++;
326
328 {
330 continue;
331 }
332
333 if(
c <
'0' ||
c >
'9')
334 return -1;
335
337 Octets[
i] += (
c -
'0');
338
340 return -1;
341 }
342
343 return (Octets[3] << 24) + (Octets[2] << 16) + (Octets[1] << 8) + Octets[0];
344}
◆ IPAddressFree()
Definition at line 99 of file address.c.
108{
110}
#define ExFreePoolWithTag(_P, _T)
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
◆ IPv4NToHl()