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

Test Sequence Execution Log

01:01:03Start

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

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

== send message on non-exist interface ==
01:01:04sendmsg(sockfd:4, msg:0x3ffd18790c8, flags:0)
01:01:04return -1
01:01:04if_nametoindex(ifname:"lo")
01:01:04return 1

== send message on interface lo ==
01:01:04sendmsg(sockfd:4, msg:0x3ffd18790c8, flags:0)
01:01:04return 100

== recv message ==
01:01:04recv(sockfd:4, buf:0x3ffd187903c, len:100, flags:64)
01:01:04return 100

== send message with outgoing interface set to 0 ==
01:01:04sendmsg(sockfd:4, msg:0x3ffd18790c8, flags:0)
01:01:04return 100

== recv msg from server ==
01:01:05recv(sockfd:4, buf:0x3ffd187903c, len:100, flags:64)
01:01:05return 100
01:01:05close(4)

OK
01:01:05End