TdiBuildSendDatagram

VOID
TdiBuildSendDatagram (
IN PIRP Irp,
IN PDEVICE_OBJECT DeviceObject,
IN PFILE_OBJECT FileObject,
IN PVOID CompletionRoutine,
IN PVOID Context,
IN PMDL MdlAddress,
IN ULONG SendLength,
IN PTDI_CONNECTION_INFORMATION SendDatagramInformation
);

TdiBuildSendDatagram builds an IRP containing a TDI_SEND_DATAGRAM request message. It sets up the request message in the minor function code member of the I/O stack location and sets IRP_MJ_INTERNAL_DEVICE_CONTROL as a major function code.

Parameters

Irp

Points to the I/O stack location for the kernel-mode client IRP. The current stack location must point to the location in which TdiBuildSendDatagram places the parameter list. IRP members related to the send datagram request are:

IRP Component Meaning
IoStatus.Status Specifies the final status of the send datagram request.
IoStatus.Information Contains the number of data bytes the internal driver send datagram function writes to the network.
IrpSp->MajorFunction Specifies IRP_MJ_INTERNAL_DEVICE_CONTROL.
IrpSp->MinorFunction Specifies TDI_SEND_DATAGRAM.
IrpSp->FileObject Points to an address file object.
MdlAddress Points to a chain of MDLs describing the send buffer.
IrpSp->Parameters Points to a TDI_REQUEST_KERNEL_SENDDG structure.

DeviceObject

Points to the device object that describes the TDI driver.

FileObject

Points to an address file object.

CompletionRoutine

Points to the client completion function the I/O subsystem can call when I/O is complete. This parameter must be NULL if the I/O subsystem calls no completion function.

Context

Points to the context the client associates with its completion function.

MdlAddress

Points to the MDL chain describing the datagram the client is sending to the network.

SendLength

Specifies the length, in bytes, of the datagram.

SendDatagramInformation

Points to a TDI_CONNECTION_INFORMATION structure describing the remote node client address to which the local node client sends the datagram.

See Also

TDI_CONNECTION_INFORMATION, TDI_REQUEST_KERNEL_SENDDG, TDI_SEND_DATAGRAM