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

Test Sequence Execution Log

08:41:05Start

== create an IPv6/UDP socket ==
08:41:05socket(domain:AF_INET6, type:SOCK_DGRAM, protocol:0)
08:41:05return sockfd=4
08:41:06tst_get_unused_port() get port 56619

== bind socket to address ==
08:41:06bind(sockfd:4, my_addr:0x7fff48f79610, addrlen:28)
08:41:06return 0

== send message on non-exist interface ==
08:41:07sendmsg(sockfd:4, msg:0x7fff48f795c0, flags:0)
08:41:07return -1
08:41:07if_nametoindex(ifname:"lo")
08:41:07return 1

== send message on interface lo ==
08:41:07sendmsg(sockfd:4, msg:0x7fff48f795c0, flags:0)
08:41:07return 100

== recv message ==
08:41:07recv(sockfd:4, buf:0x7fff48f79520, len:100, flags:64)
08:41:07return 100

== send message with outgoing interface set to 0 ==
08:41:07sendmsg(sockfd:4, msg:0x7fff48f795c0, flags:0)
08:41:07return 100

== recv msg from server ==
08:41:07recv(sockfd:4, buf:0x7fff48f79520, len:100, flags:64)
08:41:07return 100
08:41:07close(4)

OK
08:41:07End