mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-03-01 11:21:25 -05:00
fixed up priorities for all items
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5_QoS@4521 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d69294c8bc
commit
4012c5328a
@ -155,7 +155,11 @@ bool pqihandler::queueOutRsItem(RsItem *item)
|
||||
{
|
||||
RsStackMutex stack(coreMtx); /**************** LOCKED MUTEX ****************/
|
||||
in_rsItem(item) ;
|
||||
|
||||
#ifdef DEBUG_QOS
|
||||
if(item->priority_level() == QOS_PRIORITY_UNKNOWN)
|
||||
std::cerr << "Caught an unprioritized item !" << std::endl;
|
||||
|
||||
print() ;
|
||||
#endif
|
||||
return true ;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* 3P/PQI network interface for RetroShare.
|
||||
*
|
||||
* Copyright 2004-2008 by Cyril Soler
|
||||
* Copyright 2011-2011 by Cyril Soler
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
@ -36,6 +36,8 @@
|
||||
// - some RsItems are omitted. The priority is the one of the closest parent item.
|
||||
// - I listed only items that are sent to friends.
|
||||
//
|
||||
// Item priorities are all defined in serializer/itempriorities.h
|
||||
//
|
||||
// +-------------------------+--------------------------------------------------+-----------------------------------------------+
|
||||
// |Item type | low priority <---- --------------> high priority | Comment |
|
||||
// | | | |
|
||||
|
71
libretroshare/src/serialiser/itempriorities.h
Normal file
71
libretroshare/src/serialiser/itempriorities.h
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* libretroshare/src/serialiser: itempriorities.h
|
||||
*
|
||||
* 3P/PQI network interface for RetroShare.
|
||||
*
|
||||
* Copyright 2011-2011 by Cyril Soler
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License Version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA.
|
||||
*
|
||||
* Please report all bugs and problems to "csoler@users.sourceforge.net"
|
||||
*
|
||||
*/
|
||||
|
||||
// This file centralises QoS priorities for all transfer RsItems.
|
||||
//
|
||||
const uint8_t QOS_PRIORITY_UNKNOWN = 0 ;
|
||||
const uint8_t QOS_PRIORITY_DEFAULT = 3 ;
|
||||
const uint8_t QOS_PRIORITY_TOP = 9 ;
|
||||
|
||||
// Turtle traffic
|
||||
//
|
||||
const uint8_t QOS_PRIORITY_RS_TURTLE_OPEN_TUNNEL = 6 ;
|
||||
const uint8_t QOS_PRIORITY_RS_TURTLE_TUNNEL_OK = 6 ;
|
||||
const uint8_t QOS_PRIORITY_RS_TURTLE_SEARCH_REQUEST = 5 ;
|
||||
const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_REQUEST = 5 ;
|
||||
const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_CRC_REQUEST = 5 ;
|
||||
const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_MAP_REQUEST = 5 ;
|
||||
const uint8_t QOS_PRIORITY_RS_TURTLE_SEARCH_RESULT = 3 ;
|
||||
const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_DATA = 3 ;
|
||||
const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_CRC = 3 ;
|
||||
const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_MAP = 3 ;
|
||||
const uint8_t QOS_PRIORITY_RS_TURTLE_GENERIC_ITEM = 3 ;
|
||||
|
||||
// File transfer
|
||||
//
|
||||
const uint8_t QOS_PRIORITY_RS_FILE_REQUEST = 5 ;
|
||||
const uint8_t QOS_PRIORITY_RS_FILE_CRC_REQUEST = 5 ;
|
||||
const uint8_t QOS_PRIORITY_RS_FILE_MAP_REQUEST = 5 ;
|
||||
const uint8_t QOS_PRIORITY_RS_CACHE_REQUEST = 4 ;
|
||||
const uint8_t QOS_PRIORITY_RS_FILE_DATA = 3 ;
|
||||
const uint8_t QOS_PRIORITY_RS_FILE_CRC = 3 ;
|
||||
const uint8_t QOS_PRIORITY_RS_FILE_MAP = 3 ;
|
||||
const uint8_t QOS_PRIORITY_RS_CACHE_ITEM = 3 ;
|
||||
|
||||
// Discovery
|
||||
//
|
||||
const uint8_t QOS_PRIORITY_RS_DISC_HEART_BEAT = 8 ;
|
||||
const uint8_t QOS_PRIORITY_RS_DISC_ASK_INFO = 2 ;
|
||||
const uint8_t QOS_PRIORITY_RS_DISC_REPLY = 1 ;
|
||||
const uint8_t QOS_PRIORITY_RS_DISC_VERSION = 1 ;
|
||||
|
||||
// Chat/Msgs
|
||||
//
|
||||
const uint8_t QOS_PRIORITY_RS_CHAT_ITEM = 7 ;
|
||||
const uint8_t QOS_PRIORITY_RS_CHAT_AVATAR_ITEM = 2 ;
|
||||
const uint8_t QOS_PRIORITY_RS_MSG_ITEM = 2 ;
|
||||
const uint8_t QOS_PRIORITY_RS_STATUS_ITEM = 2 ;
|
||||
|
||||
|
@ -55,7 +55,9 @@ class RsFileRequest: public RsItem
|
||||
:RsItem(RS_PKT_VERSION1, RS_PKT_CLASS_BASE,
|
||||
RS_PKT_TYPE_FILE,
|
||||
RS_PKT_SUBTYPE_FI_REQUEST)
|
||||
{ return; }
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_FILE_REQUEST) ;
|
||||
}
|
||||
virtual ~RsFileRequest();
|
||||
virtual void clear();
|
||||
std::ostream &print(std::ostream &out, uint16_t indent = 0);
|
||||
@ -74,7 +76,9 @@ class RsFileData: public RsItem
|
||||
:RsItem(RS_PKT_VERSION1, RS_PKT_CLASS_BASE,
|
||||
RS_PKT_TYPE_FILE,
|
||||
RS_PKT_SUBTYPE_FI_DATA)
|
||||
{ return; }
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_FILE_DATA) ;
|
||||
}
|
||||
virtual ~RsFileData();
|
||||
virtual void clear();
|
||||
std::ostream &print(std::ostream &out, uint16_t indent = 0);
|
||||
@ -87,7 +91,9 @@ class RsFileChunkMapRequest: public RsItem
|
||||
public:
|
||||
RsFileChunkMapRequest()
|
||||
:RsItem(RS_PKT_VERSION1, RS_PKT_CLASS_BASE, RS_PKT_TYPE_FILE, RS_PKT_SUBTYPE_FI_CHUNK_MAP_REQUEST)
|
||||
{}
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_FILE_MAP_REQUEST) ;
|
||||
}
|
||||
virtual ~RsFileChunkMapRequest() {}
|
||||
virtual void clear() {}
|
||||
|
||||
@ -102,7 +108,9 @@ class RsFileChunkMap: public RsItem
|
||||
public:
|
||||
RsFileChunkMap()
|
||||
:RsItem(RS_PKT_VERSION1, RS_PKT_CLASS_BASE, RS_PKT_TYPE_FILE, RS_PKT_SUBTYPE_FI_CHUNK_MAP)
|
||||
{}
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_FILE_MAP) ;
|
||||
}
|
||||
virtual ~RsFileChunkMap() {}
|
||||
virtual void clear() {}
|
||||
|
||||
@ -118,7 +126,9 @@ class RsFileCRC32MapRequest: public RsItem
|
||||
public:
|
||||
RsFileCRC32MapRequest()
|
||||
:RsItem(RS_PKT_VERSION1, RS_PKT_CLASS_BASE, RS_PKT_TYPE_FILE, RS_PKT_SUBTYPE_FI_CRC32_MAP_REQUEST)
|
||||
{}
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_FILE_CRC_REQUEST) ;
|
||||
}
|
||||
virtual ~RsFileCRC32MapRequest() {}
|
||||
virtual void clear() {}
|
||||
|
||||
@ -132,7 +142,9 @@ class RsFileCRC32Map: public RsItem
|
||||
public:
|
||||
RsFileCRC32Map()
|
||||
:RsItem(RS_PKT_VERSION1, RS_PKT_CLASS_BASE, RS_PKT_TYPE_FILE, RS_PKT_SUBTYPE_FI_CRC32_MAP)
|
||||
{}
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_FILE_CRC) ;
|
||||
}
|
||||
virtual ~RsFileCRC32Map() {}
|
||||
virtual void clear() {}
|
||||
|
||||
@ -190,7 +202,9 @@ class RsCacheRequest: public RsItem
|
||||
:RsItem(RS_PKT_VERSION1, RS_PKT_CLASS_BASE,
|
||||
RS_PKT_TYPE_CACHE,
|
||||
RS_PKT_SUBTYPE_CACHE_REQUEST)
|
||||
{ return; }
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_CACHE_REQUEST);
|
||||
}
|
||||
virtual ~RsCacheRequest();
|
||||
virtual void clear();
|
||||
std::ostream &print(std::ostream &out, uint16_t indent = 0);
|
||||
@ -209,7 +223,9 @@ class RsCacheItem: public RsItem
|
||||
:RsItem(RS_PKT_VERSION1, RS_PKT_CLASS_BASE,
|
||||
RS_PKT_TYPE_CACHE,
|
||||
RS_PKT_SUBTYPE_CACHE_ITEM)
|
||||
{ return; }
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_CACHE_ITEM);
|
||||
}
|
||||
virtual ~RsCacheItem();
|
||||
virtual void clear();
|
||||
std::ostream &print(std::ostream &out, uint16_t indent = 0);
|
||||
|
@ -78,7 +78,9 @@ class RsDiscReply: public RsDiscItem
|
||||
|
||||
RsDiscReply()
|
||||
:RsDiscItem(RS_PKT_SUBTYPE_DISC_REPLY)
|
||||
{ return; }
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_DISC_REPLY);
|
||||
}
|
||||
|
||||
virtual ~RsDiscReply();
|
||||
|
||||
@ -107,7 +109,9 @@ class RsDiscAskInfo: public RsDiscItem
|
||||
|
||||
RsDiscAskInfo()
|
||||
:RsDiscItem(RS_PKT_SUBTYPE_DISC_ASK_INFO)
|
||||
{ return; }
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_DISC_ASK_INFO);
|
||||
}
|
||||
|
||||
virtual ~RsDiscAskInfo();
|
||||
|
||||
@ -121,7 +125,9 @@ class RsDiscVersion: public RsDiscItem
|
||||
{
|
||||
public:
|
||||
RsDiscVersion() :RsDiscItem(RS_PKT_SUBTYPE_DISC_VERSION)
|
||||
{ return; }
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_DISC_VERSION);
|
||||
}
|
||||
|
||||
virtual ~RsDiscVersion();
|
||||
|
||||
@ -135,7 +141,9 @@ class RsDiscHeartbeat: public RsDiscItem
|
||||
{
|
||||
public:
|
||||
RsDiscHeartbeat() :RsDiscItem(RS_PKT_SUBTYPE_DISC_HEARTBEAT)
|
||||
{ return; }
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_DISC_HEART_BEAT) ;
|
||||
}
|
||||
|
||||
virtual ~RsDiscHeartbeat();
|
||||
|
||||
|
@ -50,7 +50,7 @@ RsItem::RsItem(uint32_t t)
|
||||
:type(t)
|
||||
{
|
||||
_queue_type = CONTROL_QUEUE ;
|
||||
_priority_level = 5 ;
|
||||
_priority_level = QOS_PRIORITY_UNKNOWN ; // This value triggers PQIInterface to complain about undefined priorities
|
||||
}
|
||||
|
||||
#ifdef DO_STATISTICS
|
||||
@ -117,8 +117,8 @@ void RsItem::operator delete(void *p,size_t s)
|
||||
|
||||
RsItem::RsItem(uint8_t ver, uint8_t cls, uint8_t t, uint8_t subtype)
|
||||
{
|
||||
_priority_level = 5 ;
|
||||
_queue_type = CONTROL_QUEUE ;
|
||||
_priority_level = QOS_PRIORITY_UNKNOWN ; // This value triggers PQIInterface to complain about undefined priorities
|
||||
|
||||
type = (ver << 24) + (cls << 16) + (t << 8) + subtype;
|
||||
}
|
||||
@ -161,7 +161,7 @@ uint8_t RsItem::PacketSubType()
|
||||
RsItem::RsItem(uint8_t ver, uint16_t service, uint8_t subtype)
|
||||
{
|
||||
_queue_type = CONTROL_QUEUE ;
|
||||
_priority_level = 5 ;
|
||||
_priority_level = QOS_PRIORITY_UNKNOWN ; // This value triggers PQIInterface to complain about undefined priorities
|
||||
type = (ver << 24) + (service << 8) + subtype;
|
||||
return;
|
||||
}
|
||||
|
@ -57,6 +57,7 @@
|
||||
******************************************************************/
|
||||
|
||||
#include <util/smallobject.h>
|
||||
#include "itempriorities.h"
|
||||
|
||||
const uint8_t RS_PKT_VERSION1 = 0x01;
|
||||
const uint8_t RS_PKT_VERSION_SERVICE = 0x02;
|
||||
|
@ -200,6 +200,7 @@ RsRawItem *p3Service::send()
|
||||
{
|
||||
raw->PeerId(si->PeerId());
|
||||
raw->setQueueType(si->queueType()) ;
|
||||
assert(si->priority_level() != QOS_PRIORITY_UNKNOWN) ;
|
||||
raw->setPriorityLevel(si->priority_level()) ;
|
||||
}
|
||||
|
||||
|
@ -557,6 +557,7 @@ bool RsTurtleSearchResultItem::serialize(void *data,uint32_t& pktsize)
|
||||
RsTurtleFileMapItem::RsTurtleFileMapItem(void *data,uint32_t pktsize)
|
||||
: RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_MAP)
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_TURTLE_FILE_MAP) ;
|
||||
#ifdef P3TURTLE_DEBUG
|
||||
std::cerr << " type = file map item" << std::endl ;
|
||||
#endif
|
||||
@ -588,6 +589,7 @@ RsTurtleFileMapItem::RsTurtleFileMapItem(void *data,uint32_t pktsize)
|
||||
RsTurtleFileMapRequestItem::RsTurtleFileMapRequestItem(void *data,uint32_t pktsize)
|
||||
: RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_MAP_REQUEST)
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_TURTLE_FILE_MAP_REQUEST) ;
|
||||
#ifdef P3TURTLE_DEBUG
|
||||
std::cerr << " type = file map request item" << std::endl ;
|
||||
#endif
|
||||
@ -611,6 +613,7 @@ RsTurtleFileMapRequestItem::RsTurtleFileMapRequestItem(void *data,uint32_t pktsi
|
||||
RsTurtleFileCrcItem::RsTurtleFileCrcItem(void *data,uint32_t pktsize)
|
||||
: RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_CRC)
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_TURTLE_FILE_CRC) ;
|
||||
#ifdef P3TURTLE_DEBUG
|
||||
std::cerr << " type = file map item" << std::endl ;
|
||||
#endif
|
||||
@ -645,6 +648,7 @@ RsTurtleFileCrcItem::RsTurtleFileCrcItem(void *data,uint32_t pktsize)
|
||||
RsTurtleFileCrcRequestItem::RsTurtleFileCrcRequestItem(void *data,uint32_t pktsize)
|
||||
: RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_CRC_REQUEST)
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_TURTLE_FILE_CRC_REQUEST) ;
|
||||
#ifdef P3TURTLE_DEBUG
|
||||
std::cerr << " type = file map request item" << std::endl ;
|
||||
#endif
|
||||
@ -667,6 +671,7 @@ RsTurtleFileCrcRequestItem::RsTurtleFileCrcRequestItem(void *data,uint32_t pktsi
|
||||
RsTurtleSearchResultItem::RsTurtleSearchResultItem(void *data,uint32_t pktsize)
|
||||
: RsTurtleItem(RS_TURTLE_SUBTYPE_SEARCH_RESULT)
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_TURTLE_SEARCH_RESULT) ;
|
||||
#ifdef P3TURTLE_DEBUG
|
||||
std::cerr << " type = search result" << std::endl ;
|
||||
#endif
|
||||
@ -745,6 +750,7 @@ bool RsTurtleOpenTunnelItem::serialize(void *data,uint32_t& pktsize)
|
||||
RsTurtleOpenTunnelItem::RsTurtleOpenTunnelItem(void *data,uint32_t pktsize)
|
||||
: RsTurtleItem(RS_TURTLE_SUBTYPE_OPEN_TUNNEL)
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_TURTLE_OPEN_TUNNEL) ;
|
||||
#ifdef P3TURTLE_DEBUG
|
||||
std::cerr << " type = open tunnel" << std::endl ;
|
||||
#endif
|
||||
@ -808,6 +814,7 @@ bool RsTurtleTunnelOkItem::serialize(void *data,uint32_t& pktsize)
|
||||
RsTurtleTunnelOkItem::RsTurtleTunnelOkItem(void *data,uint32_t pktsize)
|
||||
: RsTurtleItem(RS_TURTLE_SUBTYPE_TUNNEL_OK)
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_TURTLE_TUNNEL_OK) ;
|
||||
#ifdef P3TURTLE_DEBUG
|
||||
std::cerr << " type = tunnel ok" << std::endl ;
|
||||
#endif
|
||||
@ -870,6 +877,7 @@ bool RsTurtleFileRequestItem::serialize(void *data,uint32_t& pktsize)
|
||||
RsTurtleFileRequestItem::RsTurtleFileRequestItem(void *data,uint32_t pktsize)
|
||||
: RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_REQUEST)
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_TURTLE_FILE_REQUEST) ;
|
||||
#ifdef P3TURTLE_DEBUG
|
||||
std::cerr << " type = file request" << std::endl ;
|
||||
#endif
|
||||
@ -903,6 +911,7 @@ RsTurtleFileDataItem::~RsTurtleFileDataItem()
|
||||
RsTurtleFileDataItem::RsTurtleFileDataItem(void *data,uint32_t pktsize)
|
||||
: RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_DATA)
|
||||
{
|
||||
setPriorityLevel(QOS_PRIORITY_RS_TURTLE_FILE_DATA) ;
|
||||
#ifdef P3TURTLE_DEBUG
|
||||
std::cerr << " type = file request" << std::endl ;
|
||||
#endif
|
||||
|
@ -46,7 +46,7 @@ class RsTurtleItem: public RsItem
|
||||
class RsTurtleSearchResultItem: public RsTurtleItem
|
||||
{
|
||||
public:
|
||||
RsTurtleSearchResultItem() : RsTurtleItem(RS_TURTLE_SUBTYPE_SEARCH_RESULT) {}
|
||||
RsTurtleSearchResultItem() : RsTurtleItem(RS_TURTLE_SUBTYPE_SEARCH_RESULT) { setPriorityLevel(QOS_PRIORITY_RS_TURTLE_SEARCH_RESULT) ;}
|
||||
RsTurtleSearchResultItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
TurtleSearchRequestId request_id ; // Randomly generated request id.
|
||||
@ -67,7 +67,7 @@ class RsTurtleSearchResultItem: public RsTurtleItem
|
||||
class RsTurtleSearchRequestItem: public RsTurtleItem
|
||||
{
|
||||
public:
|
||||
RsTurtleSearchRequestItem(uint32_t subtype) : RsTurtleItem(subtype) {}
|
||||
RsTurtleSearchRequestItem(uint32_t subtype) : RsTurtleItem(subtype) { setPriorityLevel(QOS_PRIORITY_RS_TURTLE_SEARCH_REQUEST) ;}
|
||||
|
||||
virtual RsTurtleSearchRequestItem *clone() const = 0 ; // used for cloning in routing methods
|
||||
virtual void performLocalSearch(std::list<TurtleFileInfo>&) const = 0 ; // abstracts the search method
|
||||
@ -117,7 +117,7 @@ class RsTurtleRegExpSearchRequestItem: public RsTurtleSearchRequestItem
|
||||
class RsTurtleOpenTunnelItem: public RsTurtleItem
|
||||
{
|
||||
public:
|
||||
RsTurtleOpenTunnelItem() : RsTurtleItem(RS_TURTLE_SUBTYPE_OPEN_TUNNEL) {}
|
||||
RsTurtleOpenTunnelItem() : RsTurtleItem(RS_TURTLE_SUBTYPE_OPEN_TUNNEL) { setPriorityLevel(QOS_PRIORITY_RS_TURTLE_OPEN_TUNNEL) ;}
|
||||
RsTurtleOpenTunnelItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
TurtleFileHash file_hash ; // hash to match
|
||||
@ -135,7 +135,7 @@ class RsTurtleOpenTunnelItem: public RsTurtleItem
|
||||
class RsTurtleTunnelOkItem: public RsTurtleItem
|
||||
{
|
||||
public:
|
||||
RsTurtleTunnelOkItem() : RsTurtleItem(RS_TURTLE_SUBTYPE_TUNNEL_OK) {}
|
||||
RsTurtleTunnelOkItem() : RsTurtleItem(RS_TURTLE_SUBTYPE_TUNNEL_OK) { setPriorityLevel(QOS_PRIORITY_RS_TURTLE_TUNNEL_OK) ;}
|
||||
RsTurtleTunnelOkItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
uint32_t tunnel_id ; // id of the tunnel. Should be identical for a tunnel between two same peers for the same hash.
|
||||
@ -155,7 +155,7 @@ class RsTurtleTunnelOkItem: public RsTurtleItem
|
||||
class RsTurtleGenericTunnelItem: public RsTurtleItem
|
||||
{
|
||||
public:
|
||||
RsTurtleGenericTunnelItem(uint8_t sub_packet_id) : RsTurtleItem(sub_packet_id) {}
|
||||
RsTurtleGenericTunnelItem(uint8_t sub_packet_id) : RsTurtleItem(sub_packet_id) { setPriorityLevel(QOS_PRIORITY_RS_TURTLE_GENERIC_ITEM);}
|
||||
|
||||
typedef uint32_t Direction ;
|
||||
static const Direction DIRECTION_CLIENT = 0x001 ;
|
||||
@ -188,7 +188,7 @@ class RsTurtleGenericTunnelItem: public RsTurtleItem
|
||||
class RsTurtleFileRequestItem: public RsTurtleGenericTunnelItem
|
||||
{
|
||||
public:
|
||||
RsTurtleFileRequestItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_REQUEST) {}
|
||||
RsTurtleFileRequestItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_REQUEST) { setPriorityLevel(QOS_PRIORITY_RS_TURTLE_FILE_REQUEST);}
|
||||
RsTurtleFileRequestItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
virtual bool shouldStampTunnel() const { return false ; }
|
||||
@ -208,7 +208,7 @@ class RsTurtleFileRequestItem: public RsTurtleGenericTunnelItem
|
||||
class RsTurtleFileDataItem: public RsTurtleGenericTunnelItem
|
||||
{
|
||||
public:
|
||||
RsTurtleFileDataItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_DATA) {}
|
||||
RsTurtleFileDataItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_DATA) { setPriorityLevel(QOS_PRIORITY_RS_TURTLE_FILE_DATA) ;}
|
||||
~RsTurtleFileDataItem() ;
|
||||
RsTurtleFileDataItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
@ -230,7 +230,7 @@ class RsTurtleFileDataItem: public RsTurtleGenericTunnelItem
|
||||
class RsTurtleFileMapRequestItem: public RsTurtleGenericTunnelItem
|
||||
{
|
||||
public:
|
||||
RsTurtleFileMapRequestItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_MAP_REQUEST) {}
|
||||
RsTurtleFileMapRequestItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_MAP_REQUEST) { setPriorityLevel(QOS_PRIORITY_RS_TURTLE_FILE_MAP_REQUEST) ;}
|
||||
RsTurtleFileMapRequestItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
virtual bool shouldStampTunnel() const { return false ; }
|
||||
@ -250,7 +250,7 @@ class RsTurtleFileMapRequestItem: public RsTurtleGenericTunnelItem
|
||||
class RsTurtleFileMapItem: public RsTurtleGenericTunnelItem
|
||||
{
|
||||
public:
|
||||
RsTurtleFileMapItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_MAP) {}
|
||||
RsTurtleFileMapItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_MAP) { setPriorityLevel(QOS_PRIORITY_RS_TURTLE_FILE_MAP) ;}
|
||||
RsTurtleFileMapItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
virtual bool shouldStampTunnel() const { return false ; }
|
||||
@ -274,7 +274,7 @@ class RsTurtleFileMapItem: public RsTurtleGenericTunnelItem
|
||||
class RsTurtleFileCrcRequestItem: public RsTurtleGenericTunnelItem
|
||||
{
|
||||
public:
|
||||
RsTurtleFileCrcRequestItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_CRC_REQUEST) {}
|
||||
RsTurtleFileCrcRequestItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_CRC_REQUEST) { setPriorityLevel(QOS_PRIORITY_RS_FILE_CRC_REQUEST);}
|
||||
RsTurtleFileCrcRequestItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
virtual bool shouldStampTunnel() const { return false ; }
|
||||
@ -296,7 +296,7 @@ class RsTurtleFileCrcRequestItem: public RsTurtleGenericTunnelItem
|
||||
class RsTurtleFileCrcItem: public RsTurtleGenericTunnelItem
|
||||
{
|
||||
public:
|
||||
RsTurtleFileCrcItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_CRC) {}
|
||||
RsTurtleFileCrcItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_FILE_CRC) { setPriorityLevel(QOS_PRIORITY_RS_FILE_CRC);}
|
||||
RsTurtleFileCrcItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
virtual bool shouldStampTunnel() const { return true ; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user