From owner-freebsd-current Thu Jul 29 14:37:55 1999 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id E531514DB2 for ; Thu, 29 Jul 1999 14:37:53 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id OAA78832; Thu, 29 Jul 1999 14:37:19 -0700 (PDT) (envelope-from dillon) Date: Thu, 29 Jul 1999 14:37:19 -0700 (PDT) From: Matthew Dillon Message-Id: <199907292137.OAA78832@apollo.backplane.com> To: Bill Paul Cc: peter@netplex.com.au, crossd@cs.rpi.edu, current@FreeBSD.ORG Subject: Re: IRIX 6.5.4 NFS v3 TCP client + FreeBSD server = bewm References: <199907292044.QAA17186@skynet.ctr.columbia.edu> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : /* : * If either the dircount or maxcount will be : * exceeded, get out now. Both of these lengths : * are calculated conservatively, including all : * XDR overheads. : */ : len += (7 * NFSX_UNSIGNED + nlen + rem + NFSX_V3FH + : NFSX_V3POSTOPATTR); : dirlen += (6 * NFSX_UNSIGNED + nlen + rem); : if (len > cnt || dirlen > fullsiz) { : eofflag = 0; : break; : } : :Unfortunately I haven't been able to wrap my brain around how this is :being counted up for the "len" calculation. Whatever it's doing, it's :off by 4 bytes. Possibly somebody forgot that "filename3" is a string, :which in XDR format consists of a string bytes, plus padding to a longword :boundary, *plus* a longword length value. Some comments would have been :useful here. (Hint, hint.) : :What I don't know is whether or not the calculation for dirlen is :wrong or not. Hopefully now that I've shown everyone the light, maybe :somebody can tell me for sure. : :-Bill I think dirlen is supposed to be a calculation of the size of the struct dirent that the client will eventually synthesize from all of this, in order to ensure that the result synthesized by the client does not cross a 512 byte boundry. But if it is, it is being *very* conservative. I think this may simply be because different clients have different structural sizes for struct dirent. I am guess that the (6 * NFSX_UNSIGNED) is basically a NFS constant. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message