Subject: kern/778: adding support for DEC screend in kernel source
To: None <gnats-admin@NetBSD.ORG>
From: None <jrg@ic.ac.uk>
List: netbsd-bugs
Date: 02/03/1995 02:20:06
>Number:         778
>Category:       kern
>Synopsis:       patches required to kernel source for DEC screend
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Feb  3 02:20:05 1995
>Originator:     James R Grinter
>Organization:
"Centre for Computing Services, Imperial College"
>Release:        1.0
>Environment:
System: NetBSD watcher.cc.ic.ac.uk 1.0 NetBSD 1.0 (WATCHER) #4: Thu Jan 26 01:55:52 GMT 1995 jrg@watcher.cc.ic.ac.uk:/usr/sys/arch/i386/compile/WATCHER i386


>Description:

DEC's screend package (ftp.vix.com:/pub/vixie/screend*tar.Z) requires
minor additions to two kernel source files which will not affect
operation of the kernel (or indeed add to the compiled binary)
in any way unless screend is selected for a kernel configuration.

>How-To-Repeat:

n/a

>Fix:

Patches to the two files follow. I'm not sure if we're allowed
to distribute actual screend source files, but I'm going to
contribute my minor diffs to their source back to them.

To add the screend to the kernel, requires (for config, not sure
about config.new...) 'options GWSCREEN' and 'pseudo-device gwscreen'.


*** if.c.orig	Thu Feb  2 20:42:14 1995
--- if.c	Thu Feb  2 21:00:21 1995
***************
*** 46,51 ****
--- 46,60 ----
  #include <sys/ioctl.h>
  
  #include <net/if.h>
+  
+ #ifdef GWSCREEN
+ #include "types.h"
+ #include "../netinet/in.h"
+ #include "../netinet/in_systm.h"
+ #include "../netinet/ip.h"
+ #include "../net/gw_screen.h"
+ #endif
+  
  #include <net/if_dl.h>
  #include <net/if_types.h>
  
***************
*** 453,458 ****
--- 462,474 ----
  
  	switch (cmd) {
  
+ #ifdef GWSCREEN
+       case SIOCSCREENON:
+       case SIOCSCREEN:
+       case SIOCSCREENSTATS:
+               return (screen_control(so, cmd, data));
+ #endif
+ 
  	case SIOCGIFCONF:
  	case OSIOCGIFCONF:
  		return (ifconf(cmd, data));
*** ip_input.c.orig	Thu Feb  2 20:42:26 1995
--- ip_input.c	Thu Feb  2 21:01:10 1995
***************
*** 334,340 ****
--- 334,344 ----
  		ipstat.ips_cantforward++;
  		m_freem(m);
  	} else
+ #ifdef GWSCREEN
+               ip_forwardscreen(m, 0);
+ #else
  		ip_forward(m, 0);
+ #endif
  	goto next;
  
  ours:
***************
*** 819,826 ****
--- 823,836 ----
  		}
  	}
  	if (forward) {
+ #ifdef GWSCREEN
+               type = ICMP_UNREACH;
+               code = ICMP_UNREACH_SRCFAIL;
+               goto bad;
+ #else
  		ip_forward(m, 1);
  		return (1);
+ #endif
  	}
  	return (0);
  bad:
>Audit-Trail:
>Unformatted: