2004-09-29 05:10:48 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS TCP/IP protocol driver
|
|
|
|
* FILE: transport/rawip/rawip.c
|
2005-01-22 06:47:33 +00:00
|
|
|
* PURPOSE: User Datagram Protocol routines
|
2004-09-29 05:10:48 +00:00
|
|
|
* PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
|
|
|
* REVISIONS:
|
|
|
|
* CSH 01/08-2000 Created
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "precomp.h"
|
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
NTSTATUS AddGenericHeaderIPv4(
|
2009-10-26 03:11:44 +00:00
|
|
|
PADDRESS_FILE AddrFile,
|
2005-01-22 06:47:33 +00:00
|
|
|
PIP_ADDRESS RemoteAddress,
|
|
|
|
USHORT RemotePort,
|
|
|
|
PIP_ADDRESS LocalAddress,
|
|
|
|
USHORT LocalPort,
|
|
|
|
PIP_PACKET IPPacket,
|
|
|
|
UINT DataLength,
|
|
|
|
UINT Protocol,
|
|
|
|
UINT ExtraLength,
|
2005-05-08 02:16:32 +00:00
|
|
|
PVOID *NextHeader )
|
2005-01-22 06:47:33 +00:00
|
|
|
/*
|
|
|
|
* FUNCTION: Adds an IPv4 and RawIp header to an IP packet
|
|
|
|
* ARGUMENTS:
|
|
|
|
* SendRequest = Pointer to send request
|
|
|
|
* LocalAddress = Pointer to our local address
|
|
|
|
* LocalPort = The port we send this datagram from
|
|
|
|
* IPPacket = Pointer to IP packet
|
|
|
|
* RETURNS:
|
|
|
|
* Status of operation
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
PIPv4_HEADER IPHeader;
|
|
|
|
ULONG BufferSize;
|
2005-05-08 02:16:32 +00:00
|
|
|
|
|
|
|
TI_DbgPrint(MID_TRACE, ("Packet: %x NdisPacket %x\n",
|
2005-01-22 06:47:33 +00:00
|
|
|
IPPacket, IPPacket->NdisPacket));
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2009-10-04 19:23:53 +00:00
|
|
|
BufferSize = sizeof(IPv4_HEADER) + ExtraLength;
|
2005-05-08 02:16:32 +00:00
|
|
|
|
|
|
|
GetDataPtr( IPPacket->NdisPacket,
|
2009-10-04 19:23:53 +00:00
|
|
|
0,
|
2005-05-08 02:16:32 +00:00
|
|
|
(PCHAR *)&IPPacket->Header,
|
2011-12-05 03:14:50 +00:00
|
|
|
&IPPacket->TotalSize );
|
|
|
|
IPPacket->MappedHeader = TRUE;
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2019-11-18 17:55:10 +00:00
|
|
|
IPPacket->HeaderSize = sizeof(IPv4_HEADER);
|
2005-05-08 02:16:32 +00:00
|
|
|
|
|
|
|
TI_DbgPrint(MAX_TRACE, ("Allocated %d bytes for headers at 0x%X.\n",
|
2005-01-22 06:47:33 +00:00
|
|
|
BufferSize, IPPacket->Header));
|
|
|
|
TI_DbgPrint(MAX_TRACE, ("Packet total length %d\n", IPPacket->TotalSize));
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
/* Build IPv4 header */
|
|
|
|
IPHeader = (PIPv4_HEADER)IPPacket->Header;
|
|
|
|
/* Version = 4, Length = 5 DWORDs */
|
|
|
|
IPHeader->VerIHL = 0x45;
|
|
|
|
/* Normal Type-of-Service */
|
|
|
|
IPHeader->Tos = 0;
|
|
|
|
/* Length of header and data */
|
|
|
|
IPHeader->TotalLength = WH2N((USHORT)IPPacket->TotalSize);
|
|
|
|
/* Identification */
|
2009-07-19 17:40:36 +00:00
|
|
|
IPHeader->Id = (USHORT)Random();
|
2005-01-22 06:47:33 +00:00
|
|
|
/* One fragment at offset 0 */
|
|
|
|
IPHeader->FlagsFragOfs = 0;
|
2009-10-26 03:11:44 +00:00
|
|
|
/* Time-to-Live */
|
|
|
|
IPHeader->Ttl = AddrFile->TTL;
|
|
|
|
/* Protocol */
|
2005-01-22 06:47:33 +00:00
|
|
|
IPHeader->Protocol = Protocol;
|
|
|
|
/* Checksum is 0 (for later calculation of this) */
|
|
|
|
IPHeader->Checksum = 0;
|
|
|
|
/* Source address */
|
|
|
|
IPHeader->SrcAddr = LocalAddress->Address.IPv4Address;
|
|
|
|
/* Destination address. FIXME: IPv4 only */
|
|
|
|
IPHeader->DstAddr = RemoteAddress->Address.IPv4Address;
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
/* Build RawIp header */
|
|
|
|
*NextHeader = (((PCHAR)IPHeader) + sizeof(IPv4_HEADER));
|
|
|
|
IPPacket->Data = ((PCHAR)*NextHeader) + ExtraLength;
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
return STATUS_SUCCESS;
|
|
|
|
}
|
2004-09-29 05:10:48 +00:00
|
|
|
|
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
NTSTATUS BuildRawIpPacket(
|
2009-10-26 03:11:44 +00:00
|
|
|
PADDRESS_FILE AddrFile,
|
2004-09-29 05:10:48 +00:00
|
|
|
PIP_PACKET Packet,
|
2005-01-22 06:47:33 +00:00
|
|
|
PIP_ADDRESS RemoteAddress,
|
|
|
|
USHORT RemotePort,
|
2004-09-29 05:10:48 +00:00
|
|
|
PIP_ADDRESS LocalAddress,
|
2005-01-22 06:47:33 +00:00
|
|
|
USHORT LocalPort,
|
|
|
|
PCHAR DataBuffer,
|
2005-05-08 02:16:32 +00:00
|
|
|
UINT DataLen )
|
2004-09-29 05:10:48 +00:00
|
|
|
/*
|
2005-01-22 06:47:33 +00:00
|
|
|
* FUNCTION: Builds an RawIp packet
|
2004-09-29 05:10:48 +00:00
|
|
|
* ARGUMENTS:
|
|
|
|
* Context = Pointer to context information (DATAGRAM_SEND_REQUEST)
|
2005-01-22 06:47:33 +00:00
|
|
|
* LocalAddress = Pointer to our local address
|
|
|
|
* LocalPort = The port we send this datagram from
|
2004-09-29 05:10:48 +00:00
|
|
|
* IPPacket = Address of pointer to IP packet
|
|
|
|
* RETURNS:
|
|
|
|
* Status of operation
|
|
|
|
*/
|
|
|
|
{
|
2005-01-22 06:47:33 +00:00
|
|
|
NTSTATUS Status;
|
|
|
|
PCHAR Payload;
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
TI_DbgPrint(MAX_TRACE, ("Called.\n"));
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
/* FIXME: Assumes IPv4 */
|
|
|
|
IPInitializePacket(Packet, IP_ADDRESS_V4);
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
Packet->TotalSize = sizeof(IPv4_HEADER) + DataLen;
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2004-09-29 05:10:48 +00:00
|
|
|
/* Prepare packet */
|
2005-01-22 06:47:33 +00:00
|
|
|
Status = AllocatePacketWithBuffer( &Packet->NdisPacket,
|
|
|
|
NULL,
|
2009-10-04 19:23:53 +00:00
|
|
|
Packet->TotalSize );
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
if( !NT_SUCCESS(Status) ) return Status;
|
2004-09-29 05:10:48 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
TI_DbgPrint(MID_TRACE, ("Allocated packet: %x\n", Packet->NdisPacket));
|
|
|
|
TI_DbgPrint(MID_TRACE, ("Local Addr : %s\n", A2S(LocalAddress)));
|
|
|
|
TI_DbgPrint(MID_TRACE, ("Remote Addr: %s\n", A2S(RemoteAddress)));
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
switch (RemoteAddress->Type) {
|
|
|
|
case IP_ADDRESS_V4:
|
|
|
|
Status = AddGenericHeaderIPv4
|
2009-10-26 03:11:44 +00:00
|
|
|
(AddrFile, RemoteAddress, RemotePort,
|
2005-01-22 06:47:33 +00:00
|
|
|
LocalAddress, LocalPort, Packet, DataLen,
|
2009-10-26 03:11:44 +00:00
|
|
|
AddrFile->Protocol,
|
2005-01-22 06:47:33 +00:00
|
|
|
0, (PVOID *)&Payload );
|
|
|
|
break;
|
|
|
|
case IP_ADDRESS_V6:
|
|
|
|
/* FIXME: Support IPv6 */
|
|
|
|
Status = STATUS_UNSUCCESSFUL;
|
|
|
|
TI_DbgPrint(MIN_TRACE, ("IPv6 RawIp datagrams are not supported.\n"));
|
|
|
|
break;
|
2004-09-29 05:10:48 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
default:
|
|
|
|
Status = STATUS_UNSUCCESSFUL;
|
|
|
|
TI_DbgPrint(MIN_TRACE, ("Bad Address Type %d\n", RemoteAddress->Type));
|
|
|
|
break;
|
2004-09-29 05:10:48 +00:00
|
|
|
}
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2008-09-03 00:32:07 +00:00
|
|
|
if( !NT_SUCCESS(Status) ) {
|
2011-12-05 03:14:50 +00:00
|
|
|
TI_DbgPrint(MIN_TRACE, ("Cannot add header. Status = (0x%X)\n",
|
|
|
|
Status));
|
|
|
|
Packet->Free(Packet);
|
|
|
|
return Status;
|
2008-09-03 00:32:07 +00:00
|
|
|
}
|
|
|
|
|
2005-05-08 02:16:32 +00:00
|
|
|
TI_DbgPrint(MID_TRACE, ("Copying data (hdr %x data %x (%d))\n",
|
|
|
|
Packet->Header, Packet->Data,
|
2005-01-22 06:47:33 +00:00
|
|
|
(PCHAR)Packet->Data - (PCHAR)Packet->Header));
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
RtlCopyMemory( Packet->Data, DataBuffer, DataLen );
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2009-03-25 02:04:01 +00:00
|
|
|
Packet->Flags |= IP_PACKET_FLAG_RAW;
|
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
TI_DbgPrint(MID_TRACE, ("Displaying packet\n"));
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2004-09-29 05:10:48 +00:00
|
|
|
DISPLAY_IP_PACKET(Packet);
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
TI_DbgPrint(MID_TRACE, ("Leaving\n"));
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2004-09-29 05:10:48 +00:00
|
|
|
return STATUS_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
NTSTATUS RawIPSendDatagram(
|
2004-10-03 20:38:48 +00:00
|
|
|
PADDRESS_FILE AddrFile,
|
2004-09-29 05:10:48 +00:00
|
|
|
PTDI_CONNECTION_INFORMATION ConnInfo,
|
2004-10-03 20:38:48 +00:00
|
|
|
PCHAR BufferData,
|
2005-01-22 06:47:33 +00:00
|
|
|
ULONG DataSize,
|
2005-05-08 02:16:32 +00:00
|
|
|
PULONG DataUsed )
|
2004-09-29 05:10:48 +00:00
|
|
|
/*
|
2005-01-22 06:47:33 +00:00
|
|
|
* FUNCTION: Sends an RawIp datagram to a remote address
|
2004-09-29 05:10:48 +00:00
|
|
|
* ARGUMENTS:
|
|
|
|
* Request = Pointer to TDI request
|
|
|
|
* ConnInfo = Pointer to connection information
|
|
|
|
* Buffer = Pointer to NDIS buffer with data
|
|
|
|
* DataSize = Size in bytes of data to be sent
|
|
|
|
* RETURNS:
|
|
|
|
* Status of operation
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
IP_PACKET Packet;
|
2005-01-22 06:47:33 +00:00
|
|
|
PTA_IP_ADDRESS RemoteAddressTa = (PTA_IP_ADDRESS)ConnInfo->RemoteAddress;
|
2009-03-25 02:28:40 +00:00
|
|
|
IP_ADDRESS RemoteAddress, LocalAddress;
|
2005-01-22 06:47:33 +00:00
|
|
|
USHORT RemotePort;
|
|
|
|
NTSTATUS Status;
|
|
|
|
PNEIGHBOR_CACHE_ENTRY NCE;
|
2009-11-14 18:38:02 +00:00
|
|
|
|
2021-05-21 07:36:27 +00:00
|
|
|
LockObject(AddrFile);
|
2005-01-22 06:47:33 +00:00
|
|
|
|
|
|
|
TI_DbgPrint(MID_TRACE,("Sending Datagram(%x %x %x %d)\n",
|
|
|
|
AddrFile, ConnInfo, BufferData, DataSize));
|
|
|
|
TI_DbgPrint(MID_TRACE,("RemoteAddressTa: %x\n", RemoteAddressTa));
|
2004-09-29 05:10:48 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
switch( RemoteAddressTa->Address[0].AddressType ) {
|
2011-12-05 03:14:50 +00:00
|
|
|
case TDI_ADDRESS_TYPE_IP:
|
|
|
|
RemoteAddress.Type = IP_ADDRESS_V4;
|
|
|
|
RemoteAddress.Address.IPv4Address =
|
|
|
|
RemoteAddressTa->Address[0].Address[0].in_addr;
|
|
|
|
RemotePort = RemoteAddressTa->Address[0].Address[0].sin_port;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2021-05-21 07:36:27 +00:00
|
|
|
UnlockObject(AddrFile);
|
2011-12-05 03:14:50 +00:00
|
|
|
return STATUS_UNSUCCESSFUL;
|
2005-01-22 06:47:33 +00:00
|
|
|
}
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2009-06-30 21:14:21 +00:00
|
|
|
TI_DbgPrint(MID_TRACE,("About to get route to destination\n"));
|
|
|
|
|
2009-03-25 02:28:40 +00:00
|
|
|
LocalAddress = AddrFile->Address;
|
|
|
|
if (AddrIsUnspecified(&LocalAddress))
|
|
|
|
{
|
2009-06-30 21:14:21 +00:00
|
|
|
/* If the local address is unspecified (0),
|
|
|
|
* then use the unicast address of the
|
|
|
|
* interface we're sending over
|
|
|
|
*/
|
2009-12-30 12:46:14 +00:00
|
|
|
if(!(NCE = RouteGetRouteToDestination( &RemoteAddress ))) {
|
2021-05-21 07:36:27 +00:00
|
|
|
UnlockObject(AddrFile);
|
2011-12-05 03:14:50 +00:00
|
|
|
return STATUS_NETWORK_UNREACHABLE;
|
2009-12-30 12:46:14 +00:00
|
|
|
}
|
|
|
|
|
2009-06-30 21:14:21 +00:00
|
|
|
LocalAddress = NCE->Interface->Unicast;
|
2009-03-25 02:28:40 +00:00
|
|
|
}
|
2009-12-30 12:46:14 +00:00
|
|
|
else
|
|
|
|
{
|
2013-08-04 12:35:05 +00:00
|
|
|
if(!(NCE = NBLocateNeighbor( &LocalAddress, NULL ))) {
|
2021-05-21 07:36:27 +00:00
|
|
|
UnlockObject(AddrFile);
|
2011-12-05 03:14:50 +00:00
|
|
|
return STATUS_INVALID_PARAMETER;
|
2009-12-30 12:46:14 +00:00
|
|
|
}
|
|
|
|
}
|
2009-03-25 02:28:40 +00:00
|
|
|
|
2009-10-26 03:11:44 +00:00
|
|
|
Status = BuildRawIpPacket( AddrFile,
|
|
|
|
&Packet,
|
2005-01-22 06:47:33 +00:00
|
|
|
&RemoteAddress,
|
|
|
|
RemotePort,
|
2009-03-25 02:28:40 +00:00
|
|
|
&LocalAddress,
|
2005-01-22 06:47:33 +00:00
|
|
|
AddrFile->Port,
|
|
|
|
BufferData,
|
|
|
|
DataSize );
|
2005-05-08 02:16:32 +00:00
|
|
|
|
2021-05-21 07:36:27 +00:00
|
|
|
UnlockObject(AddrFile);
|
2010-01-09 16:25:11 +00:00
|
|
|
|
2005-05-08 02:16:32 +00:00
|
|
|
if( !NT_SUCCESS(Status) )
|
2011-12-05 03:14:50 +00:00
|
|
|
return Status;
|
2004-09-29 05:10:48 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
TI_DbgPrint(MID_TRACE,("About to send datagram\n"));
|
2004-09-29 05:10:48 +00:00
|
|
|
|
2011-10-17 01:37:56 +00:00
|
|
|
Status = IPSendDatagram(&Packet, NCE);
|
|
|
|
if (!NT_SUCCESS(Status))
|
2008-12-21 01:29:35 +00:00
|
|
|
return Status;
|
2011-12-05 03:14:50 +00:00
|
|
|
|
2011-07-07 20:02:52 +00:00
|
|
|
*DataUsed = DataSize;
|
2005-01-22 06:47:33 +00:00
|
|
|
|
|
|
|
TI_DbgPrint(MID_TRACE,("Leaving\n"));
|
|
|
|
|
|
|
|
return STATUS_SUCCESS;
|
2004-09-29 05:10:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
VOID RawIpReceive(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
|
2004-09-29 05:10:48 +00:00
|
|
|
/*
|
2005-01-22 06:47:33 +00:00
|
|
|
* FUNCTION: Receives and queues a RawIp datagram
|
|
|
|
* ARGUMENTS:
|
|
|
|
* NTE = Pointer to net table entry which the packet was received on
|
|
|
|
* IPPacket = Pointer to an IP packet that was received
|
|
|
|
* NOTES:
|
|
|
|
* This is the low level interface for receiving RawIp datagrams. It strips
|
|
|
|
* the RawIp header from a packet and delivers the data to anyone that wants it
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
AF_SEARCH SearchContext;
|
|
|
|
PIPv4_HEADER IPv4Header;
|
|
|
|
PADDRESS_FILE AddrFile;
|
|
|
|
PIP_ADDRESS DstAddress, SrcAddress;
|
|
|
|
UINT DataSize;
|
|
|
|
|
|
|
|
TI_DbgPrint(MAX_TRACE, ("Called.\n"));
|
|
|
|
|
|
|
|
switch (IPPacket->Type) {
|
|
|
|
/* IPv4 packet */
|
|
|
|
case IP_ADDRESS_V4:
|
|
|
|
IPv4Header = IPPacket->Header;
|
|
|
|
DstAddress = &IPPacket->DstAddr;
|
|
|
|
SrcAddress = &IPPacket->SrcAddr;
|
|
|
|
DataSize = IPPacket->TotalSize;
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* IPv6 packet */
|
|
|
|
case IP_ADDRESS_V6:
|
|
|
|
TI_DbgPrint(MIN_TRACE, ("Discarded IPv6 datagram (%i bytes).\n", IPPacket->TotalSize));
|
|
|
|
|
|
|
|
/* FIXME: IPv6 is not supported */
|
|
|
|
return;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Locate a receive request on destination address file object
|
|
|
|
and deliver the packet if one is found. If there is no receive
|
|
|
|
request on the address file object, call the associated receive
|
|
|
|
handler. If no receive handler is registered, drop the packet */
|
|
|
|
|
|
|
|
AddrFile = AddrSearchFirst(DstAddress,
|
|
|
|
0,
|
|
|
|
IPv4Header->Protocol,
|
|
|
|
&SearchContext);
|
|
|
|
if (AddrFile) {
|
|
|
|
do {
|
|
|
|
DGDeliverData(AddrFile,
|
|
|
|
SrcAddress,
|
|
|
|
DstAddress,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
IPPacket,
|
|
|
|
DataSize);
|
2014-08-17 04:03:29 +00:00
|
|
|
DereferenceObject(AddrFile);
|
2005-01-22 06:47:33 +00:00
|
|
|
} while ((AddrFile = AddrSearchNext(&SearchContext)) != NULL);
|
|
|
|
} else {
|
|
|
|
/* There are no open address files that will take this datagram */
|
|
|
|
/* FIXME: IPv4 only */
|
|
|
|
TI_DbgPrint(MID_TRACE, ("Cannot deliver IPv4 raw datagram to address (0x%X).\n",
|
|
|
|
DN2H(DstAddress->Address.IPv4Address)));
|
|
|
|
|
|
|
|
/* FIXME: Send ICMP reply */
|
|
|
|
}
|
|
|
|
TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
NTSTATUS RawIPStartup(VOID)
|
|
|
|
/*
|
|
|
|
* FUNCTION: Initializes the UDP subsystem
|
2004-09-29 05:10:48 +00:00
|
|
|
* RETURNS:
|
|
|
|
* Status of operation
|
|
|
|
*/
|
|
|
|
{
|
2005-01-22 06:47:33 +00:00
|
|
|
#ifdef __NTDRIVER__
|
|
|
|
RtlZeroMemory(&UDPStats, sizeof(UDP_STATISTICS));
|
|
|
|
#endif
|
2004-09-29 05:10:48 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
/* Register this protocol with IP layer */
|
2009-07-19 14:48:48 +00:00
|
|
|
IPRegisterProtocol(IPPROTO_RAW, RawIpReceive);
|
2005-01-22 06:47:33 +00:00
|
|
|
|
|
|
|
return STATUS_SUCCESS;
|
2004-09-29 05:10:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
NTSTATUS RawIPShutdown(VOID)
|
2004-09-29 05:10:48 +00:00
|
|
|
/*
|
2005-01-22 06:47:33 +00:00
|
|
|
* FUNCTION: Shuts down the UDP subsystem
|
2004-09-29 05:10:48 +00:00
|
|
|
* RETURNS:
|
|
|
|
* Status of operation
|
|
|
|
*/
|
|
|
|
{
|
2005-01-22 06:47:33 +00:00
|
|
|
/* Deregister this protocol with IP layer */
|
2009-07-19 14:48:48 +00:00
|
|
|
IPRegisterProtocol(IPPROTO_RAW, NULL);
|
2004-09-29 05:10:48 +00:00
|
|
|
|
2005-01-22 06:47:33 +00:00
|
|
|
return STATUS_SUCCESS;
|
2004-09-29 05:10:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|