Posts

Showing posts from February, 2013

[sFlow] Use sflowtool to parse sFlow datagram

In order to test and understand sFlow more in details, I prepare the following environment below. Switch 1 and 2 are emulated using Open vSwitch. In the previous sFlow article, there is a sFlow setting on Open vSwitch. Please check it out.

192.168.12.201 10.3.207.244 192.168.12.202 +------------+ +-----------------+ +------------+ | PC1 | | sFlow Collector | | PC2 | | | | | | | | | | | | | +-----+------+ +---^--------^----+ +-----+------+ | | | | | | | | | ^ sFlow ^ | +---------+ | Data | +----------+ | …

[C++ STL] Containers

We all know that using data structure well is very important in programming, because it affects the performance, data accuracy, maintenance no matter what kind of the program you write. In C language, we have to provide our data structure by ourselves or by searching for related library and grab it to use. But, if possible ( I mean if your program is able to use g++ compiler and the environment ), you can consider to just use Containers (C++ STL) in your program. It is useful and powerful. For more information, here is the official web site : http://www.cplusplus.com/reference/stl/
Container class templatesSequence containers:
vectorVector (class template )dequeDouble ended queue (class template )listList (class template )
Container adaptors:
stackLIFO stack (class template )queueFIFO queue (class template )priority_queuePriority queue (class template )
Associative containers:
setSet (class template )multisetMultiple-key set (class template )mapMap (class template )multimapMultiple-key map…