Test Information

TitleSpecifying the outgoing interface as ancillary data
CommandLine./tst_send_ifindex_udp --log=3.html --title=Specifying the outgoing interface as ancillary data
TestVersionREL_1_1_18
Start2023/01/26 16:32:54
SystemName(null)
KernelVersion(null)

Test Sequence Execution Log

16:32:54Start

== create an IPv6/UDP socket ==
16:32:54socket(domain:AF_INET6, type:SOCK_DGRAM, protocol:0)
16:32:54return sockfd=4
16:32:55tst_get_unused_port() get port 58581

== bind socket to address ==
16:32:55bind(sockfd:4, my_addr:0x3ffec0f9384, addrlen:28)
16:32:55return 0

== send message on non-exist interface ==
16:32:56sendmsg(sockfd:4, msg:0x3ffec0f9338, flags:0)
16:32:56return -1
16:32:56if_nametoindex(ifname:"lo")
16:32:56return 1

== send message on interface lo ==
16:32:56sendmsg(sockfd:4, msg:0x3ffec0f9338, flags:0)
16:32:56return 100

== recv message ==
16:32:56recv(sockfd:4, buf:0x3ffec0f92ac, len:100, flags:64)
16:32:56return 100

== send message with outgoing interface set to 0 ==
16:32:56sendmsg(sockfd:4, msg:0x3ffec0f9338, flags:0)
16:32:56return 100

== recv msg from server ==
16:32:56recv(sockfd:4, buf:0x3ffec0f92ac, len:100, flags:64)
16:32:56return 100
16:32:56close(4)

OK
16:32:56End