OverlayKey.h File Reference

#include <gmp.h>
#include <stdint.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 576 of file OverlayKey.h.

00576 {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 584 of file OverlayKey.h.

00584 {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 824 of file OverlayKey.cc.

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

00825 {
00826     // fill in 32 bit chunks
00827     uint32_t* chunkPtr = (uint32_t*)r1p;
00828 
00829     for (uint32_t i=0; i < ((r1n*sizeof(mp_limb_t) + 3) / 4); i++) {
00830         chunkPtr[i] = intuniform(0, 0xFFFFFFFF);
00831     }
00832 }

Generated on Wed May 26 16:21:15 2010 for OverSim by  doxygen 1.6.3