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/02/03 01:01:50
SystemName(null)
KernelVersion(null)

Test Sequence Execution Log

01:01:50Start

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

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

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

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

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

OK
01:01:51End