add MSG_SIZE and rename SIZE_MAX to LEN_DATA