--- l2_test.c 2001/09/28 14:28:41 1.28
+++ l2_test.c 2001/10/04 12:53:54 1.29
@@ -29,12 +29,6 @@
#include <stdio.h>
-#include <sys/types.h> /* following group of includes are for */
-#include <sys/socket.h> /* socket testing only */
-#include <netinet/in.h>
-#include <netdb.h> /* TODO: probably can be removed */
-#include <syslog.h> /* TODO: probably can be removed */
-
#include "l2.h"
static void die(char *fmt, ...)
@@ -150,8 +144,11 @@
die("failed to configure pipe channel");
#endif
- if (l2_channel_configure(chPipe, "mode,path", "shell", "$CRONOLOGDIR/cronolog -o $HOME/tmp/crono.log") != L2_OK)
- die("failed to configure pipe channel");
+ if (l2_channel_configure(chPipe, "execmode,path", "shell", "$CRONOLOGDIR/cronolog -o $HOME/tmp/crono.log") != L2_OK)
+ die("failed to configure pipe channel due to mode and path parameters");
+
+ if (l2_channel_configure(chPipe, "runtime", "continuous") != L2_OK)
+ die("failed to configure pipe channel due to continuous parameter");
if (l2_channel_open(chPipe) != L2_OK)
die("failed to open pipe channel");
@@ -168,12 +165,12 @@
die("failed to create socket channel");
if (l2_channel_configure(chSock, "protocol,ipversion,host,port",\
- IPPROTO_TCP, AF_INET, "localhost", 2002) != L2_OK)
- die("failed to configure socket ipv4 channel");
+ "tcp", "ipv4", "localhost", 2002) != L2_OK)
+ die("failed to configure socket tcp/ipv4 channel");
#if 0
if (l2_channel_configure(chSock, "protocol,ipversion,host,port",\
- IPPROTO_TCP, AF_INET6, "0:0:0:0:0:0:0:1", 2002) != L2_OK)
- die("failed to configure socket ipv6 channel");
+ "tcp", "ipv6", "0:0:0:0:0:0:0:1", 2002) != L2_OK)
+ die("failed to configure socket tcp/ipv6 channel");
#endif
if (l2_channel_open(chSock) != L2_OK)
die("failed to open socket channel");
|