Question

I am trying to implement zero copy mechanism i.e. a contrary function to the TransmitFile() API.

But I don't know how to register buffers in kernel. Below are the details what I want to do to implement zero copy:

  1. We will receive a large data from the server in our client buffer, I have a doubt here also that weather data will come to socket buffer(client's) or first it will come into NIC buffer, please clear this doubt also.

  2. Now from socket buffer I want to copy the data directly to the kernel buffer and then to file in the disc without going for read and write system calls i.e without switching contexts.

  3. Data has to be moved directly to kernel buffer within kernel space only.

Is there any API or some method to achieve this? Any other suggestions?

Sockets are on TCP/IP Connection.

Was it helpful?

Solution

There is not any API as such for receiving unfortunately.but you can try ZwWrite().

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top