Start splitting out channel-related code
This commit is contained in:
parent
fd08fb0b74
commit
f857cfdbf9
|
@ -0,0 +1,43 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/set)
|
||||
(require racket/match)
|
||||
|
||||
(require "ssh-numbers.rkt")
|
||||
(require "ssh-message-types.rkt")
|
||||
(require "ssh-exceptions.rkt")
|
||||
|
||||
(require "os2-support.rkt")
|
||||
|
||||
(provide (struct-out ssh-channel))
|
||||
|
||||
;; A CloseState is one of
|
||||
;; - 'neither, indicating that neither side has signalled closure
|
||||
;; - 'local, only the local end has signalled closure
|
||||
;; - 'remote, only the remote end has signalled closure
|
||||
;; - 'both, both ends have signalled closure.
|
||||
;; Represents local knowledge of the state of a shared shutdown state
|
||||
;; machine.
|
||||
;;
|
||||
;; 'neither
|
||||
;; / \
|
||||
;; \/ \/
|
||||
;; 'local 'remote
|
||||
;; \ /
|
||||
;; \/ \/
|
||||
;; 'both
|
||||
|
||||
;; A ChannelState is a (ssh-channel ...) TODO
|
||||
;; Named ssh-channel to avoid conflicts with Racket's built-in
|
||||
;; synchronous channels.
|
||||
(struct ssh-channel (my-ref ;; Uint32
|
||||
your-ref ;; Maybe<Uint32>
|
||||
type ;; String
|
||||
continuations ;; TransactionManager (see ordered-rpc.rkt)
|
||||
outbound-window ;; Maybe<Natural>
|
||||
outbound-packet-size ;; Maybe<Natural>
|
||||
inbound-window ;; Natural
|
||||
eof-state ;; CloseState covering EOF signals
|
||||
close-state ;; CloseState covering CLOSE signals
|
||||
)
|
||||
#:transparent)
|
|
@ -68,37 +68,6 @@
|
|||
session-id) ;; starts off #f until initial keying
|
||||
#:transparent)
|
||||
|
||||
;; A CloseState is one of
|
||||
;; - 'neither, indicating that neither side has signalled closure
|
||||
;; - 'local, only the local end has signalled closure
|
||||
;; - 'remote, only the remote end has signalled closure
|
||||
;; - 'both, both ends have signalled closure.
|
||||
;; Represents local knowledge of the state of a shared shutdown state
|
||||
;; machine.
|
||||
;;
|
||||
;; 'neither
|
||||
;; / \
|
||||
;; \/ \/
|
||||
;; 'local 'remote
|
||||
;; \ /
|
||||
;; \/ \/
|
||||
;; 'both
|
||||
|
||||
;; A ChannelState is a (ssh-channel ...) TODO
|
||||
;; Named ssh-channel to avoid conflicts with Racket's built-in
|
||||
;; synchronous channels.
|
||||
(struct ssh-channel (my-ref ;; Uint32
|
||||
your-ref ;; Maybe<Uint32>
|
||||
type ;; String
|
||||
continuations ;; TransactionManager (see ordered-rpc.rkt)
|
||||
outbound-window ;; Maybe<Natural>
|
||||
outbound-packet-size ;; Maybe<Natural>
|
||||
inbound-window ;; Natural
|
||||
eof-state ;; CloseState covering EOF signals
|
||||
close-state ;; CloseState covering CLOSE signals
|
||||
)
|
||||
#:transparent)
|
||||
|
||||
;; Generic inputs into the exchange-hash part of key
|
||||
;; exchange. Diffie-Hellman uses these fields along with the host key,
|
||||
;; the exchange values, and the shared secret to get the final hash.
|
||||
|
|
Loading…
Reference in New Issue