The sendfiledata data structure is used to pass parameters to the net_sendfile function. The parameters are also passed to the sendfile method in an installed filter in response to a net_sendfile call.
typedef struct {
SYS_FILE fd; /* file to send */
size_t offset; /* offset in file to start sending from */
size_t len; /* number of bytes to send from file */
const void *header; /* data to send before file */
int hlen; /* number of bytes to send before file */
const void *trailer; /* data to send after file */
int tlen; /* number of bytes to send after file */
} sendfiledata;
|