mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
TDI stuff I forgot to commit
svn path=/trunk/; revision=6730
This commit is contained in:
parent
b7f60af879
commit
8a095f86fc
4 changed files with 13 additions and 13 deletions
|
@ -51,7 +51,7 @@ inline DWORD TdiAddressSizeFromName(
|
||||||
{
|
{
|
||||||
switch (Name->sa_family) {
|
switch (Name->sa_family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
return sizeof(TA_ADDRESS_IP);
|
return sizeof(TA_IP_ADDRESS);
|
||||||
/* FIXME: More to come */
|
/* FIXME: More to come */
|
||||||
}
|
}
|
||||||
AFD_DbgPrint(MIN_TRACE, ("Unknown address family (%d).\n", Name->sa_family));
|
AFD_DbgPrint(MIN_TRACE, ("Unknown address family (%d).\n", Name->sa_family));
|
||||||
|
@ -60,7 +60,7 @@ inline DWORD TdiAddressSizeFromName(
|
||||||
|
|
||||||
|
|
||||||
VOID TdiBuildAddressIPv4(
|
VOID TdiBuildAddressIPv4(
|
||||||
PTA_ADDRESS_IP Address,
|
PTA_IP_ADDRESS Address,
|
||||||
LPSOCKADDR Name)
|
LPSOCKADDR Name)
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Builds an IPv4 TDI style address
|
* FUNCTION: Builds an IPv4 TDI style address
|
||||||
|
@ -93,7 +93,7 @@ NTSTATUS TdiBuildAddress(
|
||||||
|
|
||||||
switch (Name->sa_family) {
|
switch (Name->sa_family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
TdiBuildAddressIPv4((PTA_ADDRESS_IP)Address, Name);
|
TdiBuildAddressIPv4((PTA_IP_ADDRESS)Address, Name);
|
||||||
break;
|
break;
|
||||||
/* FIXME: More to come */
|
/* FIXME: More to come */
|
||||||
default:
|
default:
|
||||||
|
@ -313,7 +313,7 @@ NTSTATUS TdiOpenAddressFileIPv4(
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
PFILE_FULL_EA_INFORMATION EaInfo;
|
PFILE_FULL_EA_INFORMATION EaInfo;
|
||||||
PTA_ADDRESS_IP Address;
|
PTA_IP_ADDRESS Address;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG EaLength;
|
ULONG EaLength;
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ NTSTATUS TdiOpenAddressFileIPv4(
|
||||||
|
|
||||||
EaLength = sizeof(FILE_FULL_EA_INFORMATION) +
|
EaLength = sizeof(FILE_FULL_EA_INFORMATION) +
|
||||||
TDI_TRANSPORT_ADDRESS_LENGTH +
|
TDI_TRANSPORT_ADDRESS_LENGTH +
|
||||||
sizeof(TA_ADDRESS_IP);
|
sizeof(TA_IP_ADDRESS);
|
||||||
EaInfo = (PFILE_FULL_EA_INFORMATION)ExAllocatePool(NonPagedPool, EaLength);
|
EaInfo = (PFILE_FULL_EA_INFORMATION)ExAllocatePool(NonPagedPool, EaLength);
|
||||||
if (!EaInfo)
|
if (!EaInfo)
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
@ -332,8 +332,8 @@ NTSTATUS TdiOpenAddressFileIPv4(
|
||||||
RtlCopyMemory(EaInfo->EaName,
|
RtlCopyMemory(EaInfo->EaName,
|
||||||
TdiTransportAddress,
|
TdiTransportAddress,
|
||||||
TDI_TRANSPORT_ADDRESS_LENGTH);
|
TDI_TRANSPORT_ADDRESS_LENGTH);
|
||||||
EaInfo->EaValueLength = sizeof(TA_ADDRESS_IP);
|
EaInfo->EaValueLength = sizeof(TA_IP_ADDRESS);
|
||||||
Address = (PTA_ADDRESS_IP)(EaInfo->EaName + TDI_TRANSPORT_ADDRESS_LENGTH);
|
Address = (PTA_IP_ADDRESS)(EaInfo->EaName + TDI_TRANSPORT_ADDRESS_LENGTH);
|
||||||
TdiBuildAddressIPv4(Address, Name);
|
TdiBuildAddressIPv4(Address, Name);
|
||||||
Status = TdiOpenDevice(DeviceName,
|
Status = TdiOpenDevice(DeviceName,
|
||||||
EaLength,
|
EaLength,
|
||||||
|
@ -1107,7 +1107,7 @@ NTSTATUS TdiReceiveDatagram(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Get from socket information */
|
/* FIXME: Get from socket information */
|
||||||
TdiAddressSize = sizeof(TA_ADDRESS_IP);
|
TdiAddressSize = sizeof(TA_IP_ADDRESS);
|
||||||
|
|
||||||
ReceiveInfo = (PTDI_CONNECTION_INFORMATION)
|
ReceiveInfo = (PTDI_CONNECTION_INFORMATION)
|
||||||
ExAllocatePool(NonPagedPool,
|
ExAllocatePool(NonPagedPool,
|
||||||
|
|
|
@ -16,7 +16,7 @@ extern KSPIN_LOCK ConnectionEndpointListLock;
|
||||||
|
|
||||||
NTSTATUS FileOpenAddress(
|
NTSTATUS FileOpenAddress(
|
||||||
PTDI_REQUEST Request,
|
PTDI_REQUEST Request,
|
||||||
PTA_ADDRESS_IP AddrList,
|
PTA_IP_ADDRESS AddrList,
|
||||||
USHORT Protocol,
|
USHORT Protocol,
|
||||||
PVOID Options);
|
PVOID Options);
|
||||||
|
|
||||||
|
|
|
@ -252,7 +252,7 @@ VOID RequestWorker(
|
||||||
*/
|
*/
|
||||||
NTSTATUS FileOpenAddress(
|
NTSTATUS FileOpenAddress(
|
||||||
PTDI_REQUEST Request,
|
PTDI_REQUEST Request,
|
||||||
PTA_ADDRESS_IP Address,
|
PTA_IP_ADDRESS Address,
|
||||||
USHORT Protocol,
|
USHORT Protocol,
|
||||||
PVOID Options)
|
PVOID Options)
|
||||||
{
|
{
|
||||||
|
|
|
@ -153,7 +153,7 @@ NTSTATUS TiCreateFileObject(
|
||||||
PFILE_FULL_EA_INFORMATION EaInfo;
|
PFILE_FULL_EA_INFORMATION EaInfo;
|
||||||
PTRANSPORT_CONTEXT Context;
|
PTRANSPORT_CONTEXT Context;
|
||||||
PIO_STACK_LOCATION IrpSp;
|
PIO_STACK_LOCATION IrpSp;
|
||||||
PTA_ADDRESS_IP Address;
|
PTA_IP_ADDRESS Address;
|
||||||
TDI_REQUEST Request;
|
TDI_REQUEST Request;
|
||||||
PVOID ClientContext;
|
PVOID ClientContext;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
@ -191,8 +191,8 @@ CP
|
||||||
/* This is a request to open an address */
|
/* This is a request to open an address */
|
||||||
CP
|
CP
|
||||||
/* Parameter checks */
|
/* Parameter checks */
|
||||||
Address = (PTA_ADDRESS_IP)(EaInfo->EaName + EaInfo->EaNameLength);
|
Address = (PTA_IP_ADDRESS)(EaInfo->EaName + EaInfo->EaNameLength);
|
||||||
if ((EaInfo->EaValueLength < sizeof(TA_ADDRESS_IP)) ||
|
if ((EaInfo->EaValueLength < sizeof(TA_IP_ADDRESS)) ||
|
||||||
(Address->TAAddressCount != 1) ||
|
(Address->TAAddressCount != 1) ||
|
||||||
(Address->Address[0].AddressLength < TDI_ADDRESS_LENGTH_IP) ||
|
(Address->Address[0].AddressLength < TDI_ADDRESS_LENGTH_IP) ||
|
||||||
(Address->Address[0].AddressType != TDI_ADDRESS_TYPE_IP)) {
|
(Address->Address[0].AddressType != TDI_ADDRESS_TYPE_IP)) {
|
||||||
|
|
Loading…
Reference in a new issue