summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_icmp.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2009-02-13 15:14:43 +0000
committerluigi <luigi@FreeBSD.org>2009-02-13 15:14:43 +0000
commitf34bfbb6558e5ae7f3a4f0f1042c32586c685ba8 (patch)
treef9961350adcc7bd13c688e2b550c9447ac90cfaf /sys/netinet/ip_icmp.c
parenta15ded26375c05e9bab8d4e7df05af038de0f4fc (diff)
downloadFreeBSD-src-f34bfbb6558e5ae7f3a4f0f1042c32586c685ba8.zip
FreeBSD-src-f34bfbb6558e5ae7f3a4f0f1042c32586c685ba8.tar.gz
Use uint32_t instead of n_long and n_time, and uint16_t instead of n_short.
Add a note next to fields in network format. The n_* types are not enough for compiler checks on endianness, and their use often requires an otherwise unnecessary #include <netinet/in_systm.h> The typedef in in_systm.h are still there.
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r--sys/netinet/ip_icmp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 3666f5c..baf07d3 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -165,7 +165,7 @@ icmp_init(void)
* in response to bad packet ip.
*/
void
-icmp_error(struct mbuf *n, int type, int code, n_long dest, int mtu)
+icmp_error(struct mbuf *n, int type, int code, uint32_t dest, int mtu)
{
INIT_VNET_INET(curvnet);
register struct ip *oip = mtod(n, struct ip *), *nip;
@@ -852,7 +852,10 @@ icmp_send(struct mbuf *m, struct mbuf *opts)
(void) ip_output(m, opts, NULL, 0, NULL, NULL);
}
-n_time
+/*
+ * Return milliseconds since 00:00 GMT in network format.
+ */
+uint32_t
iptime(void)
{
struct timeval atv;
OpenPOWER on IntegriCloud