mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-22 20:01:30 -05:00
reimplemented the tunnel handshake
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2428 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
47b5f62aeb
commit
3d33f5d729
7 changed files with 373 additions and 192 deletions
|
|
@ -36,6 +36,7 @@
|
|||
#include "serialiser/rstlvkeys.h"
|
||||
|
||||
const uint8_t RS_TUNNEL_SUBTYPE_DATA = 0x01 ;
|
||||
const uint8_t RS_TUNNEL_SUBTYPE_HANDSHAKE = 0x02 ;
|
||||
|
||||
/***********************************************************************************/
|
||||
/* Basic Tunnel Item Class */
|
||||
|
|
@ -63,8 +64,7 @@ class RsTunnelDataItem: public RsTunnelItem
|
|||
|
||||
std::string sourcePeerId ;
|
||||
std::string relayPeerId ;
|
||||
std::string destPeerId ;
|
||||
uint32_t connection_accepted;
|
||||
std::string destPeerId ;
|
||||
|
||||
std::ostream& print(std::ostream& o, uint16_t) ;
|
||||
|
||||
|
|
@ -72,6 +72,24 @@ class RsTunnelDataItem: public RsTunnelItem
|
|||
uint32_t serial_size() ;
|
||||
};
|
||||
|
||||
class RsTunnelHandshakeItem: public RsTunnelItem
|
||||
{
|
||||
public:
|
||||
RsTunnelHandshakeItem() : RsTunnelItem(RS_TUNNEL_SUBTYPE_HANDSHAKE) {}
|
||||
RsTunnelHandshakeItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
std::string sourcePeerId ;
|
||||
std::string relayPeerId ;
|
||||
std::string destPeerId ;
|
||||
std::string sslCertPEM ;
|
||||
uint32_t connection_accepted;
|
||||
|
||||
std::ostream& print(std::ostream& o, uint16_t) ;
|
||||
|
||||
bool serialize(void *data,uint32_t& size) ;
|
||||
uint32_t serial_size() ;
|
||||
};
|
||||
|
||||
class RsTunnelSerialiser: public RsSerialType
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue