net.c: rename printsock to decode_sockaddr
* defs.h (printsock): Rename to decode_sockaddr.
* net.c (printsock): Likewise.
(do_msghdr, SYS_FUNC(bind), do_sockname, SYS_FUNC(sendto),
SYS_FUNC(recvfrom)): Replace printsock with decode_sockaddr.
diff --git a/defs.h b/defs.h
index 1d12e66..c792193 100644
--- a/defs.h
+++ b/defs.h
@@ -655,7 +655,7 @@
extern bool print_sockaddr_by_inode(const unsigned long, const enum sock_proto);
extern bool print_sockaddr_by_inode_cached(const unsigned long);
extern void print_dirfd(struct tcb *, int);
-extern int printsock(struct tcb *, long, int);
+extern int decode_sockaddr(struct tcb *, long, int);
#ifdef ALPHA
extern void printrusage32(struct tcb *, long);
extern const char *sprint_timeval32(struct tcb *tcp, long);
diff --git a/net.c b/net.c
index cc06374..517248a 100644
--- a/net.c
+++ b/net.c
@@ -302,7 +302,7 @@
}
int
-printsock(struct tcb *tcp, long addr, int addrlen)
+decode_sockaddr(struct tcb *tcp, long addr, int addrlen)
{
if (addrlen < 2) {
printaddr(addr);
@@ -625,7 +625,7 @@
do_msghdr(struct tcb *tcp, struct msghdr *msg, unsigned long data_size)
{
tprintf("{msg_name(%d)=", msg->msg_namelen);
- printsock(tcp, (long)msg->msg_name, msg->msg_namelen);
+ decode_sockaddr(tcp, (long)msg->msg_name, msg->msg_namelen);
tprintf(", msg_iov(%lu)=", (unsigned long)msg->msg_iovlen);
@@ -849,7 +849,7 @@
{
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
- printsock(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+ decode_sockaddr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu", tcp->u_arg[2]);
return RVAL_DECODED;
@@ -880,7 +880,7 @@
tprints(", ");
printaddr(tcp->u_arg[2]);
} else {
- printsock(tcp, tcp->u_arg[1], len);
+ decode_sockaddr(tcp, tcp->u_arg[1], len);
tprintf(", [%d]", len);
}
@@ -926,7 +926,7 @@
printflags(msg_flags, tcp->u_arg[3], "MSG_???");
/* to address */
tprints(", ");
- printsock(tcp, tcp->u_arg[4], tcp->u_arg[5]);
+ decode_sockaddr(tcp, tcp->u_arg[4], tcp->u_arg[5]);
/* to length */
tprintf(", %lu", tcp->u_arg[5]);
@@ -1008,7 +1008,7 @@
return 0;
}
/* from address */
- printsock(tcp, tcp->u_arg[4], fromlen);
+ decode_sockaddr(tcp, tcp->u_arg[4], fromlen);
/* from length */
tprintf(", [%u]", fromlen);
}