Test Information

TitleSpecifying the source IPv6 address as ancillary data
CommandLine./tst_send_src_addr_udp --log=6.html --title=Specifying the source IPv6 address as ancillary data
TestVersionREL_1_1_18
Start2023/02/03 01:01:09
SystemName(null)
KernelVersion(null)

Test Sequence Execution Log

01:01:09Start

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

== bind socket to address ==
01:01:10bind(sockfd:4, my_addr:0x3fff4678d24, addrlen:28)
01:01:10return 0
01:01:10inet_pton(af:AF_INET6, src:"fe80::1", dst:0x3fff4678cc0)
01:01:10return 1, dst=fe80:0000:0000:0000:0000:0000:0000:0001

== send message from specified source address ==
01:01:10sendmsg(sockfd:4, msg:0x3fff4678cd8, flags:0)
01:01:10return -1

== send message from loopbak address ==
01:01:10sendmsg(sockfd:4, msg:0x3fff4678cd8, flags:0)
01:01:10return 100

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

== send message from unspecified address ==
01:01:11sendmsg(sockfd:4, msg:0x3fff4678cd8, flags:0)
01:01:11return 100

== recv message ==
01:01:11recv(sockfd:4, buf:0x3fff4678c4c, len:100, flags:64)
01:01:11return 100
01:01:11inet_pton(af:AF_INET6, src:"fe80::4caa:b0ff:fe5b:7108", dst:0x3fff4678cc0)
01:01:11return 1, dst=fe80:0000:0000:0000:4caa:b0ff:fe5b:7108

== send message from link-local address ==
01:01:11sendmsg(sockfd:4, msg:0x3fff4678cd8, flags:0)
01:01:11return -1
01:01:11if_nametoindex(ifname:"dummy_ipv6")
01:01:11return 3

== send message from link-local addresses bound to interface ==
01:01:11sendmsg(sockfd:4, msg:0x3fff4678cd8, flags:0)
01:01:11return -1

== bind socket to interface ==
01:01:11setsockopt(sockfd:4, level:IPPROTO_ICMP, optname:IPV6_RECVERR, optval:0x2df2490, optlen:11)
01:01:11return 0

== send message from link-local addresses bound to interface ==
01:01:11sendmsg(sockfd:4, msg:0x3fff4678cd8, flags:0)
01:01:11return -1
01:01:11close(4)

OK
01:01:11End