BBN-Vax-TCP/src/util/netginit.c

Compare this file to the similar file:
Show the results in this format:

#define BBNNET
#include "netlib.h"
#include "net.h"
#include "con.h"

struct con con;
extern errno;

main(argc, argv)
int argc;
char *argv[];
{
	register fr;

	con.c_mode = CONCTL;
	con.c_sbufs = 0;
	con.c_rbufs = 0;
	con.c_timeo = 0;
	mkanyhost(con.c_fcon);
	mkanyhost(con.c_lcon);
	con.c_fport = 0;
	con.c_lport = 0;

	if ((fr = open("/dev/net/anyhost", &con)) < 0) 
        	ecmderr(errno, "Can't access network.\n");

	if (ioctl(fr, NETGINIT, 0) < 0)
		cmderr(errno, "Gateway init failed.\n");
}