rework samap to be generic, plus sockaddr_storage