(By Sklower) checkpoint the current state of Cherenson's work.
[unix-history] / usr / src / sys / netinet / ip_icmp.h
index fea5496..c65adc7 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)ip_icmp.h   7.5 (Berkeley) %G%
+ *     @(#)ip_icmp.h   7.6 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -27,12 +27,20 @@ struct icmp {
                        n_short icd_seq;
                } ih_idseq;
                int ih_void;
                        n_short icd_seq;
                } ih_idseq;
                int ih_void;
+
+               /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
+               struct ih_pmtu {
+                       n_short ipm_void;    
+                       n_short ipm_nextmtu;
+               } ih_pmtu;
        } icmp_hun;
 #define        icmp_pptr       icmp_hun.ih_pptr
 #define        icmp_gwaddr     icmp_hun.ih_gwaddr
 #define        icmp_id         icmp_hun.ih_idseq.icd_id
 #define        icmp_seq        icmp_hun.ih_idseq.icd_seq
 #define        icmp_void       icmp_hun.ih_void
        } icmp_hun;
 #define        icmp_pptr       icmp_hun.ih_pptr
 #define        icmp_gwaddr     icmp_hun.ih_gwaddr
 #define        icmp_id         icmp_hun.ih_idseq.icd_id
 #define        icmp_seq        icmp_hun.ih_idseq.icd_seq
 #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
        union {
                struct id_ts {
                        n_time its_otime;
        union {
                struct id_ts {
                        n_time its_otime;
@@ -80,6 +88,13 @@ struct icmp {
 #define                ICMP_UNREACH_PORT       3               /* bad port */
 #define                ICMP_UNREACH_NEEDFRAG   4               /* IP_DF caused drop */
 #define                ICMP_UNREACH_SRCFAIL    5               /* src route failed */
 #define                ICMP_UNREACH_PORT       3               /* bad port */
 #define                ICMP_UNREACH_NEEDFRAG   4               /* IP_DF caused drop */
 #define                ICMP_UNREACH_SRCFAIL    5               /* src route failed */
+#define                ICMP_UNREACH_NET_UNKNOWN 6              /* unknown net */
+#define                ICMP_UNREACH_HOST_UNKNOWN 7             /* unknown host */
+#define                ICMP_UNREACH_ISOLATED   8               /* src host isolated */
+#define                ICMP_UNREACH_NET_PROHIB 9               /* prohibited access */
+#define                ICMP_UNREACH_HOST_PROHIB 10             /* ditto */
+#define                ICMP_UNREACH_TOSNET     11              /* bad tos for net */
+#define                ICMP_UNREACH_TOSHOST    12              /* bad tos for host */
 #define        ICMP_SOURCEQUENCH       4               /* packet lost, slow down */
 #define        ICMP_REDIRECT           5               /* shorter route, codes: */
 #define                ICMP_REDIRECT_NET       0               /* for network */
 #define        ICMP_SOURCEQUENCH       4               /* packet lost, slow down */
 #define        ICMP_REDIRECT           5               /* shorter route, codes: */
 #define                ICMP_REDIRECT_NET       0               /* for network */
@@ -87,10 +102,13 @@ struct icmp {
 #define                ICMP_REDIRECT_TOSNET    2               /* for tos and net */
 #define                ICMP_REDIRECT_TOSHOST   3               /* for tos and host */
 #define        ICMP_ECHO               8               /* echo service */
 #define                ICMP_REDIRECT_TOSNET    2               /* for tos and net */
 #define                ICMP_REDIRECT_TOSHOST   3               /* for tos and host */
 #define        ICMP_ECHO               8               /* echo service */
+#define        ICMP_ROUTERADVERT       9               /* router advertisement */
+#define        ICMP_ROUTERSOLICIT      10              /* router solicitation */
 #define        ICMP_TIMXCEED           11              /* time exceeded, code: */
 #define                ICMP_TIMXCEED_INTRANS   0               /* ttl==0 in transit */
 #define                ICMP_TIMXCEED_REASS     1               /* ttl==0 in reass */
 #define        ICMP_PARAMPROB          12              /* ip header bad */
 #define        ICMP_TIMXCEED           11              /* time exceeded, code: */
 #define                ICMP_TIMXCEED_INTRANS   0               /* ttl==0 in transit */
 #define                ICMP_TIMXCEED_REASS     1               /* ttl==0 in reass */
 #define        ICMP_PARAMPROB          12              /* ip header bad */
+#define                ICMP_PARAMPROB_OPTABSENT 1              /* req. opt. absent */
 #define        ICMP_TSTAMP             13              /* timestamp request */
 #define        ICMP_TSTAMPREPLY        14              /* timestamp reply */
 #define        ICMP_IREQ               15              /* information request */
 #define        ICMP_TSTAMP             13              /* timestamp request */
 #define        ICMP_TSTAMPREPLY        14              /* timestamp reply */
 #define        ICMP_IREQ               15              /* information request */
@@ -102,6 +120,7 @@ struct icmp {
 
 #define        ICMP_INFOTYPE(type) \
        ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
 
 #define        ICMP_INFOTYPE(type) \
        ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
+       (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
        (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
        (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
        (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
        (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
        (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
        (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)