Test Information

TitleCalculate the needed buffer size for the extension header
CommandLine./tst_inet6_opt_finish_calc --log=6.html --title=Calculate the needed buffer size for the extension header
TestVersionREL_1_1_18
Start2023/01/26 16:33:42
SystemName(null)
KernelVersion(null)

Test Sequence Execution Log

16:33:42Start

== calculate the needed buffer size ==
16:33:42inet6_opt_init(extbuf:(nil), extlen:16)
16:33:42return 2

== calculate the needed buffer size while the offset is not multiple of 8 bytes ==
16:33:42inet6_opt_finish(extbuf:(nil), extlen:16, offset:2)
16:33:42return 8

== calculate the needed buffer size while the offset is multiple of 8 bytes ==
16:33:42inet6_opt_finish(extbuf:(nil), extlen:16, offset:8)
16:33:42return 8

== calculate the needed buffer size while the offset is lager than extlen ==
16:33:42inet6_opt_finish(extbuf:(nil), extlen:16, offset:17)
16:33:42return 24

== calculate the needed buffer size while the offset is equal to extlen ==
16:33:43inet6_opt_finish(extbuf:(nil), extlen:16, offset:16)
16:33:43return 16

OK
16:33:43End