Rfc6810 bis

pull request for reviewing code
could entry be allocated on the stack?