File:  [XINU] / xinu / sys / netout.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:39:03 2018 UTC (8 years, 2 months ago) by root
Branches: xinu, MAIN
CVS tags: xinu-19870308, HEAD
Xinu for VAX

/* netout.c - netout */

#include <conf.h>
#include <kernel.h>
#include <network.h>
#define  MNAMLEN  24		/* maximum size of this machine's name	*/

/*------------------------------------------------------------------------
 *  netout  -  start network by finding address and forward IP packets
 *------------------------------------------------------------------------
 */
PROCESS	netout(userpid, icmpp)
int	userpid;
int	icmpp;
{
	struct	epacket	*packet;
	struct	ip	*ipptr;
	long	tim;
	int	len;
	char	nam[MNAMLEN];
	IPaddr	addr;

	getaddr(addr);
	gettime(&tim);
	getname(nam);
	resume(userpid);
	while (TRUE) {
		packet = (struct epacket *) preceive(icmpp);
		ipptr = (struct ip *) packet->ep_data;
		blkcopy (addr, ipptr->i_dest, IPLEN);
		len = net2hs(ipptr->i_paclen) - IPHLEN;
		ipsend(addr, packet, len);
	}
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.