Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Aug 2000 22:18:22 -0700
From:      Marco Molteni <molter@sofia.csl.sri.com>
To:        freebsd-net@freebsd.org
Subject:   question on sys/net/ip_fw.h
Message-ID:  <20000820221822.A30286@sofia.csl.sri.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000820221822.A30286>