OverlayKey.cc File Reference

#include <omnetpp.h>
#include "OverlayKey.h"
#include <gmp.h>
#include <stdint.h>
#include <OverlayKey.h>
#include <ProxNodeHandle.h>
#include <BinaryValue.h>
#include <memory.h>
#include <stdio.h>
#include <string.h>

Go to the source code of this file.

Defines

#define GMP_TYPE   unsigned long int

Functions

std::ostream & operator<< (std::ostream &os, const OverlayKey &c)
void omnet_random (mp_limb_t *r1p, mp_size_t r1n)
 replacement function for mpn_random() using omnet's rng

Variables

const char * HEX = "0123456789abcdef"

Detailed Description

Author:
Sebastian Mies, Ingmar Baumgart

Definition in file OverlayKey.cc.


Define Documentation

#define GMP_TYPE   unsigned long int

Definition at line 840 of file OverlayKey.cc.

Referenced by OverlayKey::netPack(), and OverlayKey::netUnpack().


Function Documentation

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 }

std::ostream& operator<< ( std::ostream &  os,
const OverlayKey c 
)

Definition at line 621 of file OverlayKey.cc.

00622 {
00623     os << c.toString(16);
00624     return os;
00625 };


Variable Documentation

const char* HEX = "0123456789abcdef"

Definition at line 60 of file OverlayKey.cc.

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