add+organize constants, add check to pack_sockaddr