change loop condition to atomic type
add packet packers and sender in packet.c
modify framework