;;; -*- Mode:Lisp; Readtable:CL; Package:USER; Base:10; Patch-File:T -*-
;;; Patch file for System version 123.216
;;; Reason:
;;;  Fix typo that kept you from Inspecting a transport protocol from Peek.
;;; Written 20-Mar-88 19:37:48 by pld at site Gigamos Cambridge
;;; while running on Djinn from band 2
;;; with Experimental System 123.182, Experimental Local-File 73.3, Experimental FILE-Server 22.1, Experimental Unix-Interface 11.0, Experimental Tape 18.0, Experimental KERMIT 34.3, Experimental ZMail 71.0, Experimental Lambda-Diag 15.0, microcode 1754, SDU ROM 8.



; From modified file DJ: L.NETWORK.KERNEL; NETSTAT.LISP#104 at 20-Mar-88 19:37:49
#10R NETWORK#: 
(COMPILER-LET ((*PACKAGE* (GLOBAL:PKG-FIND-PACKAGE "NETWORK")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: NETWORK; KERNEL; NETSTAT  "

(defun peek-transport-protocol (protocol &aux (tp (cdr protocol)))
  (list `( :PRE-PROCESS-FUNCTION peek-network-insert-tp-special-fields
	  :stream ,tp)
	(tv:scroll-parse-item
	  :leader 2
	  `(:MOUSE-ITEM
	     (NIL :MENU-CHOOSE
		  ("Transport protocol Operations"
		   ("Close" :EVAL (when (tv:mouse-y-or-n-p "Close this transport protocol")
				    (funcall tp :close))
		    :DOCUMENTATION
		    "Click left to close this transport protocol.")
		   ("Reset" :EVAL (when (tv:mouse-y-or-n-p "Reset this transport protocol")
				    (funcall tp :reset))
		    :DOCUMENTATION
		    "Click left to reset this transport protocol.")
		   ("Inspect" :EVAL (send tv:selected-window :force-kbd-input `(inspect ,tp))
		    :DOCUMENTATION
		    "Click left to INSPECT this transport protocol.")
		   ("Describe" :EVAL (send tv:selected-window :force-kbd-input `(describe ,tp))
		    :DOCUMENTATION
		    "Click left to DESCRIBE this transport protocol.")
		   ("Normal" :eval (transport-protocol-level tv:item :normal)
		    :documentation
		    "Click left to choose normal display for this transport protocol.")
		   ("Verbose" :eval (transport-protocol-level tv:item :verbose)
		    :documentation
		    "Click left to choose verbose display for this transport protocol."))
		  :DOCUMENTATION
		  "Menu of things to do to this transport protocol."
		  :BINDINGS
		  ((tp ',tp)))
	     :FUNCTION tp-keyword (,tp) NIL (" Transport protocol ~A"))
	  `(:function tp-type (,tp) NIL (" (~D) is "))
	  `(:mouse-item
	     (nil :buttons
		  ,(make-list 3 :initial-element
			      `(nil :eval (funcall tp (if (tp-enabled tp) :disable :enable))
				    :bindings ((tp ',tp))))
		  :DOCUMENTATION
		  "Click to toggle state of transport protocol"
		  :BINDINGS
		  ((tp ',tp)))
	     :function tp-enabled (,tp) NIL ("~:[dis~;en~]abled"))
	  `(:function peek-check-tp-next-identification (,tp) NIL ("~@[ with next packet identifier ~D~]"))
	  ",  "
	  `(:mouse-item
	     (nil :buttons
		  ((nil :eval (funcall tp (if (tp-active-gauges tp) :kill-gauges :make-gauges))
			:bindings ((tp ',tp)))
		   (nil :eval (ignore))
		   (nil :eval (gauge-menu tp (tp-active-gauges tp))
			:bindings ((tp ',tp))))
		  :documentation
		  "Click left for default, right for menu"
		  ((tp ',tp)))
	     :function ,#'(lambda (n) (mapcar 'car (tp-active-gauges n))) (,tp) NIL ("Gauges: ~A")))))

))
