]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - support/sdk/c/sflisten.c
removed
[tinyos-2.x.git] / support / sdk / c / sflisten.c
diff --git a/support/sdk/c/sflisten.c b/support/sdk/c/sflisten.c
deleted file mode 100644 (file)
index 845780c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "sfsource.h"
-
-int main(int argc, char **argv)
-{
-  int fd;
-
-  if (argc != 3)
-    {
-      fprintf(stderr, "Usage: %s <host> <port> - dump packets from a serial forwarder\n", argv[0]);
-      exit(2);
-    }
-  fd = open_sf_source(argv[1], atoi(argv[2]));
-  if (fd < 0)
-    {
-      fprintf(stderr, "Couldn't open serial forwarder at %s:%s\n",
-             argv[1], argv[2]);
-      exit(1);
-    }
-  for (;;)
-    {
-      int len, i;
-      const unsigned char *packet = read_sf_packet(fd, &len);
-
-      if (!packet)
-       exit(0);
-      for (i = 0; i < len; i++)
-       printf("%02x ", packet[i]);
-      putchar('\n');
-      fflush(stdout);
-      free((void *)packet);
-    }
-}