Ignore:
Timestamp:
Sep 25, 2009, 2:30:33 PM (15 years ago)
Author:
mies
Message:

added basic DHT functionality (untested)

Location:
source/ariba/overlay/messages
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/overlay/messages/OverlayMsg.h

    r5902 r6266  
    8888                typeLinkDirect  = 0x34, ///< direct connection has been established
    8989                typeLinkAlive   = 0x35, ///< keep-alive message
     90
     91                // DHT routed messages
     92                maskDHT                 = 0x40, ///< bit mask for dht messages
     93                typeDHTPut      = 0x41, ///< DHT put operation
     94                typeDHTGet      = 0x42, ///< DHT get operation
     95                typeDHTRemove   = 0x43, ///< DHT remove operation
     96
     97                /// DHT response messages
     98                maskDHTResponse = 0x50, ///< bit mask for dht responses
     99                typeDHTData     = 0x51, ///< DHT get data
    90100
    91101                // topology signaling
     
    179189        }
    180190
    181 
    182191        bool containsSourceEndpoint() const {
    183192                return (flags & 0x20)!=0;
     
    186195        void setContainsSourceEndpoint(bool contains_endpoint) {
    187196                if (contains_endpoint) flags |= 0x20; else flags &= ~0x20;
     197        }
     198
     199        bool isDHTMessage() const {
     200                return hasTypeMask(maskDHT);
    188201        }
    189202
Note: See TracChangeset for help on using the changeset viewer.