improved debug output

This commit is contained in:
fros4943 2009-04-23 08:59:22 +00:00
parent 2768a96b9b
commit 11879f210c

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: NativeIPGateway.java,v 1.3 2008/12/17 12:15:43 fros4943 Exp $ * $Id: NativeIPGateway.java,v 1.4 2009/04/23 08:59:22 fros4943 Exp $
*/ */
package se.sics.cooja.plugins; package se.sics.cooja.plugins;
@ -70,6 +70,7 @@ import se.sics.cooja.Plugin;
import se.sics.cooja.PluginType; import se.sics.cooja.PluginType;
import se.sics.cooja.Simulation; import se.sics.cooja.Simulation;
import se.sics.cooja.interfaces.SerialPort; import se.sics.cooja.interfaces.SerialPort;
import se.sics.cooja.util.StringUtils;
@ClassDescription("Open Native IP Gateway") @ClassDescription("Open Native IP Gateway")
@PluginType(PluginType.MOTE_PLUGIN) @PluginType(PluginType.MOTE_PLUGIN)
@ -736,12 +737,11 @@ public class NativeIPGateway implements Plugin {
/* Sanity check outgoing data */ /* Sanity check outgoing data */
if (packetData.length < IP_HEADER_LEN) { if (packetData.length < IP_HEADER_LEN) {
/*logger.warn("Ignoring small packet: " + packetData.length);*/ /*logger.warn("Ignoring small packet:\n" + StringUtils.hexDump(packetData));*/
return; return;
} }
if (packetData[0] != 0x45) { if (packetData[0] != 0x45) {
/*logger.warn("Ignoring bad header:" + /*logger.warn("Ignoring bad header:\n" + StringUtils.hexDump(packetData));*/
" 0x" + Integer.toHexString(packetData[0]&0xFF));*/
return; return;
} }