Module Name: src
Committed By: matt
Date: Tue May 11 21:00:13 UTC 2010
Modified Files:
src/sys/net [matt-nb5-mips64]: if.h route.h
Log Message:
A few changes that make the route interface and related sysctls 32/64 bit
independent so the netbsd32 userland can use them.
To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.140.8.1 src/sys/net/if.h
cvs rdiff -u -r1.70.16.1 -r1.70.16.1.4.1 src/sys/net/route.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/net/if.h
diff -u src/sys/net/if.h:1.140 src/sys/net/if.h:1.140.8.1
--- src/sys/net/if.h:1.140 Fri Oct 24 17:07:33 2008
+++ src/sys/net/if.h Tue May 11 21:00:13 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: if.h,v 1.140 2008/10/24 17:07:33 dyoung Exp $ */
+/* $NetBSD: if.h,v 1.140.8.1 2010/05/11 21:00:13 matt Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -179,7 +179,11 @@
u_quad_t ifi_omcasts; /* packets sent via multicast */
u_quad_t ifi_iqdrops; /* dropped on input, this interface */
u_quad_t ifi_noproto; /* destined for unsupported protocol */
- struct timeval ifi_lastchange; /* last operational state change */
+ union {
+ struct timeval ifi_un_lastchange; /* last operational state change */
+ u_quad_t ifi_un_pad[2];
+ } ifi_un;
+#define ifi_lastchange ifi_un.ifi_un_lastchange
};
/*
Index: src/sys/net/route.h
diff -u src/sys/net/route.h:1.70.16.1 src/sys/net/route.h:1.70.16.1.4.1
--- src/sys/net/route.h:1.70.16.1 Fri Apr 3 17:59:03 2009
+++ src/sys/net/route.h Tue May 11 21:00:13 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: route.h,v 1.70.16.1 2009/04/03 17:59:03 snj Exp $ */
+/* $NetBSD: route.h,v 1.70.16.1.4.1 2010/05/11 21:00:13 matt Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -67,16 +67,16 @@
* retransmission behavior and are included in the routing structure.
*/
struct rt_metrics {
- u_long rmx_locks; /* Kernel must leave these values alone */
- u_long rmx_mtu; /* MTU for this path */
- u_long rmx_hopcount; /* max hops expected */
- u_long rmx_expire; /* lifetime for route, e.g. redirect */
- u_long rmx_recvpipe; /* inbound delay-bandwidth product */
- u_long rmx_sendpipe; /* outbound delay-bandwidth product */
- u_long rmx_ssthresh; /* outbound gateway buffer limit */
- u_long rmx_rtt; /* estimated round trip time */
- u_long rmx_rttvar; /* estimated rtt variance */
- u_long rmx_pksent; /* packets sent using this route */
+ u_quad_t rmx_locks; /* Kernel must leave these values alone */
+ u_quad_t rmx_mtu; /* MTU for this path */
+ u_quad_t rmx_hopcount; /* max hops expected */
+ u_quad_t rmx_expire; /* lifetime for route, e.g. redirect */
+ u_quad_t rmx_recvpipe; /* inbound delay-bandwidth product */
+ u_quad_t rmx_sendpipe; /* outbound delay-bandwidth product */
+ u_quad_t rmx_ssthresh; /* outbound gateway buffer limit */
+ u_quad_t rmx_rtt; /* estimated round trip time */
+ u_quad_t rmx_rttvar; /* estimated rtt variance */
+ u_quad_t rmx_pksent; /* packets sent using this route */
};
/*
@@ -179,11 +179,11 @@
int rtm_seq; /* for sender to identify action */
int rtm_errno; /* why failed */
int rtm_use; /* from rtentry */
- u_long rtm_inits; /* which metrics we are initializing */
+ u_quad_t rtm_inits; /* which metrics we are initializing */
struct rt_metrics rtm_rmx; /* metrics themselves */
};
-#define RTM_VERSION 3 /* Up the ante and ignore older versions */
+#define RTM_VERSION 4 /* Up the ante and ignore older versions */
#define RTM_ADD 0x1 /* Add Route */
#define RTM_DELETE 0x2 /* Delete Route */
@@ -241,7 +241,7 @@
#define RTAX_MAX 8 /* size of array to allocate */
#define RT_ROUNDUP(a) \
- ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
+ ((a) > 0 ? (1 + (((a) - 1) | (sizeof(u_quad_t) - 1))) : sizeof(u_quad_t))
#define RT_ADVANCE(x, n) (x += RT_ROUNDUP((n)->sa_len))
struct rt_addrinfo {