chiark / gitweb /
More support scripts and other cool stuff.
[tripe] / tun-slip.c
index 2d94033..2b74a77 100644 (file)
@@ -110,7 +110,7 @@ static void t_read(int fd, unsigned mode, void *v)
     return;
   }
   IF_TRACING(T_TUNNEL, {
-    trace_block(T_PACKET, "tunnel: SLIP-encapsulated data",
+    trace_block(T_PACKET, "tun-slip: SLIP-encapsulated data",
                buf_t, n);
   })
 
@@ -128,11 +128,11 @@ static void t_read(int fd, unsigned mode, void *v)
        else if (st & ST_ESC)
          a_warn("TUN %s slip escape-end", t->sl->name);
        else if (q == t->buf) {
-         T( trace(T_TUNNEL, "tunnel: empty packet"); )
+         T( trace(T_TUNNEL, "tun-slip: empty packet"); )
        } else {
          IF_TRACING(T_TUNNEL, {
-           trace(T_TUNNEL, "tunnel: packet arrived");
-           trace_block(T_PACKET, "tunnel: packet contents",
+           trace(T_TUNNEL, "tun-slip: packet arrived");
+           trace_block(T_PACKET, "tun-slip: packet contents",
                        t->buf, q - t->buf);
          })
          buf_init(&b, t->buf, q - t->buf);
@@ -208,7 +208,7 @@ static void t_init(void)
   for (;;) {
     if (*p == '/' || *p == '.') {
       slipcmd = p;
-      T( trace(T_TUNNEL, "tunnel: declared slip command `%s'", slipcmd); )
+      T( trace(T_TUNNEL, "tun-slip: declared slip command `%s'", slipcmd); )
       break;
     }
     uli = strtoul(p, &q, 0);
@@ -237,7 +237,7 @@ static void t_init(void)
     sl->name[n] = 0;
     *tail = sl;
     tail = &sl->next;
-    T( trace(T_TUNNEL, "tunnel: declared slipif %d,%d=%s",
+    T( trace(T_TUNNEL, "tun-slip: declared slipif %d,%d=%s",
             sl->ifd, sl->ofd, sl->name); )
     p = q + n + 1;
     if (!*p)
@@ -273,7 +273,7 @@ static tunnel *t_create(peer *p)
 
   for (sl = slipifs; sl; sl = sl->next) {
     if (!(sl->f & F_INUSE)) {
-      T( trace(T_TUNNEL, "tunnel: %s using static slipif %s",
+      T( trace(T_TUNNEL, "tun-slip: %s using static slipif %s",
               p_name(p), sl->name); )
       goto found;
     }
@@ -327,7 +327,7 @@ static tunnel *t_create(peer *p)
   sl->kid = kid;
   sl->next = 0;
   sl->f = F_DYNAMIC;
-  T( trace(T_TUNNEL, "tunnel: %s using dynamic slipif %s",
+  T( trace(T_TUNNEL, "tun-slip: %s using dynamic slipif %s",
           p_name(p), sl->name); )
   fdflags(pout[0], O_NONBLOCK, O_NONBLOCK, FD_CLOEXEC, FD_CLOEXEC);
   fdflags(pin[1], O_NONBLOCK, 0, FD_CLOEXEC, FD_CLOEXEC);
@@ -387,8 +387,8 @@ static void t_inject(tunnel *t, buf *b)
   octet *q;
 
   IF_TRACING(T_TUNNEL, {
-    trace(T_TUNNEL, "tunnel: inject decrypted packet");
-    trace_block(T_PACKET, "tunnel: packet contents", BBASE(b), BLEN(b));
+    trace(T_TUNNEL, "tun-slip: inject decrypted packet");
+    trace_block(T_PACKET, "tun-slip: packet contents", BBASE(b), BLEN(b));
   })
 
   q = buf;
@@ -402,7 +402,7 @@ static void t_inject(tunnel *t, buf *b)
   }
   *q++ = SL_END;
   IF_TRACING(T_TUNNEL, {
-    trace_block(T_PACKET, "tunnel: SLIP-encapsulated contents",
+    trace_block(T_PACKET, "tun-slip: SLIP-encapsulated contents",
                buf, q - buf);
   })
   write(t->sl->ofd, buf, q - buf);
@@ -428,7 +428,7 @@ static void t_destroy(tunnel *t)
     sl->f &= ~F_INUSE;
   }
   if (sl && (sl->f & F_DYNAMIC)) {
-    T( trace(T_TUNNEL, "tunnel: releasing dynamic slipif %s", sl->name); )
+    T( trace(T_TUNNEL, "tun-slip: releasing dynamic slipif %s", sl->name); )
     close(sl->ofd);
     close(sl->ifd);
     kill(sl->kid, SIGTERM);