diff --git a/drivers/network/tcpip/include/ticonsts.h b/drivers/network/tcpip/include/ticonsts.h index 6d86b6787d5..cf125d99b10 100644 --- a/drivers/network/tcpip/include/ticonsts.h +++ b/drivers/network/tcpip/include/ticonsts.h @@ -32,31 +32,7 @@ #define TCPIP_PROTOCOL_NAME L"Tcpip" #endif /* _NTTEST_ */ -/* TCP/UDP/RawIP IOCTL code definitions */ - -#define FSCTL_TCP_BASE FILE_DEVICE_NETWORK - -#define _TCP_CTL_CODE(Function, Method, Access) \ - CTL_CODE(FSCTL_TCP_BASE, Function, Method, Access) - -#define IOCTL_TCP_QUERY_INFORMATION_EX \ - _TCP_CTL_CODE(0, METHOD_NEITHER, FILE_ANY_ACCESS) - -#define IOCTL_TCP_SET_INFORMATION_EX \ - _TCP_CTL_CODE(1, METHOD_BUFFERED, FILE_WRITE_ACCESS) - -#define IOCTL_SET_IP_ADDRESS \ - _TCP_CTL_CODE(14, METHOD_BUFFERED, FILE_WRITE_ACCESS) - -#define IOCTL_DELETE_IP_ADDRESS \ - _TCP_CTL_CODE(16, METHOD_BUFFERED, FILE_WRITE_ACCESS) - /* Unique error values for log entries */ #define TI_ERROR_DRIVERENTRY 0 -/* Internal status codes */ -#define IP_SUCCESS 0x0000 /* Successful */ -#define IP_NO_RESOURCES 0x0001 /* Not enough free resources */ -#define IP_NO_ROUTE_TO_DESTINATION 0x0002 /* No route to destination */ - /* EOF */ diff --git a/sdk/lib/drivers/ip/network/loopback.c b/sdk/lib/drivers/ip/network/loopback.c index e44cc69d3d7..c859ac7d2a8 100644 --- a/sdk/lib/drivers/ip/network/loopback.c +++ b/sdk/lib/drivers/ip/network/loopback.c @@ -36,7 +36,7 @@ VOID LoopTransmit( * NdisPacket = Pointer to NDIS packet to send * Offset = Offset in packet where packet data starts * LinkAddress = Pointer to link address - * Type = LAN protocol type (unused) + * Type = LAN protocol type */ { PCHAR PacketBuffer; @@ -49,6 +49,13 @@ VOID LoopTransmit( ASSERT_KM_POINTER(PC(NdisPacket)); ASSERT_KM_POINTER(PC(NdisPacket)->DLComplete); + if (Type != LAN_PROTO_IPv4) + { + TI_DbgPrint(MAX_TRACE, ("Received unsupported protocol %u\n", Type)); + PC(NdisPacket)->DLComplete(PC(NdisPacket)->Context, NdisPacket, NDIS_STATUS_NOT_SUPPORTED); + return; + } + TI_DbgPrint(MAX_TRACE, ("Called (NdisPacket = %x)\n", NdisPacket)); GetDataPtr( NdisPacket, 0, &PacketBuffer, &PacketLength ); @@ -112,7 +119,7 @@ NDIS_STATUS LoopRegisterAdapter( Loopback = IPCreateInterface(&BindInfo); if (!Loopback) return NDIS_STATUS_RESOURCES; - + Loopback->MTU = 16384; Loopback->Name.Buffer = L"Loopback"; @@ -124,7 +131,7 @@ NDIS_STATUS LoopRegisterAdapter( AddrInitIPv4(&Loopback->Broadcast, LOOPBACK_BCASTADDR_IPv4); IPRegisterInterface(Loopback); - + IPAddInterfaceRoute(Loopback); TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));