}
static void
-decode_msg_control(struct tcb *tcp, unsigned long addr,
+decode_msg_control(struct tcb *const tcp, const kernel_ureg_t addr,
const size_t in_control_len)
{
if (!in_control_len)
tprints("{msg_name=");
const int family =
- decode_sockaddr(tcp, (long) msg->msg_name, msg_namelen);
+ decode_sockaddr(tcp, (kernel_ureg_t) msg->msg_name, msg_namelen);
const enum iov_decode decode =
(family == AF_NETLINK) ? IOV_DECODE_NETLINK : IOV_DECODE_STR;
tprints(", msg_iov=");
tprint_iov_upto(tcp, (unsigned long) msg->msg_iovlen,
- (unsigned long) msg->msg_iov, decode, data_size);
+ (kernel_ureg_t) msg->msg_iov, decode, data_size);
tprintf(", msg_iovlen=%lu", (unsigned long) msg->msg_iovlen);
- decode_msg_control(tcp, (unsigned long) msg->msg_control,
+ decode_msg_control(tcp, (kernel_ureg_t) msg->msg_control,
msg->msg_controllen);
tprintf(", msg_controllen=%lu", (unsigned long) msg->msg_controllen);
}
static bool
-fetch_msghdr_namelen(struct tcb *tcp, const long addr, int *const p_msg_namelen)
+fetch_msghdr_namelen(struct tcb *const tcp, const kernel_ureg_t addr,
+ int *const p_msg_namelen)
{
struct msghdr msg;
}
static void
-decode_msghdr(struct tcb *tcp, const int *const p_user_msg_namelen,
- const long addr, const unsigned long data_size)
+decode_msghdr(struct tcb *const tcp, const int *const p_user_msg_namelen,
+ const kernel_ureg_t addr, const unsigned long data_size)
{
struct msghdr msg;
}
void
-dumpiov_in_msghdr(struct tcb *tcp, long addr, unsigned long data_size)
+dumpiov_in_msghdr(struct tcb *const tcp, const kernel_ureg_t addr,
+ const unsigned long data_size)
{
struct msghdr msg;
- if (fetch_struct_msghdr(tcp, addr, &msg))
- dumpiov_upto(tcp, msg.msg_iovlen, (long)msg.msg_iov, data_size);
+ if (fetch_struct_msghdr(tcp, addr, &msg)) {
+ dumpiov_upto(tcp, msg.msg_iovlen,
+ (kernel_ureg_t) msg.msg_iov, data_size);
+ }
}
SYS_FUNC(sendmsg)
{
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
- decode_msghdr(tcp, 0, tcp->u_arg[1], (unsigned long) -1L);
+ decode_msghdr(tcp, 0, tcp->u_arg[1], -1UL);
/* flags */
tprints(", ");
printflags(msg_flags, tcp->u_arg[2], "MSG_???");