mirror of
https://github.com/Astatin3/unshell-nodes-rs.git
synced 2026-06-09 00:28:00 -06:00
31 lines
570 B
Rust
31 lines
570 B
Rust
|
|
use bincode::{Decode, Encode};
|
||
|
|
use std::fmt::Debug;
|
||
|
|
|
||
|
|
#[derive(Debug, Encode, Decode, Clone)]
|
||
|
|
pub enum TransportLayerPacket {
|
||
|
|
RequestStreamUnrouted {
|
||
|
|
stream_id: usize,
|
||
|
|
},
|
||
|
|
AckStreamUnrouted {
|
||
|
|
local_stream_id: usize,
|
||
|
|
remote_stream_id: usize,
|
||
|
|
},
|
||
|
|
StreamDataUnrouted {
|
||
|
|
stream_id: usize,
|
||
|
|
data: Vec<u8>,
|
||
|
|
},
|
||
|
|
|
||
|
|
SpontaniousDataUnrouted {
|
||
|
|
data: Vec<u8>,
|
||
|
|
},
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Encode, Decode, Clone)]
|
||
|
|
pub enum C2Packet {
|
||
|
|
Ping,
|
||
|
|
Pong,
|
||
|
|
|
||
|
|
CreatePTY { width: usize, height: usize },
|
||
|
|
PTYData,
|
||
|
|
}
|