OverlayKey.h File Reference


Detailed Description

Author:
Sebastian Mies

#include <string>
#include <INETDefs.h>
#include <BinaryValue.h>
#include <assert.h>
#include <gmp.h>
#include <stdint.h>

Classes

class  OverlayKey
 A common overlay key class. 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


Function Documentation

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

netPack for OverlayKey

Parameters:
b the buffer
obj the OverlayKey to serialise
00512 {obj.netPack(b);}

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

netUnpack for OverlayKey

Parameters:
b the buffer
obj the OverlayKey to unserialise
00520 {obj.netUnpack(b);}

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

replacement function for mpn_random() using omnet's rng

00736 {
00737     // fill in 32 bit chunks
00738     u_int32_t* chunkPtr = (u_int32_t*)r1p;
00739 
00740     for (uint i=0; i < ((r1n*sizeof(mp_limb_t) + 3) / 4); i++) {
00741         chunkPtr[i] = intuniform(0, 0xFFFFFFFF);
00742     }
00743 }


Generated on Tue Jul 24 16:51:17 2007 for ITM OverSim by  doxygen 1.5.1