Functions for encapsulation and decapsulation were updated, test_main.c
was rewritten according to it

Signed-off-by: Bleska <blecha.jiri@gmail.com>