Sarajevo, Bosnia and Herzegovina

Category Archives: Networks and telecommunications

Posts related to networks or telecommunications topic.

Clearing Linux disk cache

For experimentation, it’s very convenient to be able to drop the disk cache. For this, we can use the special file /proc/sys/vm/drop_caches. By writing 3 to it, we can clear most of the disk cache: $ free -m total used free shared buffers cached Mem: 1504 1471 33 0 36 801 -/+ buffers/cache: 633 871 […]

Read more

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