commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r8545 - usrp2/trunk/host-ng/lib


From: jcorgan
Subject: [Commit-gnuradio] r8545 - usrp2/trunk/host-ng/lib
Date: Mon, 2 Jun 2008 13:27:19 -0600 (MDT)

Author: jcorgan
Date: 2008-06-02 13:27:15 -0600 (Mon, 02 Jun 2008)
New Revision: 8545

Modified:
   usrp2/trunk/host-ng/lib/ethernet.cc
   usrp2/trunk/host-ng/lib/ethernet.h
   usrp2/trunk/host-ng/lib/find.cc
   usrp2/trunk/host-ng/lib/pktfilter.cc
   usrp2/trunk/host-ng/lib/pktfilter.h
   usrp2/trunk/host-ng/lib/usrp2.cc
Log:
wip, misc. cleanup

Modified: usrp2/trunk/host-ng/lib/ethernet.cc
===================================================================
--- usrp2/trunk/host-ng/lib/ethernet.cc 2008-06-02 16:07:18 UTC (rev 8544)
+++ usrp2/trunk/host-ng/lib/ethernet.cc 2008-06-02 19:27:15 UTC (rev 8545)
@@ -17,7 +17,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include "ethernet.h"
@@ -37,6 +37,8 @@
 #include <netpacket/packet.h>
 #include <linux/filter.h>      // packet filter
 
+namespace usrp2 {
+
 static int
 open_packet_socket (std::string ifname, int protocol)
 {
@@ -196,3 +198,4 @@
   return true;
 }
 
+} // namespace usrp2

Modified: usrp2/trunk/host-ng/lib/ethernet.h
===================================================================
--- usrp2/trunk/host-ng/lib/ethernet.h  2008-06-02 16:07:18 UTC (rev 8544)
+++ usrp2/trunk/host-ng/lib/ethernet.h  2008-06-02 19:27:15 UTC (rev 8545)
@@ -22,6 +22,8 @@
 #include <string>
 #include <vector>
 
+namespace usrp2 {
+
 class pktfilter;
 
 /*!
@@ -103,4 +105,6 @@
   int write_packet (const void *buf, int buflen);
 };
 
+} // namespace usrp2
+
 #endif /* INCLUDED_USRP2_ETHERNET_H */

Modified: usrp2/trunk/host-ng/lib/find.cc
===================================================================
--- usrp2/trunk/host-ng/lib/find.cc     2008-06-02 16:07:18 UTC (rev 8544)
+++ usrp2/trunk/host-ng/lib/find.cc     2008-06-02 19:27:15 UTC (rev 8545)
@@ -112,7 +112,6 @@
     if (rp->op_id_reply.opcode != OP_ID_REPLY) // ignore
       continue;
 
-
     const uint8_t *mac = (const uint8_t *)&rp->op_id_reply.addr;
     char addr_buf[128];
     snprintf(addr_buf, sizeof(addr_buf), "%02x:%02x:%02x:%02x:%02x:%02x",
@@ -120,7 +119,7 @@
 
     props p;
     p.addr = std::string(addr_buf);  
-    p.hw_rev = rp->op_id_reply.hw_rev;
+    p.hw_rev = htons(rp->op_id_reply.hw_rev);
     memcpy(&p.fpga_md5sum, &rp->op_id_reply.fpga_md5sum, 
sizeof(p.fpga_md5sum));
     memcpy(&p.sw_md5sum, &rp->op_id_reply.sw_md5sum, sizeof(p.sw_md5sum));
     

Modified: usrp2/trunk/host-ng/lib/pktfilter.cc
===================================================================
--- usrp2/trunk/host-ng/lib/pktfilter.cc        2008-06-02 16:07:18 UTC (rev 
8544)
+++ usrp2/trunk/host-ng/lib/pktfilter.cc        2008-06-02 19:27:15 UTC (rev 
8545)
@@ -17,7 +17,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include "pktfilter.h"
@@ -33,6 +33,8 @@
 #include <linux/types.h>
 #include <linux/filter.h>      // packet filter
 
+namespace usrp2 {
+
 /*
  * This is all based on the Berkeley Packet Filter (BPF) as implemented on 
Linux.
  *
@@ -146,3 +148,5 @@
 
   return pf;
 }
+
+} // namespace usrp2

Modified: usrp2/trunk/host-ng/lib/pktfilter.h
===================================================================
--- usrp2/trunk/host-ng/lib/pktfilter.h 2008-06-02 16:07:18 UTC (rev 8544)
+++ usrp2/trunk/host-ng/lib/pktfilter.h 2008-06-02 19:27:15 UTC (rev 8545)
@@ -21,6 +21,8 @@
 
 struct sock_filter;
 
+namespace usrp2 {
+
 /*
  * \brief Compile programs for the Berkeley Packet Filter
  */
@@ -48,4 +50,6 @@
                                                const unsigned char *our_mac);
 };
 
+} // namespace usrp2
+
 #endif /* INCLUDED_USRP2_PKTFILTER_H */

Modified: usrp2/trunk/host-ng/lib/usrp2.cc
===================================================================
--- usrp2/trunk/host-ng/lib/usrp2.cc    2008-06-02 16:07:18 UTC (rev 8544)
+++ usrp2/trunk/host-ng/lib/usrp2.cc    2008-06-02 19:27:15 UTC (rev 8545)
@@ -41,8 +41,6 @@
 #define DEBUG_LOG(x)
 #endif
 
-#define U2_ETHERTYPE 0xBEEF
-
 namespace usrp2 {
 
 // --- Private implementation class -------------------------------------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]