Date: Thu, 24 Jun 1999 16:05:15 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: hackers@freebsd.org Subject: weird socket behaviour (sbflush)... Message-ID: <199906241405.QAA01215@labinfo.iet.unipi.it>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906241405.QAA01215>