From owner-freebsd-net Sun Aug 20 22:18: 8 2000 Delivered-To: freebsd-net@freebsd.org Received: from sofia.csl.sri.com (sofia.csl.sri.com [130.107.19.127]) by hub.freebsd.org (Postfix) with ESMTP id CE1FC37B43C for ; Sun, 20 Aug 2000 22:18:05 -0700 (PDT) Received: (from molter@localhost) by sofia.csl.sri.com (8.9.3/8.9.3) id WAA30295 for freebsd-net@freebsd.org; Sun, 20 Aug 2000 22:18:22 -0700 (PDT) (envelope-from molter) From: Marco Molteni Date: Sun, 20 Aug 2000 22:18:22 -0700 To: freebsd-net@freebsd.org Subject: question on sys/net/ip_fw.h Message-ID: <20000820221822.A30286@sofia.csl.sri.com> Mail-Followup-To: freebsd-net@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I have a question on file sys/netinet/ip_fw.h (revision 1.51), regarding the comment to struct ip_fw: /* * Format of an IP firewall descriptor * * fw_src, fw_dst, fw_smsk, fw_dmsk are always stored in network byte order. * fw_flg and fw_n*p are stored in host byte order (of course). * Port numbers are stored in HOST byte order. * Warning: setsockopt() will fail if sizeof(struct ip_fw) > MLEN (108) */ The last line says that MLEN is 108 bytes. According to sys/sys/mbuf.h: #define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */ And, according to sys/i386/include/param.h: #ifndef MSIZE #define MSIZE 256 /* size of an mbuf */ #endif /* MSIZE */ So, I think that the first comment is obsolete and refers to when MSIZE was 128, and should be updated to something like: --- ip_fw.h.old Sun Aug 20 18:20:13 2000 +++ ip_fw.h Sun Aug 20 18:20:40 2000 @@ -47,7 +47,8 @@ * fw_src, fw_dst, fw_smsk, fw_dmsk are always stored in network byte order. * fw_flg and fw_n*p are stored in host byte order (of course). * Port numbers are stored in HOST byte order. - * Warning: setsockopt() will fail if sizeof(struct ip_fw) > MLEN (108) + * Warning: setsockopt() will fail if sizeof(struct ip_fw) > MLEN + * (see sys/mbuf.h). */ Am I right? Is someone willing to commit the change? Thanks Marco To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message