From f9e4e7cbf08cf73efdf782f75af698295c5dc417 Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Thu, 29 Apr 2021 12:26:44 +0200 Subject: [PATCH] initial strucutre layed out --- libafl/src/bolts/llmp.rs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/libafl/src/bolts/llmp.rs b/libafl/src/bolts/llmp.rs index ac30ec9ce5..3c550ee04f 100644 --- a/libafl/src/bolts/llmp.rs +++ b/libafl/src/bolts/llmp.rs @@ -125,11 +125,25 @@ static mut GLOBAL_SIGHANDLER_STATE: LlmpBrokerSignalHandler = LlmpBrokerSignalHa /// TAGs used thorughout llmp pub type Tag = u32; +/// This is for the server the broker will spawn. /// If an llmp connection is local - use sharedmaps /// or remote (broker2broker) - forwarded via tcp -pub enum TcpConnectionType { - LocalClient {}, - RemoteBroker, +pub enum TcpRequest { + LocalClientHello { shmem: ShMemDescription }, + RemoteBrokerHello, + RemoteNewMessage { tag: Tag, payload: Vec }, +} + +/// Responses for requests to the server. +pub enum TcpResponse { + LocalClientAccepted { + client_id: u32, + shmem: ShMemDescription, + }, + RemoteBrokerAccepted { + broker_id: u32, + hostname: String, + }, } /// Abstraction for listeners