OverlayKey.h File Reference

#include <gmp.h>
#include <sys/types.h>

Go to the source code of this file.

Classes

class  OverlayKey
 A common overlay key class. More...
class  OverlayKeyBit
 An auxiliary class for single bits in OverlayKey. More...

Functions

void omnet_random (mp_limb_t *r1p, mp_size_t r1n)
 replacement function for mpn_random() using omnet's rng
void doPacking (cCommBuffer *b, OverlayKey &obj)
 netPack for OverlayKey
void doUnpacking (cCommBuffer *b, OverlayKey &obj)
 netUnpack for OverlayKey


Detailed Description

Author:
Sebastian Mies, Ingmar Baumgart

Definition in file OverlayKey.h.


Function Documentation

void doPacking ( cCommBuffer *  b,
OverlayKey obj 
) [inline]

netPack for OverlayKey

Parameters:
b the buffer
obj the OverlayKey to serialise

Definition at line 574 of file OverlayKey.h.

00574 {obj.netPack(b);}

void doUnpacking ( cCommBuffer *  b,
OverlayKey obj 
) [inline]

netUnpack for OverlayKey

Parameters:
b the buffer
obj the OverlayKey to unserialise

Definition at line 582 of file OverlayKey.h.

00582 {obj.netUnpack(b);}

void omnet_random ( mp_limb_t *  r1p,
mp_size_t  r1n 
) [inline]

replacement function for mpn_random() using omnet's rng

Definition at line 809 of file OverlayKey.cc.

Referenced by OverlayKey::random(), OverlayKey::randomPrefix(), and OverlayKey::randomSuffix().

00810 {
00811     // fill in 32 bit chunks
00812     uint32_t* chunkPtr = (uint32_t*)r1p;
00813 
00814     for (uint32_t i=0; i < ((r1n*sizeof(mp_limb_t) + 3) / 4); i++) {
00815         chunkPtr[i] = intuniform(0, 0xFFFFFFFF);
00816     }
00817 }


Generated on Tue Sep 8 17:26:55 2009 for OverSim by  doxygen 1.5.8