Make all ssh-msg structs inherit from a supertype.
This commit is contained in:
parent
69ee05d88c
commit
18fcb4cebd
|
@ -20,7 +20,8 @@
|
||||||
mpint-width
|
mpint-width
|
||||||
t:name-list)
|
t:name-list)
|
||||||
|
|
||||||
(provide (struct-out ssh-msg-kexinit)
|
(provide (struct-out ssh-msg)
|
||||||
|
(struct-out ssh-msg-kexinit)
|
||||||
(struct-out ssh-msg-kexdh-init)
|
(struct-out ssh-msg-kexdh-init)
|
||||||
(struct-out ssh-msg-kexdh-reply)
|
(struct-out ssh-msg-kexdh-reply)
|
||||||
(struct-out ssh-msg-disconnect)
|
(struct-out ssh-msg-disconnect)
|
||||||
|
@ -29,6 +30,8 @@
|
||||||
(struct-out ssh-msg-debug)
|
(struct-out ssh-msg-debug)
|
||||||
(struct-out ssh-msg-ignore))
|
(struct-out ssh-msg-ignore))
|
||||||
|
|
||||||
|
(struct ssh-msg () #:transparent)
|
||||||
|
|
||||||
(define decoder-map (make-hasheqv))
|
(define decoder-map (make-hasheqv))
|
||||||
|
|
||||||
(define-values (prop:ssh-message-encoder ssh-message-encoder? ssh-message-encoder)
|
(define-values (prop:ssh-message-encoder ssh-message-encoder? ssh-message-encoder)
|
||||||
|
@ -48,7 +51,7 @@
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((_ name type-byte-value (field-type field-name) ...)
|
((_ name type-byte-value (field-type field-name) ...)
|
||||||
(begin
|
(begin
|
||||||
(struct name (field-name ...)
|
(struct name ssh-msg (field-name ...)
|
||||||
#:transparent
|
#:transparent
|
||||||
#:property prop:ssh-message-encoder
|
#:property prop:ssh-message-encoder
|
||||||
(compute-ssh-message-encoder type-byte-value field-type ...))
|
(compute-ssh-message-encoder type-byte-value field-type ...))
|
||||||
|
|
Loading…
Reference in New Issue