From d9db1417ad554db7cbc6c29b834e17727da14c4c Mon Sep 17 00:00:00 2001 From: fenner Date: Fri, 19 Jan 1996 01:19:08 +0000 Subject: Add definitions for ICMP router discovery. Reviewed by: wollman --- sys/netinet/ip_icmp.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'sys/netinet/ip_icmp.h') diff --git a/sys/netinet/ip_icmp.h b/sys/netinet/ip_icmp.h index 8de1a69..a538899 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.4 1995/05/30 08:09:43 rgrimes Exp $ + * $Id: ip_icmp.h,v 1.5 1995/11/14 20:34:13 phk Exp $ */ #ifndef _NETINET_IP_ICMP_H_ @@ -43,6 +43,14 @@ */ /* + * Internal of an ICMP Router Advertisement + */ +struct icmp_ra_addr { + u_int32_t ira_addr; + u_int32_t ira_preference; +}; + +/* * Structure of an icmp header. */ struct icmp { @@ -63,6 +71,12 @@ struct icmp { n_short ipm_void; n_short ipm_nextmtu; } ih_pmtu; + + struct ih_rtradv { + u_char irt_num_addrs; + u_char irt_wpa; + u_int16_t irt_lifetime; + } ih_rtradv; } icmp_hun; #define icmp_pptr icmp_hun.ih_pptr #define icmp_gwaddr icmp_hun.ih_gwaddr @@ -71,6 +85,9 @@ struct icmp { #define icmp_void icmp_hun.ih_void #define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void #define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu +#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs +#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa +#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime union { struct id_ts { n_time its_otime; @@ -81,6 +98,7 @@ struct icmp { struct ip idi_ip; /* options and then 64 bits of data */ } id_ip; + struct icmp_ra_addr id_radv; u_long id_mask; char id_data[1]; } icmp_dun; @@ -88,6 +106,7 @@ struct icmp { #define icmp_rtime icmp_dun.id_ts.its_rtime #define icmp_ttime icmp_dun.id_ts.its_ttime #define icmp_ip icmp_dun.id_ip.idi_ip +#define icmp_radv icmp_dun.id_radv #define icmp_mask icmp_dun.id_mask #define icmp_data icmp_dun.id_data }; -- cgit v1.1