#include "vii.h"

/* insulate the user from the network
*/

unsigned char *
net_init()
{
  unsigned char *vii_init();
  return (vii_init());
}

net_read(p, len)
	struct vii_hdr *p;
	unsigned len; {

	return vii_read(&p->vii_dst, len);
	}

net_write(p, ip, len)
	struct vii_hdr *p;
	long ip;
	unsigned len; {

	p->vii_dst = (char)((ip >> 24) & 0377);
	p->vii_src = 0;
	p->vii_ver = 2;
	p->vii_prot = 1;
	p->vii_rsd = 0;
	vii_write(&p->vii_dst, len + sizeof(struct vii_hdr));
	}
