logo.png

Packets objects

Conf objects

Basic objects

Run objects

Misc modules

Home Up


Contents



1 Introduction

What: Miscellaneous stuffs.

This library is located at:

  • libLDA/include/misc/
  • libLDA/misc/


2 API


2.1 Log

``TestLog'' class was used to dump log into memory. It is now change in order to use syslog daemon.


2.2 Thread

We provide a way to manage a secondary thread with fifo priorities.


2.3 Ring buffer

We provide ring buffer to share continus memory space between the 2 threads.


3 Compilation


3.1 Flags

Pre-compilation flags:

  • DEBUG_THREAD: debuging messages about threads.
  • DEBUG_TUNING: help to optimize basic's pcap parameters and run's buffer sizes.

/include/misd/all.h:

/* Constants values */
#define DEBUG_THREAD 0
#define DEBUG_TUNING 0


4 Unitary tests

# libLDA/misc/utLlrLog
[log.cc:45] INFO: Log info message
[log.cc:46] WARNING: Log warning Message
[log.cc:47] ERROR: Log error message

# libLDA/misc/utThread 
1: start
1: thread :)
1: thread :)
1: thread :)
1: stop
2: start
2: thread :)  <-- ^C pressed
2: thread :)
2: stop
Will exit soon

# libLDA/misc/utAcbsm 
			[*                       ]
try to add 3 items ...
	add 3 items	[x..+                    ]
try to del 2 items ...
	del 2 items	[  x+                    ]
...

Home Up

This document is also available in PDF and PostScript format.



2015-10-29