Test Information

TitleReceiving the Traffic Class when the IPV6_RECVTCLASS socket option is enabled
CommandLine./tst_recv_tclass_udp --log=10.html --title=Receiving the Traffic Class when the IPV6_RECVTCLASS socket option is enabled
TestVersionREL_1_1_18
Start2023/02/03 01:01:18
SystemName(null)
KernelVersion(null)

Test Sequence Execution Log

01:01:18Start

== create an IPv6/UDP socket ==
01:01:18socket(domain:AF_INET6, type:SOCK_DGRAM, protocol:0)
01:01:18return sockfd=4
01:01:19tst_get_unused_port() get port 54959

== set IPV6_TCLASS to 255 ==
01:01:19setsockopt(sockfd:4, level:IPPROTO_IPV6, optname:IPV6_TCLASS, optval:0x3ffd7d78f68, optlen:4)
01:01:19return 0

== set IPV6_RECVTCLASS to 1 ==
01:01:19setsockopt(sockfd:4, level:IPPROTO_IPV6, optname:IPV6_RECVTCLASS, optval:0x3ffd7d78f68, optlen:4)
01:01:19return 0

== bind socket to address ==
01:01:19bind(sockfd:4, my_addr:0x3ffd7d79034, addrlen:28)
01:01:19return 0

== send message to itself ==
01:01:19sendto(sockfd:4, buf:0x1007e40, len:17, flags:0, to:0x3ffd7d79034, tolen:28)
01:01:19return 17

== recv message ==
01:01:19recvmsg(sockfd:4, msg:0x3ffd7d78fe8, flags:0)
01:01:19return 17

the received traffic class = 255, length = 20
01:01:19close(4)

OK
01:01:19End