Using libpcap library to capture network package