]> git.proxmox.com Git - qemu.git/blobdiff - slirp/ip_icmp.h
Merge remote-tracking branch 'bonzini/scsi-next' into staging
[qemu.git] / slirp / ip_icmp.h
index 7ddaaf8f372ccb82fd743023ec9233d5c890bb24..be4426b8e78b5d515f2f27057ba17da77b12fa4b 100644 (file)
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -42,7 +38,7 @@
  * Per RFC 792, September 1981.
  */
 
-typedef u_int32_t n_time;
+typedef uint32_t n_time;
 
 /*
  * Structure of an icmp header.
@@ -83,8 +79,8 @@ struct icmp {
                        struct ip idi_ip;
                        /* options and then 64 bits of data */
                } id_ip;
-               u_long  id_mask;
-               char    id_data[1];
+               uint32_t        id_mask;
+               char            id_data[1];
        } icmp_dun;
 #define        icmp_otime      icmp_dun.id_ts.its_otime
 #define        icmp_rtime      icmp_dun.id_ts.its_rtime
@@ -96,8 +92,8 @@ struct icmp {
 
 /*
  * Lower bounds on packet lengths for various types.
- * For the error advice packets must first insure that the
- * packet is large enought to contain the returned ip header.
+ * For the error advice packets must first ensure that the
+ * packet is large enough to contain the returned ip header.
  * Only then can we do the check to see if 64 bits of packet
  * data have been returned, since we need to check the returned
  * ip header length.
@@ -157,8 +153,13 @@ struct icmp {
        (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
        (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
 
-void icmp_input _P((struct mbuf *, int));
-void icmp_error _P((struct mbuf *, u_char, u_char, int, char *));
-void icmp_reflect _P((struct mbuf *));
+void icmp_init(Slirp *slirp);
+void icmp_cleanup(Slirp *slirp);
+void icmp_input(struct mbuf *, int);
+void icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize,
+                const char *message);
+void icmp_reflect(struct mbuf *);
+void icmp_receive(struct socket *so);
+void icmp_detach(struct socket *so);
 
 #endif