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/17 08:41:53
SystemName(null)
KernelVersion(null)

Test Sequence Execution Log

08:41:53Start

== calculate the needed buffer size ==
08:41:54inet6_opt_init(extbuf:(nil), extlen:16)
08:41:54return 2

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

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

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

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

OK
08:41:54End