change log for rtems (2011-02-24)
rtems-vc at rtems.org
rtems-vc at rtems.org
Thu Feb 24 07:10:22 UTC 2011
*ralf*:
2011-02-24 Ralf Corsépius <ralf.corsepius at rtems.org>
* libnetworking/netinet/in_systm.h,
libnetworking/netinet/tcp_debug.c,
libnetworking/netinet/tcp_debug.h, libnetworking/netinet/tcp_seq.h,
libnetworking/netinet/tcp_var.h, libnetworking/netinet/tcpip.h:
Misc changes from FreeBSD.
M 1.2740 cpukit/ChangeLog
M 1.4 cpukit/libnetworking/netinet/in_systm.h
M 1.3 cpukit/libnetworking/netinet/tcp_debug.h
M 1.9 cpukit/libnetworking/netinet/tcp_debug.c
M 1.4 cpukit/libnetworking/netinet/tcp_seq.h
M 1.11 cpukit/libnetworking/netinet/tcp_var.h
M 1.2 cpukit/libnetworking/netinet/tcpip.h
diff -u rtems/cpukit/ChangeLog:1.2739 rtems/cpukit/ChangeLog:1.2740
--- rtems/cpukit/ChangeLog:1.2739 Wed Feb 23 08:38:24 2011
+++ rtems/cpukit/ChangeLog Thu Feb 24 00:48:51 2011
@@ -1,3 +1,11 @@
+2011-02-24 Ralf Corsépius <ralf.corsepius at rtems.org>
+
+ * libnetworking/netinet/in_systm.h,
+ libnetworking/netinet/tcp_debug.c,
+ libnetworking/netinet/tcp_debug.h, libnetworking/netinet/tcp_seq.h,
+ libnetworking/netinet/tcp_var.h, libnetworking/netinet/tcpip.h:
+ Misc changes from FreeBSD.
+
2011-02-23 Ralf Corsépius <ralf.corsepius at rtems.org>
* libnetworking/net/if_pppvar.h: Add "extern C++" guards.
diff -u rtems/cpukit/libnetworking/netinet/in_systm.h:1.3 rtems/cpukit/libnetworking/netinet/in_systm.h:1.4
--- rtems/cpukit/libnetworking/netinet/in_systm.h:1.3 Sun Mar 25 11:39:36 2007
+++ rtems/cpukit/libnetworking/netinet/in_systm.h Thu Feb 24 00:48:52 2011
@@ -10,10 +10,6 @@
* 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
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -31,6 +27,9 @@
* SUCH DAMAGE.
*
* @(#)in_systm.h 8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/in_systm.h,v 1.13 2009/02/13 15:14:43 luigi Exp $
+ */
+/*
* $Id$
*/
@@ -50,13 +49,13 @@
* the bytes before transmission at each protocol level. The n_ types
* represent the types with the bytes in ``high-ender'' order.
*/
-typedef u_short n_short; /* short as received from the net */
-typedef u_long n_long; /* long as received from the net */
+typedef u_int16_t n_short; /* short as received from the net */
+typedef u_int32_t n_long; /* long as received from the net */
-typedef u_long n_time; /* ms since 00:00 GMT, byte rev */
+typedef u_int32_t n_time; /* ms since 00:00 GMT, byte rev */
#ifdef _KERNEL
-n_time iptime(void);
+uint32_t iptime(void);
#endif
#endif
diff -u rtems/cpukit/libnetworking/netinet/tcp_debug.h:1.2 rtems/cpukit/libnetworking/netinet/tcp_debug.h:1.3
--- rtems/cpukit/libnetworking/netinet/tcp_debug.h:1.2 Tue Apr 20 07:27:09 2004
+++ rtems/cpukit/libnetworking/netinet/tcp_debug.h Thu Feb 24 00:48:52 2011
@@ -10,10 +10,6 @@
* 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
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -31,6 +27,10 @@
* SUCH DAMAGE.
*
* @(#)tcp_debug.h 8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/tcp_debug.h,v 1.17 2009/02/13 15:14:43 luigi Exp $
+ */
+
+/*
* $Id$
*/
@@ -38,7 +38,7 @@
#define _NETINET_TCP_DEBUG_H_
struct tcp_debug {
- n_time td_time;
+ uint32_t td_time; /* network format */
short td_act;
short td_ostate;
caddr_t td_tcb;
@@ -47,14 +47,14 @@
struct tcpcb td_cb;
};
-#define TA_INPUT 0
+#define TA_INPUT 0
#define TA_OUTPUT 1
#define TA_USER 2
#define TA_RESPOND 3
#define TA_DROP 4
#ifdef TANAMES
-static char *tanames[] =
+static const char *tanames[] =
{ "input", "output", "user", "respond", "drop" };
#endif
diff -u rtems/cpukit/libnetworking/netinet/tcp_debug.c:1.8 rtems/cpukit/libnetworking/netinet/tcp_debug.c:1.9
--- rtems/cpukit/libnetworking/netinet/tcp_debug.c:1.8 Sun Mar 28 00:47:49 2010
+++ rtems/cpukit/libnetworking/netinet/tcp_debug.c Thu Feb 24 00:48:52 2011
@@ -34,6 +34,8 @@
#include "config.h"
#endif
+#include <rtems/bsd/sys/cdefs.h>
+#include "opt_inet.h"
#include "opt_tcpdebug.h"
#ifdef TCPDEBUG
@@ -45,39 +47,39 @@
#endif
#include <sys/param.h>
-#include <rtems/bsd/sys/queue.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
#include <sys/protosw.h>
-#include <errno.h>
-#include <net/route.h>
-#include <net/if.h>
+#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
-#include <netinet/in_pcb.h>
#include <netinet/ip_var.h>
#include <netinet/tcp.h>
#include <netinet/tcp_fsm.h>
-#include <netinet/tcp_seq.h>
#include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h>
#include <netinet/tcpip.h>
#include <netinet/tcp_debug.h>
#ifdef TCPDEBUG
-static int tcpconsdebug = 0; /* set to 1 to enable prints */
+static int tcpconsdebug = 0;
#endif
-static struct tcp_debug tcp_debug[TCP_NDEBUG];
-static int tcp_debx;
+/*
+ * Global ring buffer of TCP debugging state. Each entry captures a snapshot
+ * of TCP connection state at any given moment. tcp_debx addresses at the
+ * next available slot. There is no explicit export of this data structure;
+ * it will be read via /dev/kmem by debugging tools.
+ */
+static struct tcp_debug tcp_debug[TCP_NDEBUG];
+static int tcp_debx;
/*
- * Tcp debug routines
+ * Save TCP state at a given moment; optionally, both tcpcb and TCP packet
+ * header state will be saved.
*/
void
tcp_trace(short act, short ostate, struct tcpcb *tp, struct tcpiphdr *ti,
@@ -87,15 +89,16 @@
tcp_seq seq, ack;
int len, flags;
#endif
- struct tcp_debug *td = &tcp_debug[tcp_debx++];
+ struct tcp_debug *td;
+ td = &tcp_debug[tcp_debx++];
if (tcp_debx == TCP_NDEBUG)
tcp_debx = 0;
td->td_time = iptime();
td->td_act = act;
td->td_ostate = ostate;
td->td_tcb = (caddr_t)tp;
- if (tp)
+ if (tp != NULL)
td->td_cb = *tp;
else
bzero((caddr_t)&td->td_cb, sizeof (*tp));
@@ -107,13 +110,12 @@
#ifdef TCPDEBUG
if (tcpconsdebug == 0)
return;
- if (tp)
+ if (tp != NULL)
printf("%p %s:", tp, tcpstates[ostate]);
else
printf("???????? ");
printf("%s ", tanames[act]);
switch (act) {
-
case TA_INPUT:
case TA_OUTPUT:
case TA_DROP:
@@ -154,11 +156,11 @@
printf("<%s>", tcptimers[req>>8]);
break;
}
- if (tp)
+ if (tp != NULL)
printf(" -> %s", tcpstates[tp->t_state]);
/* print out internal state of tp !?! */
printf("\n");
- if (tp == 0)
+ if (tp == NULL)
return;
printf("\trcv_(nxt,wnd,up) (%x,%x,%x) snd_(una,nxt,max) (%x,%x,%x)\n",
tp->rcv_nxt, tp->rcv_wnd, tp->rcv_up, tp->snd_una, tp->snd_nxt,
diff -u rtems/cpukit/libnetworking/netinet/tcp_seq.h:1.3 rtems/cpukit/libnetworking/netinet/tcp_seq.h:1.4
--- rtems/cpukit/libnetworking/netinet/tcp_seq.h:1.3 Wed Aug 30 12:20:33 2006
+++ rtems/cpukit/libnetworking/netinet/tcp_seq.h Thu Feb 24 00:48:52 2011
@@ -10,10 +10,6 @@
* 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
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -31,6 +27,10 @@
* SUCH DAMAGE.
*
* @(#)tcp_seq.h 8.3 (Berkeley) 6/21/95
+ * $FreeBSD: src/sys/netinet/tcp_seq.h,v 1.26 2006/06/18 14:24:12 andre Exp $
+ */
+
+/*
* $Id$
*/
diff -u rtems/cpukit/libnetworking/netinet/tcp_var.h:1.10 rtems/cpukit/libnetworking/netinet/tcp_var.h:1.11
--- rtems/cpukit/libnetworking/netinet/tcp_var.h:1.10 Mon Sep 1 01:33:59 2008
+++ rtems/cpukit/libnetworking/netinet/tcp_var.h Thu Feb 24 00:48:52 2011
@@ -185,12 +185,6 @@
tcp_cc tao_cc; /* latest CC in valid SYN */
tcp_cc tao_ccsent; /* latest CC sent to peer */
u_short tao_mssopt; /* peer's cached MSS */
-#ifdef notyet
- u_short tao_flags; /* cache status flags */
-#define TAOF_DONT 0x0001 /* peer doesn't understand rfc1644 */
-#define TAOF_OK 0x0002 /* peer does understand rfc1644 */
-#define TAOF_UNDEF 0 /* we don't know yet */
-#endif /* notyet */
};
#define rmx_taop(r) ((struct rmxp_tao *)(r).rmx_filler)
diff -u rtems/cpukit/libnetworking/netinet/tcpip.h:1.1 rtems/cpukit/libnetworking/netinet/tcpip.h:1.2
--- rtems/cpukit/libnetworking/netinet/tcpip.h:1.1 Wed Aug 19 16:32:22 1998
+++ rtems/cpukit/libnetworking/netinet/tcpip.h Thu Feb 24 00:48:52 2011
@@ -10,10 +10,6 @@
* 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
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -31,6 +27,10 @@
* SUCH DAMAGE.
*
* @(#)tcpip.h 8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/tcpip.h,v 1.12.22.1.4.1 2010/06/14 02:09:06 kensmith Exp $
+ */
+
+/*
* $Id$
*/
@@ -41,19 +41,9 @@
* Tcp+ip header, after ip options removed.
*/
struct tcpiphdr {
- struct ipovly ti_i; /* overlaid ip structure */
- struct tcphdr ti_t; /* tcp header */
-};
-#ifdef notyet
-/*
- * Tcp+ip header, after ip options removed but including TCP options.
- */
-struct full_tcpiphdr {
- struct ipovly ti_i; /* overlaid ip structure */
+ struct ipovly ti_i; /* overlaid ip structure */
struct tcphdr ti_t; /* tcp header */
- char ti_o[TCP_MAXOLEN]; /* space for tcp options */
};
-#endif /* notyet */
#define ti_next ti_i.ih_next
#define ti_prev ti_i.ih_prev
#define ti_x1 ti_i.ih_x1
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110224/0f4b3f72/attachment.html>
More information about the vc
mailing list