constants.
* Bug fixes
+ * Fixed ordering of sockaddr_in6 fields.
* Fixed strace-k test on alpha.
* Fixed build on mips o32.
* Fixed build on NOMMU architectures.
const struct sockaddr_in6 *const sa_in6 = buf;
PRINT_FIELD_NET_PORT("", *sa_in6, sin6_port);
- PRINT_FIELD_INET_ADDR(", ", *sa_in6, sin6_addr, AF_INET6);
tprints(", sin6_flowinfo=");
if (xlat_verbose(xlat_verbosity) != XLAT_STYLE_ABBREV)
print_quoted_string((const char*) &sa_in6->sin6_flowinfo,
if (xlat_verbose(xlat_verbosity) == XLAT_STYLE_ABBREV)
tprintf("htonl(%u)", ntohl(sa_in6->sin6_flowinfo));
+ PRINT_FIELD_INET_ADDR(", ", *sa_in6, sin6_addr, AF_INET6);
if (addrlen <= (int) SIN6_MIN_LEN)
return;
{
ARG_STR(SOL_IPV6), ARG_STR(MCAST_JOIN_GROUP), greq6,
"gr_group={sa_family=AF_INET6, sin6_port=htons(65535)"
- ", inet_pton(AF_INET6, \"" multi6addr "\", &sin6_addr)"
", sin6_flowinfo=htonl(4294967295)"
+ ", inet_pton(AF_INET6, \"" multi6addr "\", &sin6_addr)"
", sin6_scope_id=4294967295}"
},
{
ARG_STR(SOL_IPV6), ARG_STR(MCAST_LEAVE_GROUP), greq6,
"gr_group={sa_family=AF_INET6, sin6_port=htons(65535)"
- ", inet_pton(AF_INET6, \"" multi6addr "\", &sin6_addr)"
", sin6_flowinfo=htonl(4294967295)"
+ ", inet_pton(AF_INET6, \"" multi6addr "\", &sin6_addr)"
", sin6_scope_id=4294967295}"
}
};
unsigned int len = sizeof(*in6);
int ret = connect(-1, (void *) in6, len);
printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)"
- ", inet_pton(AF_INET6, \"%s\", &sin6_addr)"
", sin6_flowinfo=htonl(%u)"
+ ", inet_pton(AF_INET6, \"%s\", &sin6_addr)"
", sin6_scope_id=%u}, %u)"
" = %d EBADF (%m)\n",
- ntohs(in6->sin6_port), h_addr,
- ntohl(in6->sin6_flowinfo), in6->sin6_scope_id, len, ret);
+ ntohs(in6->sin6_port), ntohl(in6->sin6_flowinfo),
+ h_addr, in6->sin6_scope_id, len, ret);
in6->sin6_scope_id = ifindex_lo();
if (in6->sin6_scope_id) {
ret = connect(-1, (void *) in6, len);
printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)"
- ", inet_pton(AF_INET6, \"%s\", &sin6_addr)"
", sin6_flowinfo=htonl(%u)"
+ ", inet_pton(AF_INET6, \"%s\", &sin6_addr)"
", sin6_scope_id=%s}, %u)"
" = %d EBADF (%m)\n",
- ntohs(in6->sin6_port), h_addr, ntohl(in6->sin6_flowinfo),
+ ntohs(in6->sin6_port), ntohl(in6->sin6_flowinfo), h_addr,
IFINDEX_LO_STR, len, ret);
}
}
unsigned int len = sizeof(*in6);
int ret = connect(-1, (void *) in6, len);
printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)"
+ ", sin6_flowinfo=htonl(%u)"
", inet_pton(AF_INET6, \"%s\", &sin6_addr)"
- ", sin6_flowinfo=htonl(%u), sin6_scope_id=%u}, %u)"
+ ", sin6_scope_id=%u}, %u)"
" = %d EBADF (%m)\n",
- h_port, h_addr, h_flowinfo, in6->sin6_scope_id, len, ret);
+ h_port, h_flowinfo, h_addr, in6->sin6_scope_id, len, ret);
check_in6_linklocal(in6, "fe80::");
check_in6_linklocal(in6, "ff42::");
len = sizeof(*in6) + 4;
ret = connect(-1, (void *) in6, len);
printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)"
+ ", sin6_flowinfo=htonl(%u)"
", inet_pton(AF_INET6, \"%s\", &sin6_addr)"
- ", sin6_flowinfo=htonl(%u), sin6_scope_id=%u}, %u)"
+ ", sin6_scope_id=%u}, %u)"
" = %d EBADF (%m)\n",
- h_port, h_addr, h_flowinfo, in6->sin6_scope_id, len, ret);
+ h_port, h_flowinfo, h_addr, in6->sin6_scope_id, len, ret);
in6 = ((void *) in6) + 4 + sizeof(in6->sin6_scope_id);
in6->sin6_family = AF_INET6;
len = sizeof(*in6) - sizeof(in6->sin6_scope_id);
ret = connect(-1, (void *) in6, len);
printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)"
- ", inet_pton(AF_INET6, \"%s\", &sin6_addr)"
- ", sin6_flowinfo=htonl(%u)}, %u)"
+ ", sin6_flowinfo=htonl(%u)"
+ ", inet_pton(AF_INET6, \"%s\", &sin6_addr)}, %u)"
" = %d EBADF (%m)\n",
- h_port, h_addr, h_flowinfo, len, ret);
+ h_port, h_flowinfo, h_addr, len, ret);
in6 = ((void *) in6) + 4;
in6->sin6_family = AF_INET6;
#define TCP_STR "TCPv6"
#define INPORT sin6_port
#define INPORT_STR "sin6_port"
-#define INADDR_STR "inet_pton(AF_INET6, \"::1\", &sin6_addr)"
-#define SA_FIELDS ", sin6_flowinfo=htonl(0), sin6_scope_id=0"
+#define INADDR_STR "sin6_flowinfo=htonl(0)" \
+ ", inet_pton(AF_INET6, \"::1\", &sin6_addr)"
+#define SA_FIELDS ", sin6_scope_id=0"
#include "net-yy-inet.c"
#if XLAT_RAW
printf("connect(-1, {sa_family=%#x, sin6_port=", AF_INET6);
print_quoted_hex(&in6->sin6_port, sizeof(in6->sin6_port));
- printf(", sin6_addr=");
- print_quoted_hex(&in6->sin6_addr, sizeof(struct in6_addr));
printf(", sin6_flowinfo=");
print_quoted_hex(&in6->sin6_flowinfo, sizeof(in6->sin6_flowinfo));
- printf(", sin6_scope_id=%u}, %u)"
- " = %s\n", in6->sin6_scope_id, len, errstr);
+ printf(", sin6_addr=");
+ print_quoted_hex(&in6->sin6_addr, sizeof(struct in6_addr));
+ printf(", sin6_scope_id=%u}, %u) = %s\n",
+ in6->sin6_scope_id, len, errstr);
#elif XLAT_VERBOSE
printf("connect(-1, {sa_family=%#x /* AF_INET6 */", AF_INET6);
printf(", sin6_port=");
print_quoted_hex(&in6->sin6_port, sizeof(in6->sin6_port));
printf(" /* htons(%hu) */", ntohs(in6->sin6_port));
+ printf(", sin6_flowinfo=");
+ print_quoted_hex(&in6->sin6_flowinfo, sizeof(in6->sin6_flowinfo));
+ printf(" /* htonl(%u) */", ntohl(in6->sin6_flowinfo));
printf(", sin6_addr=");
print_quoted_hex(&in6->sin6_addr, sizeof(struct in6_addr));
printf(" /* inet_pton(AF_INET6, \"%s\") */", h_addr);
- printf(", sin6_flowinfo=");
- print_quoted_hex(&in6->sin6_flowinfo, sizeof(in6->sin6_flowinfo));
- printf(" /* htonl(%u) */"
- ", sin6_scope_id=%u}, %u)"
- " = %s\n",
- ntohl(in6->sin6_flowinfo), in6->sin6_scope_id,
- len, errstr);
+ printf(", sin6_scope_id=%u}, %u) = %s\n",
+ in6->sin6_scope_id, len, errstr);
#else
printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)"
- ", inet_pton(AF_INET6, \"%s\", &sin6_addr)"
", sin6_flowinfo=htonl(%u)"
+ ", inet_pton(AF_INET6, \"%s\", &sin6_addr)"
", sin6_scope_id=%u}, %u)"
" = %s\n",
- ntohs(in6->sin6_port), h_addr,
- ntohl(in6->sin6_flowinfo), in6->sin6_scope_id,
- len, errstr);
+ ntohs(in6->sin6_port), ntohl(in6->sin6_flowinfo),
+ h_addr, in6->sin6_scope_id, len, errstr);
#endif
}