#include <pshpack1.h>
#include <poppack.h>
Go to the source code of this file.
◆ UDP_DYNAMIC_PORTS
#define UDP_DYNAMIC_PORTS 0x8000 |
Definition at line 11 of file udp.h.
◆ UDP_STARTING_PORT
#define UDP_STARTING_PORT 0x8000 |
Definition at line 10 of file udp.h.
◆ PUDP_HEADER
◆ PUDP_PSEUDO_HEADER
◆ PUDP_STATISTICS
◆ UDP_HEADER
◆ UDP_PSEUDO_HEADER
◆ UDP_STATISTICS
◆ UDPAllocatePort()
Definition at line 382 of file udp.c.
382 {
383 if( HintPort ) {
385 else return (
UINT)-1;
389}
BOOLEAN AllocatePort(PPORT_SET PortSet, ULONG Port)
ULONG AllocatePortFromRange(PPORT_SET PortSet, ULONG Lowest, ULONG Highest)
#define UDP_STARTING_PORT
#define UDP_DYNAMIC_PORTS
Referenced by FileOpenAddress().
◆ UDPFreePort()
Definition at line 391 of file udp.c.
391 {
393}
VOID DeallocatePort(PPORT_SET PortSet, ULONG Port)
Referenced by AddrFileFree().
◆ UDPReceive()
Definition at line 240 of file udp.c.
250{
257
259
260 switch (IPPacket->
Type) {
261
264 DstAddress = &IPPacket->
DstAddr;
265 SrcAddress = &IPPacket->
SrcAddr;
266 break;
267
268
271
272
273 return;
274
275 default:
276 return;
277 }
278
280
281
286 {
288 return;
289 }
290
291
294
296 return;
297 }
298
300
301
303
304
305
306
307
308
312 &SearchContext);
313 if (AddrFile) {
314 do {
316 SrcAddress,
317 DstAddress,
320 IPPacket,
324 } else {
325
326
329
330
331 }
333}
PADDRESS_FILE AddrSearchFirst(PIP_ADDRESS Address, USHORT Port, USHORT Protocol, PAF_SEARCH SearchContext)
PADDRESS_FILE AddrSearchNext(PAF_SEARCH SearchContext)
ULONG UDPv4ChecksumCalculate(PIPv4_HEADER IPHeader, PUCHAR PacketBuffer, ULONG DataLength)
VOID DGDeliverData(PADDRESS_FILE AddrFile, PIP_ADDRESS SrcAddress, PIP_ADDRESS DstAddress, USHORT SrcPort, USHORT DstPort, PIP_PACKET IPPacket, UINT DataSize)
#define TI_DbgPrint(_t_, _x_)
struct _tagUDPHeader UDPHeader
struct _tagIPv4Header IPv4Header
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
struct UDP_HEADER * PUDP_HEADER
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
union IP_ADDRESS::@1014 Address
IPv4_RAW_ADDRESS IPv4Address
#define DereferenceObject(Object)
Referenced by UDPStartup().
◆ UDPSend()
◆ UDPSendDatagram()
Definition at line 150 of file udp.c.
166{
174
176
178 AddrFile, ConnInfo, BufferData,
DataSize));
180
181 switch( RemoteAddressTa->
Address[0].AddressType ) {
185 RemoteAddressTa->
Address[0].Address[0].in_addr;
186 RemotePort = RemoteAddressTa->
Address[0].Address[0].sin_port;
187 break;
188
189 default:
192 }
193
196 {
197
198
199
200
204 }
205
207 }
208 else
209 {
213 }
214 }
215
219 RemotePort,
222 BufferData,
224
226
229
233
235
237}
BOOLEAN AddrIsUnspecified(PIP_ADDRESS Address)
#define NT_SUCCESS(StatCode)
PNEIGHBOR_CACHE_ENTRY RouteGetRouteToDestination(PIP_ADDRESS Destination)
NTSTATUS BuildUDPPacket(PADDRESS_FILE AddrFile, PIP_PACKET Packet, PIP_ADDRESS RemoteAddress, USHORT RemotePort, PIP_ADDRESS LocalAddress, USHORT LocalPort, PCHAR DataBuffer, UINT DataLen)
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
PNEIGHBOR_CACHE_ENTRY NBLocateNeighbor(PIP_ADDRESS Address, PIP_INTERFACE Interface)
#define STATUS_NETWORK_UNREACHABLE
struct _TA_ADDRESS_IP::_AddrIp Address[1]
struct _TA_ADDRESS_IP * PTA_IP_ADDRESS
#define TDI_ADDRESS_TYPE_IP
#define UnlockObject(Object)
#define LockObject(Object)
NTSTATUS IPSendDatagram(PIP_PACKET IPPacket, PNEIGHBOR_CACHE_ENTRY NCE)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR LocalAddress
_Must_inspect_result_ _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR RemoteAddress
Referenced by FileOpenAddress().
◆ UDPShutdown()
Definition at line 361 of file udp.c.
368{
371
373
374
376
378
380}
VOID IPRegisterProtocol(UINT ProtocolNumber, IP_PROTOCOL_HANDLER Handler)
VOID PortsShutdown(PPORT_SET PortSet)
Referenced by TiUnload().
◆ UDPStartup()
Definition at line 336 of file udp.c.
343{
345
347
349
351
352
354
356
358}
NTSTATUS PortsStartup(PPORT_SET PortSet, UINT StartingPort, UINT PortsToManage)
VOID UDPReceive(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
#define RtlZeroMemory(Destination, Length)
Referenced by DriverEntry().
◆ UDPStats