summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_icmp.h
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-07-24 18:46:19 +0000
committerwollman <wollman@FreeBSD.org>1996-07-24 18:46:19 +0000
commit730d9ea60bbd736aa6e38d5414dbd231e32a2605 (patch)
tree6de727402c507fdf97751e5ba908730627692104 /sys/netinet/ip_icmp.h
parentad62df628f65fd31e61eee95b88b1a34274632d9 (diff)
downloadFreeBSD-src-730d9ea60bbd736aa6e38d5414dbd231e32a2605.zip
FreeBSD-src-730d9ea60bbd736aa6e38d5414dbd231e32a2605.tar.gz
Eliminate some more references to separate ip_v and ip_hl fields.
Diffstat (limited to 'sys/netinet/ip_icmp.h')
-rw-r--r--sys/netinet/ip_icmp.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/netinet/ip_icmp.h b/sys/netinet/ip_icmp.h
index 49bd819..fbbba92 100644
--- a/sys/netinet/ip_icmp.h
+++ b/sys/netinet/ip_icmp.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
- * $Id: ip_icmp.h,v 1.6 1996/01/19 01:19:08 fenner Exp $
+ * $Id: ip_icmp.h,v 1.7 1996/01/30 22:58:24 mpp Exp $
*/
#ifndef _NETINET_IP_ICMP_H_
@@ -123,8 +123,13 @@ struct icmp {
#define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */
#define ICMP_MASKLEN 12 /* address mask */
#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */
+#ifndef _IP_VHL
#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
/* N.B.: must separately check that ip_hl >= 5 */
+#else
+#define ICMP_ADVLEN(p) (8 + (IP_VHL_HL((p)->icmp_ip.ip_vhl) << 2) + 8)
+ /* N.B.: must separately check that header length >= 5 */
+#endif
/*
* Definition of type and code field values.
OpenPOWER on IntegriCloud