Showing posts from January, 2013

[Library] The useful libraries for C

Needless to say, C is powerful. But, if you use Java or Python, you will reconize that C lakes a bunch of Libraries(APIs) or a framework for C programmer to do job quicker. Sometimes you have to look for some C libraries to meet your requirement, and then you can avoid from carving the same wheels again and again. This document will record the useful libraries for C language and I will continue to add the new one on it. For those who are a great C programmer, if you know a good library for C, please also let me know that. Thanks in advance.

OGDF - Open Graph Drawing Framework

Curl Lib
the multiprotocol file transfer library

The lightweight web server in C

SimCList – A C library for Lists

JSON Library

The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor …

[SDN] The news about Juniper to build its own software-defined networking stack

Software Defined Networking is becoming hotter and hotter topic from last year. Properly networking guys will talk about Software-defined Networking (SDN) everywhere this year. The event that VMware bought Nicira became a catalyst for some related Network Vendors to think about what the strategy and tactic they should have and deal with this wave of SDN. It let me think of this song ( Blondie – The Tide Is High )
  The tide is high but I'm holding on ...
   I'm gonna be your number one ...


In sum, SDN is important and key to survive this time in the networking world. Here is an example about that Juniper takes an action to provide their SDN approach. I excerpt some paragraph as follows:

Quota from the news:

Juniper's approach to SDN, explained Muglia, will break the monolithic software stack inside of switches and routers – for campuses, branches, and service providers and not just for data centers – into f…

[Signal] The examples of using alarm() and sigaction()

In the following URL, it provides a good explanation about signal and signal handling.

Handling signal is a important job when we want to write a great code.
There are several signal functions that we could use often in programming. I will give some examples of how to use alarm() and sigaction() functions as below.
P.S: the URL link is the orginal source code which is from.

The follwing two examples are about how to use alarm() and ualarm().

/* Example of using alarm() */#include <unistd.h> #include <stdio.h> #include <signal.h> intmain(intargc,char*argv[]){sigset_tblock;sigemptyset(&block);sigaddset(&block,SIGALRM);sigprocmask(SIG_BLOCK,&block,NULL);while(1){alarm(2);printf("%d\n",time(NULL));sigwaitinfo(&block,NULL);}return0;}

/* Example of using ualarm() */#define _XOPEN_S…