<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-02-24)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-24 Ralf Corsépius <ralf.corsepius@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.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2739&r2=text&tr2=1.2740&diff_format=h">M</a></td><td width='1%'>1.2740</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libnetworking/netinet/in_systm.h.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libnetworking/netinet/in_systm.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libnetworking/netinet/tcp_debug.h.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>cpukit/libnetworking/netinet/tcp_debug.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libnetworking/netinet/tcp_debug.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>cpukit/libnetworking/netinet/tcp_debug.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libnetworking/netinet/tcp_seq.h.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libnetworking/netinet/tcp_seq.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libnetworking/netinet/tcp_var.h.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</td><td width='100%'>cpukit/libnetworking/netinet/tcp_var.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libnetworking/netinet/tcpip.h.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>cpukit/libnetworking/netinet/tcpip.h</td></tr>
</table>
<pre>
<font color='#006600'>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
</font><font color='#997700'>@@ -1,3 +1,11 @@
</font><font color='#000088'>+2011-02-24    Ralf Corsépius <ralf.corsepius@rtems.org>
+
+       * libnetworking/netinet/in_systm.h,<span style="background-color: #FF0000"> </span>
+       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.
+
</font> 2011-02-23        Ralf Corsépius <ralf.corsepius@rtems.org>
 
        * libnetworking/net/if_pppvar.h: Add "extern C++" guards.

