#include <stdlib.h>
#include <stdio.h>
#include "misc.h"
#include "osdep.h"
#include "config.h"
#include <fcntl.h>
#include "starnet.h"

extern struct conf Scon;
extern OsCommPtr MyPrivate[NPORTS];

static void netshut(void);
extern void sleep_init(void);

void
start_network()
{
    int i;

    for (i = 0; i < NPORTS; i++)
	MyPrivate[i] = 0;
    if ((i = configure((char *)0, &Scon)) != 0) {
	FatalError("Net configure error %d\n", i);
    }
    i = Snetinit();
    switch (i) {
	case 0:
	    break;
	case -1:
	    FatalError("Packet driver not loaded\n");
	    break;
	case -3:
	    FatalError("Unsupported packet driver class %d\n", Scon.address);
	    break;
	default:
	    FatalError("Net error %d\n", i);
	    break;
    }
    sleep_init();
    atexit(netshut);
}

static void
netshut()
{
	fprintf(stderr, "Please wait while network is shut down...");
	fflush(stderr);
	Snetshut();
	fprintf(stderr, "\n");
}


// wg added

void
client_init(vec)
char *vec;
{
}

void
client_event(void *xe)
{
}

void
client_open(root)
void * root;
{
}

void
client_close()
{
}
