feat(bsr/ssh): Add file transfer direction to channel summary
When an SSH channel is used for a file transfer, the summary will report the detected direction of the file transfer as either an upload or download, relative to the end client.
This commit is contained in:
1 file changed
+15
-4
@@ -59,6 +59,16 @@ func ValidExecApplicationProgram(d ExecApplicationProgram) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// FileTransferDirection indicates the direction of a file transfer.
|
||||
type FileTransferDirection string
|
||||
|
||||
// Valid file transfer directions.
|
||||
const (
|
||||
FileTransferNotApplicable FileTransferDirection = "not applicable"
|
||||
FileTransferUpload FileTransferDirection = "upload"
|
||||
FileTransferDownload FileTransferDirection = "download"
|
||||
)
|
||||
|
||||
// ChannelSummary encapsulates data for a channel
|
||||
// SessionProgram can only be one of the following: exec, shell, or subsystem
|
||||
// SubsystemName is only populated if SessionProgram is subsystem
|
||||
@@ -66,8 +76,9 @@ func ValidExecApplicationProgram(d ExecApplicationProgram) bool {
|
||||
//
|
||||
// scp, rsync, or unknown
|
||||
type ChannelSummary struct {
|
||||
ChannelSummary *bsr.ChannelSummary
|
||||
SessionProgram SessionProgram
|
||||
SubsystemName string
|
||||
ExecProgram ExecApplicationProgram
|
||||
ChannelSummary *bsr.ChannelSummary
|
||||
SessionProgram SessionProgram
|
||||
SubsystemName string
|
||||
ExecProgram ExecApplicationProgram
|
||||
FileTransferDirection FileTransferDirection
|
||||
}
|
||||
Reference in new issue
Block a user