1: #ifndef lint
   2: static char sccsid[] = "@(#)pnet.c	4.2 (Berkeley) 6/23/85";
   3: #endif
   4: 
   5: #include "../condevs.h"
   6: #ifdef PNET
   7: 
   8: /***
   9:  *	pnetopn(flds)
  10:  *
  11:  *	call remote machine via Purdue network
  12:  *	use dial string as host name, speed as socket number
  13:  *	- Steve Bellovin
  14:  */
  15: pnetopn(flds)
  16: char *flds[];
  17: {
  18:     int fd;
  19:     int socket;
  20:     register char *cp;
  21: 
  22:     fd = pnetfile();
  23:     DEBUG(4, "pnet fd - %d\n", fd);
  24:     if (fd < 0) {
  25:         logent("AVAILABLE DEVICE", "NO");
  26:         return CF_NODEV;
  27:     }
  28:     socket = 0;
  29:     for (cp = flds[F_CLASS]; *cp; cp++)
  30:         socket = 10*socket + (*cp - '0');
  31:     DEBUG(4, "socket - %d\n", socket);
  32:     if (setjmp(Sjbuf)) {
  33:         DEBUG(4, "pnet timeout  - %s\n", flds[F_PHONE]);
  34:         return CF_DIAL;
  35:     }
  36:     signal(SIGALRM, alarmtr);
  37:     DEBUG(4, "host - %s\n", flds[F_PHONE]);
  38:     alarm(15);
  39:     if (pnetscon(fd, flds[F_PHONE], socket) < 0) {
  40:         DEBUG(4, "pnet connect failed - %s\n", flds[F_PHONE]);
  41:         alarm(0);
  42:         return CF_DIAL;
  43:     }
  44:     alarm(0);
  45:     return fd;
  46: }
  47: #endif	PNET

Defined functions

pnetopn defined in line 15; never used

Defined variables

sccsid defined in line 2; never used
Last modified: 1987-02-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2788
Valid CSS Valid XHTML 1.0 Strict