<font color='#006600'>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
</font><font color='#997700'>@@ -10,10 +10,6 @@
</font>  * 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.
<font color='#880000'>- * 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.
</font>  * 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.
<font color='#997700'>@@ -31,6 +27,9 @@
</font>  * SUCH DAMAGE.
  *
  *     @(#)in_systm.h  8.1 (Berkeley) 6/10/93
<font color='#000088'>+ * $FreeBSD: src/sys/netinet/in_systm.h,v 1.13 2009/02/13 15:14:43 luigi Exp $
+ */
+/*
</font>  * $Id$
  */
 
<font color='#997700'>@@ -50,13 +49,13 @@
</font>  * the bytes before transmission at each protocol level.  The n_ types
  * represent the types with the bytes in ``high-ender'' order.
  */
<font color='#880000'>-typedef u_short n_short;           /* short as received from the net */
-typedef u_long n_long;                 /* long as received from the net */
</font><font color='#000088'>+typedef u_int16_t n_short;            /* short as received from the net */
+typedef u_int32_t n_long;              /* long as received from the net */
</font> 
<font color='#880000'>-typedef    u_long  n_time;                 /* ms since 00:00 GMT, byte rev */
</font><font color='#000088'>+typedef       u_int32_t n_time;               /* ms since 00:00 GMT, byte rev */
</font> 
 #ifdef _KERNEL
<font color='#880000'>-n_time      iptime(void);
</font><font color='#000088'>+uint32_t       iptime(void);
</font> #endif
 
 #endif

<font color='#006600'>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
</font><font color='#997700'>@@ -10,10 +10,6 @@
</font>  * 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.
<font color='#880000'>- * 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.
</font>  * 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.
<font color='#997700'>@@ -31,6 +27,10 @@
</font>  * SUCH DAMAGE.
  *
  *     @(#)tcp_debug.h 8.1 (Berkeley) 6/10/93
<font color='#000088'>+ * $FreeBSD: src/sys/netinet/tcp_debug.h,v 1.17 2009/02/13 15:14:43 luigi Exp $
+ */
+
+/*
</font>  * $Id$
  */
 
<font color='#997700'>@@ -38,7 +38,7 @@
</font> #define   _NETINET_TCP_DEBUG_H_
 
 struct tcp_debug {
<font color='#880000'>-   n_time  td_time;
</font><font color='#000088'>+      uint32_t        td_time;        /* network format */
</font>   short   td_act;
        short   td_ostate;
        caddr_t td_tcb;
<font color='#997700'>@@ -47,14 +47,14 @@
</font>   struct  tcpcb td_cb;
 };
 
<font color='#880000'>-#define    TA_INPUT<span style="background-color: #FF0000"> </span>  0
</font><font color='#000088'>+#define       TA_INPUT        0
</font> #define   TA_OUTPUT       1
 #define        TA_USER         2
 #define        TA_RESPOND      3
 #define        TA_DROP         4
 
 #ifdef TANAMES
<font color='#880000'>-static char        *tanames[] =
</font><font color='#000088'>+static const char     *tanames[] =
</font>     { "input", "output", "user", "respond", "drop" };
 #endif
 

<font color='#006600'>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
</font><font color='#997700'>@@ -34,6 +34,8 @@
</font> #include "config.h"
 #endif
 
<font color='#000088'>+#include <rtems/bsd/sys/cdefs.h>
+#include "opt_inet.h"
</font> #include "opt_tcpdebug.h"
 
 #ifdef TCPDEBUG
<font color='#997700'>@@ -45,39 +47,39 @@
</font> #endif
 
 #include <sys/param.h>
<font color='#880000'>-#include <rtems/bsd/sys/queue.h>
</font> #include <sys/systm.h>
 #include <sys/mbuf.h>
<font color='#880000'>-#include <sys/socket.h>
-#include <sys/socketvar.h>
</font> #include <sys/protosw.h>
<font color='#880000'>-#include <errno.h>
</font> 
<font color='#880000'>-#include <net/route.h>
-#include <net/if.h>
</font><font color='#000088'>+#include <sys/socket.h>
</font> 
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
<font color='#880000'>-#include <netinet/in_pcb.h>
</font> #include <netinet/ip_var.h>
 #include <netinet/tcp.h>
 #include <netinet/tcp_fsm.h>
<font color='#880000'>-#include <netinet/tcp_seq.h>
</font> #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
 #include <netinet/tcpip.h>
 #include <netinet/tcp_debug.h>
 
 #ifdef TCPDEBUG
<font color='#880000'>-static int tcpconsdebug = 0; /* set to 1 to enable prints */
</font><font color='#000088'>+static int            tcpconsdebug = 0;
</font> #endif
 
<font color='#880000'>-static struct tcp_debug tcp_debug[TCP_NDEBUG];
-static int     tcp_debx;
</font><font color='#000088'>+/*
+ * 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;
</font> 
 /*
<font color='#880000'>- * Tcp debug routines
</font><font color='#000088'>+ * Save TCP state at a given moment; optionally, both tcpcb and TCP packet
+ * header state will be saved.
</font>  */
 void
 tcp_trace(short act, short ostate, struct tcpcb *tp, struct tcpiphdr *ti,
<font color='#997700'>@@ -87,15 +89,16 @@
</font>   tcp_seq seq, ack;
        int len, flags;
 #endif
<font color='#880000'>-   struct tcp_debug *td = &tcp_debug[tcp_debx++];
</font><font color='#000088'>+      struct tcp_debug *td;
</font> 
<font color='#000088'>+   td = &tcp_debug[tcp_debx++];
</font>   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;
<font color='#880000'>-   if (tp)
</font><font color='#000088'>+      if (tp != NULL)
</font>           td->td_cb = *tp;
        else
                bzero((caddr_t)&td->td_cb, sizeof (*tp));
<font color='#997700'>@@ -107,13 +110,12 @@
</font> #ifdef TCPDEBUG
        if (tcpconsdebug == 0)
                return;
<font color='#880000'>-   if (tp)
</font><font color='#000088'>+      if (tp != NULL)
</font>           printf("%p %s:", tp, tcpstates[ostate]);
        else
                printf("???????? ");
        printf("%s ", tanames[act]);
        switch (act) {
<font color='#880000'>-
</font>   case TA_INPUT:
        case TA_OUTPUT:
        case TA_DROP:
<font color='#997700'>@@ -154,11 +156,11 @@
</font>                   printf("<%s>", tcptimers[req>>8]);
                break;
        }
<font color='#880000'>-   if (tp)
</font><font color='#000088'>+      if (tp != NULL)
</font>           printf(" -> %s", tcpstates[tp->t_state]);
        /* print out internal state of tp !?! */
        printf("\n");
<font color='#880000'>-   if (tp == 0)
</font><font color='#000088'>+      if (tp == NULL)
</font>           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,

<font color='#006600'>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
</font><font color='#997700'>@@ -10,10 +10,6 @@
</font>  * 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.
<font color='#880000'>- * 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.
</font>  * 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.
<font color='#997700'>@@ -31,6 +27,10 @@
</font>  * SUCH DAMAGE.
  *
  *     @(#)tcp_seq.h   8.3 (Berkeley) 6/21/95
<font color='#000088'>+ * $FreeBSD: src/sys/netinet/tcp_seq.h,v 1.26 2006/06/18 14:24:12 andre Exp $
+ */
+<span style="background-color: #FF0000"> </span>
+/*
</font>  *        $Id$
  */
 

<font color='#006600'>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
</font><font color='#997700'>@@ -185,12 +185,6 @@
</font>   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 */
<font color='#880000'>-#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 */
</font> };
 #define rmx_taop(r)    ((struct rmxp_tao *)(r).rmx_filler)
 

<font color='#006600'>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
</font><font color='#997700'>@@ -10,10 +10,6 @@
</font>  * 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.
<font color='#880000'>- * 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.
</font>  * 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.
<font color='#997700'>@@ -31,6 +27,10 @@
</font>  * SUCH DAMAGE.
  *
  *     @(#)tcpip.h     8.1 (Berkeley) 6/10/93
<font color='#000088'>+ * $FreeBSD: src/sys/netinet/tcpip.h,v 1.12.22.1.4.1 2010/06/14 02:09:06 kensmith Exp $
+ */
+
+/*
</font>  * $Id$
  */
 
<font color='#997700'>@@ -41,19 +41,9 @@
</font>  * Tcp+ip header, after ip options removed.
  */
 struct tcpiphdr {
<font color='#880000'>-   struct<span style="background-color: #FF0000"> </span>    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<span style="background-color: #FF0000"> </span>    ipovly ti_i;            /* overlaid ip structure */
</font><font color='#000088'>+      struct  ipovly ti_i;            /* overlaid ip structure */
</font>   struct  tcphdr ti_t;            /* tcp header */
<font color='#880000'>-   char    ti_o[TCP_MAXOLEN];      /* space for tcp options */
</font> };
<font color='#880000'>-#endif /* notyet */
</font> #define   ti_next         ti_i.ih_next
 #define        ti_prev         ti_i.ih_prev
 #define        ti_x1           ti_i.ih_x1
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>