[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7958 - usrp2/trunk/host/lib
From: |
eb |
Subject: |
[Commit-gnuradio] r7958 - usrp2/trunk/host/lib |
Date: |
Fri, 7 Mar 2008 13:39:54 -0700 (MST) |
Author: eb
Date: 2008-03-07 13:39:54 -0700 (Fri, 07 Mar 2008)
New Revision: 7958
Modified:
usrp2/trunk/host/lib/usrp2_basic.cc
usrp2/trunk/host/lib/usrp2_basic.h
Log:
set sequence numbers
Modified: usrp2/trunk/host/lib/usrp2_basic.cc
===================================================================
--- usrp2/trunk/host/lib/usrp2_basic.cc 2008-03-07 19:59:28 UTC (rev 7957)
+++ usrp2/trunk/host/lib/usrp2_basic.cc 2008-03-07 20:39:54 UTC (rev 7958)
@@ -41,7 +41,7 @@
usrp2_basic::usrp2_basic()
- : d_ethernet(new GRI_ETHERNET()), d_pf(0)
+ : d_ethernet(new GRI_ETHERNET()), d_pf(0), d_seqno(0)
{
assert(sizeof(u2_eth_samples_t) == (size_t) MAX_PKTLEN);
}
@@ -396,6 +396,11 @@
init_et_hdrs(p, dst);
u2p_set_word0(&p->fixed, 0, chan);
u2p_set_timestamp(&p->fixed, timestamp);
+
+ if (chan == CONTROL_CHAN){ // no sequence numbers, back it out
+ p->thdr.seqno = 0;
+ d_seqno--;
+ }
}
void
@@ -406,7 +411,7 @@
memcpy(&p->ehdr.src, d_ethernet->mac(), 6);
p->thdr.flags = 0; // FIXME transport header values?
- p->thdr.seqno = 0;
+ p->thdr.seqno = d_seqno++;
p->thdr.ack = 0;
}
Modified: usrp2/trunk/host/lib/usrp2_basic.h
===================================================================
--- usrp2/trunk/host/lib/usrp2_basic.h 2008-03-07 19:59:28 UTC (rev 7957)
+++ usrp2/trunk/host/lib/usrp2_basic.h 2008-03-07 20:39:54 UTC (rev 7958)
@@ -34,6 +34,7 @@
{
GRI_ETHERNET *d_ethernet;
gri_pktfilter *d_pf;
+ int d_seqno;
void init_et_hdrs(u2_eth_packet_t *p, const u2_mac_addr_t &dst);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7958 - usrp2/trunk/host/lib,
eb <=