add if preprocessor to judge PACKET SIZE