pcapsim init implement
start to implement dir.c