summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking/netinet/ip_icmp.h
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-02-24 14:57:34 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-02-24 14:57:34 +0000
commitee7f2f7bcc468caeda77c0de0defd0d5f6cdaa18 (patch)
tree05943ac52680a6cc59bef2a4fd611571387e6306 /cpukit/libnetworking/netinet/ip_icmp.h
parent2011-02-24 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-ee7f2f7bcc468caeda77c0de0defd0d5f6cdaa18.tar.bz2
2011-02-24 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/netinet/ip_icmp.c, libnetworking/netinet/ip_icmp.h: Misc. changes from FreeBSD. * libnetworking/netinet/tcp_var.h: Include <netinet/tcp_timer.h>.
Diffstat (limited to 'cpukit/libnetworking/netinet/ip_icmp.h')
-rw-r--r--cpukit/libnetworking/netinet/ip_icmp.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/cpukit/libnetworking/netinet/ip_icmp.h b/cpukit/libnetworking/netinet/ip_icmp.h
index 1a763de365..655e687b62 100644
--- a/cpukit/libnetworking/netinet/ip_icmp.h
+++ b/cpukit/libnetworking/netinet/ip_icmp.h
@@ -54,22 +54,22 @@ struct icmp_ra_addr {
* Structure of an icmp header.
*/
struct icmp {
- u_char icmp_type; /* type of message, see below */
- u_char icmp_code; /* type sub code */
- u_short icmp_cksum; /* ones complement cksum of struct */
+ u_char icmp_type; /* type of message, see below */
+ u_char icmp_code; /* type sub code */
+ u_short icmp_cksum; /* ones complement cksum of struct */
union {
u_char ih_pptr; /* ICMP_PARAMPROB */
struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
struct ih_idseq {
- n_short icd_id;
- n_short icd_seq;
+ uint16_t icd_id; /* network format */
+ uint16_t icd_seq; /* network format */
} ih_idseq;
int ih_void;
/* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
struct ih_pmtu {
- n_short ipm_void;
- n_short ipm_nextmtu;
+ uint16_t ipm_void; /* network format */
+ uint16_t ipm_nextmtu; /* network format */
} ih_pmtu;
struct ih_rtradv {
@@ -90,16 +90,20 @@ struct icmp {
#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
union {
struct id_ts { /* ICMP Timestamp */
- n_time its_otime; /* Originate */
- n_time its_rtime; /* Receive */
- n_time its_ttime; /* Transmit */
+ /*
+ * The next 3 fields are in network format,
+ * milliseconds since 00:00 GMT
+ */
+ uint32_t its_otime; /* Originate */
+ uint32_t its_rtime; /* Receive */
+ uint32_t its_ttime; /* Transmit */
} id_ts;
struct id_ip {
struct ip idi_ip;
/* options and then 64 bits of data */
} id_ip;
struct icmp_ra_addr id_radv;
- u_int32_t id_mask;
+ u_int32_t id_mask;
char id_data[1];
} icmp_dun;
#define icmp_otime icmp_dun.id_ts.its_otime
@@ -120,7 +124,7 @@ struct icmp {
* ip header length.
*/
#define ICMP_MINLEN 8 /* abs minimum */
-#define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */
+#define ICMP_TSLEN (8 + 3 * sizeof (uint32_t)) /* timestamp */
#define ICMP_MASKLEN 12 /* address mask */
#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */
#ifndef _IP_VHL