From owner-freebsd-hackers Sun Aug 16 22:56:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA21895 for freebsd-hackers-outgoing; Sun, 16 Aug 1998 22:56:00 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.6.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA21890 for ; Sun, 16 Aug 1998 22:55:58 -0700 (PDT) (envelope-from tlambert@usr09.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.8.8/8.8.8) id WAA28281; Sun, 16 Aug 1998 22:55:24 -0700 (MST) Received: from usr09.primenet.com(206.165.6.209) via SMTP by smtp04.primenet.com, id smtpd028271; Sun Aug 16 22:55:17 1998 Received: (from tlambert@localhost) by usr09.primenet.com (8.8.5/8.8.5) id WAA20672; Sun, 16 Aug 1998 22:55:13 -0700 (MST) From: Terry Lambert Message-Id: <199808170555.WAA20672@usr09.primenet.com> Subject: Re: sendfile() API? To: julian@whistle.com (Julian Elischer) Date: Mon, 17 Aug 1998 05:55:13 +0000 (GMT) Cc: oppermann@pipeline.ch, hackers@FreeBSD.ORG In-Reply-To: from "Julian Elischer" at Aug 16, 98 01:08:12 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I've been having a quick discussion with linus re: the sendfile() > API that he is puting in linux.. > I will be implementing an identical API on freebsd for > SAMBA to use. > warning: he has decided to not use an API identical to HPUX > but it will give similar (expanded) functionality. My main problem with sendfile(), as it is generally used, I presume, being ripped directly from the sample POP3 implementation on the NT SDK CDROM, is data interpretation. In order to make sendfile useful, it is necessary to store the file with CRLF line delimiters and the "." character pre-bytestuffed if it occors on a line by itself. Like the one that follows: . The problem here is that no processing of file contents is allowed. This greatly limits the utility of such an interface. The any-fd-to-any-fd suggestion is actually rather bogus; it is only useful on cached data; that is, recieving or sending a file would be useful, but going from one network connection to another would be merely an extra two copies, when a sperate optimization to turn inbound mbuf's into outbound mbuf's would save all but the copies to and from controller memory. Storing files with wire format contents is OK, even for mail files, until you try to use bot a POP3 and an IMAP and a local application client on the mail file. Then it breaks down horrendously. I would also hate to have to edit CRLF into all of my WWW pages, which would be required. 8-(. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message