;;; -*- Mode:Lisp; Readtable:T; Package:USER; Base:10; Patch-File:T -*-
;;; Private patches made by GJC
;;; Reason:
;;;  private patch (on local disk) of tcp-kernel patch for excelan chaosnet
;;; Written 1-Aug-85 17:45:51 by GJC,
;;; while running on Lambda Six from band 3
;;; with System 102.157, Local-File 56.11, FILE-Server 13.2, Unix-Interface 5.6, MagTape 40.22, ZMail 57.10, Tiger 20.6, KERMIT 26.20, MEDIUM-RESOLUTION-COLOR 17.4, Experimental Sited 1.0, Experimental window-maker 1.0, Experimental MICRO-COMPILATION-TOOLS 4.0, Experimental TCP-User 57.0, Experimental TCP-Server 33.0, Experimental Object Lisp 4.0, Experimental vista 2.0, Experimental TCP-Kernel 30.0, Experimental LM-Prolog 1.0, microcode 772, Education 2x2+ good stuff.



; From file CHSOCKET.LISP#> TCP.KERNEL; LAMH: (17)
#10R TCP#:
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "TCP")))
  (COMPILER#:PATCH-SOURCE-FILE "TCP: KERNEL; CHSOCKET  "

(defun TEST-ENABLE-EXCELAN-CHAOS (&optional &key tcp-also 3com-also)
  "This function is for testing the use of Excelan board for chaosnet
protocols. Released code will require modifications to some code in CHSNCP."
  (WHEN (OWN-EXCELAN-BOARD-IF-POSSIBLE)
    ;; This causes 'OLD-LAMBDA-TRANSMIT-INT-PKT to transmit via our excelan code.
    (BASH-FUNCTION 'ETHERNET:SEND-INT-PKT-VIA-MULTIBUS-ETHERNET
		   'SEND-INT-PKT-VIA-EXOS-LINK)
    ;; This setting causes the chaos to ignore the 3COM board, a misnomer.
    (BASH-VARIABLE 'ETHERNET:*LAMBDA-HAS-ETHERNET*
		   (if 3com-also 'ETHERNET:*LAMBDA-HAS-ETHERNET*))
    ;; this reset/enable without microcode bashes yet more things.
    (CHAOS:RESET T :MICROCODE NIL)
    (TCP:START :ether t :enable-tcp tcp-also))
  ;; the setting of SI:*ETHERNET-HARDWARE-CONTROLLER* is required for
  ;; CHAOS:LAMBDA-TRANSMIT-INT-PKT to actually call a hardware transmit function.
  ;; According to the conventions in sys:sys;config and shared-device we
  ;; are not using the proper form of ownership number. It should be a
  ;; slot location of some sort, not a chaosnet address, oh well.
  (LET ((current-owner (si:%system-configuration-excelan-owner si:*sys-conf*)))
    (dolist (op (cons si:*my-op* si:*other-processors*))
      (and (= current-owner (si:%processor-conf-chaos-address (si:op-proc-conf op)))
	   (return (setq si:*ethernet-hardware-controller* op))))))

))
