Bosnia and Herzegovina

Category Archives: ns3

Socket::SetIpTos in NS-3 ver.3.26

One of the changes between ns-3 ver 3.25 and ver 3.26 is that now it is possible to set TOS value to the address. Yes, you read it right, TOS value to the address. Official Doxygen states following: The native sockets API for ns-3 provides two public methods (of the Socket base class): void […]

Read more

Crypto++ VMAC issue

Well, I tried code available on in my NS-3 project on the following way: inputString = base64_encode (inputString); byte* Kkey = key->GetKey(); byte digestBytes[key->GetSize()]; byte digestBytes2[key->GetSize()]; CryptoPP::VMAC vmac; vmac.SetKeyWithIV(Kkey, key->GetSize(), m_iv, CryptoPP::AES::BLOCKSIZE); vmac.CalculateDigest(digestBytes, (byte *) inputString.c_str(), inputString.length()); //VMAC Verification vmac.SetKeyWithIV(Kkey, key->GetSize(), m_iv, CryptoPP::AES::BLOCKSIZE); vmac.CalculateDigest(digestBytes2, (byte *) inputString.c_str(), inputString.length()); std::string outputString = std::string( (char*)digestBytes, sizeof(digestBytes […]

Read more

Installing crypto++ with ns3

Installing crypto++ (libcryptopp) on Ubuntu sudo apt-get install libcrypto++-dev libcrypto++-doc libcrypto++-utils On distributions which use yum (such as Fedora): yum install cryptopp cryptopp-devel More details on: and Then compile and run some source file Make which contains following: /* -*- Mode:C++; c-file-style:”gnu”; indent-tabs-mode:nil; -*- */ #include <iostream> int main (int argc, […]

Read more

Greedy Perimeter Stateless Routing (GPSR) in ns3.25

Please find the updated Greedy Perimeter Stateless Routing protocol (GPSR) code which works in the latest ns3.25 version. Just copy it into your /src folder and execute “./waf configure” and “./waf”. Also, move the examples from /src/gprs/examples to /scratch and test it. It works fine for me in ns3.25 version. Enjoy! — Files to download: […]

Read more