Subject: Re: sendfile support in NetBSD
To: Perry E. Metzger <perry@piermont.com>
From: Simon Burge <simonb@NetBSD.org>
List: netbsd-users
Date: 03/01/2007 10:59:40
"Perry E. Metzger" wrote:

> Thor Lancelot Simon <tls@rek.tjls.com> writes:
> > And he won't even have to tart up his code to use the nonstandard
> > (and dumb) sendfile().
> 
> I'm afraid that, de facto, sendfile is now a standard. As I said,
> Solaris, FreeBSD, Linux, and others, all now support it. We're the odd
> man out. I suspect it may even end up in the next Single Unix Standard.

At least FreeBSD uses the following:

     int
     sendfile(int fd, int s, off_t offset, size_t nbytes,
         struct sf_hdtr *hdtr, off_t *sbytes, int flags);

which seems remarkably painful ...  Solaris and Linux both
use:

     ssize_t sendfile(int out_fd, int in_fd, off_t *off, size_t len);

Back to that good ol' saying about standards....

Simon.