From owner-freebsd-hackers Thu Jun 24 9:31:46 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (Postfix) with SMTP id ACDBF14D9E for ; Thu, 24 Jun 1999 09:30:51 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id QAA01215; Thu, 24 Jun 1999 16:05:15 +0200 From: Luigi Rizzo Message-Id: <199906241405.QAA01215@labinfo.iet.unipi.it> Subject: weird socket behaviour (sbflush)... To: hackers@freebsd.org Date: Thu, 24 Jun 1999 16:05:15 +0200 (MET DST) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 1175 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, while implementing a reliable datagram protocol (PGM for what matters) i am hitting a weird behaviour of sbflush(). The problem is, the protocol (at least, in my implementation) allows the writing of zero-sized packets (essentially, just headers and no payload) which are put in the socket buffer. This results in some cases in sb_cc = 0, sb_mbcnt != 0, and this condition causes sbflush to panic. There is not an equivalent of this in TCP (which counts bytes, not segments) or UDP (which allows zero-sized packets but bypasses the socket buffer) so i am not sure if it is appropriate to "fix" sbflush() so that it uses sbdroprecord() instead of sbdrop() in case of a datagram protocol ? cheers luigi -----------------------------------+------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL/FAX: +39-050-568.533/522 . via Diotisalvi 2, 56126 PISA (Italy) http://www.iet.unipi.it/~luigi/ngc99/ ==== First International Workshop on Networked Group Communication ==== -----------------------------------+------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message