Lines Matching refs:tcp
161 print_sockaddr(struct tcb *tcp, const sockaddr_buf_t *addr, const int addrlen) in print_sockaddr() argument
284 printsock(struct tcb *tcp, long addr, int addrlen) in printsock() argument
297 if (umoven_or_printaddr(tcp, addr, addrlen, addrbuf.pad)) in printsock()
301 print_sockaddr(tcp, &addrbuf, addrlen); in printsock()
324 print_scm_rights(struct tcb *tcp, const void *cmsg_data, in print_scm_rights() argument
340 printfd(tcp, *fds++); in print_scm_rights()
346 print_scm_creds(struct tcb *tcp, const void *cmsg_data, in print_scm_creds() argument
359 print_scm_security(struct tcb *tcp, const void *cmsg_data, in print_scm_security() argument
370 print_cmsg_ip_pktinfo(struct tcb *tcp, const void *cmsg_data, in print_cmsg_ip_pktinfo() argument
385 print_cmsg_ip_ttl(struct tcb *tcp, const void *cmsg_data, in print_cmsg_ip_ttl() argument
397 print_cmsg_ip_tos(struct tcb *tcp, const void *cmsg_data, in print_cmsg_ip_tos() argument
409 print_cmsg_ip_checksum(struct tcb *tcp, const void *cmsg_data, in print_cmsg_ip_checksum() argument
421 print_cmsg_ip_opts(struct tcb *tcp, const void *cmsg_data, in print_cmsg_ip_opts() argument
437 print_cmsg_ip_recverr(struct tcb *tcp, const void *cmsg_data, in print_cmsg_ip_recverr() argument
458 print_sockaddr(tcp, (const void *) &err->offender, in print_cmsg_ip_recverr()
464 print_cmsg_ip_origdstaddr(struct tcb *tcp, const void *cmsg_data, in print_cmsg_ip_origdstaddr() argument
471 print_sockaddr(tcp, cmsg_data, data_len); in print_cmsg_ip_origdstaddr()
475 print_cmsg_type_data(struct tcb *tcp, const int cmsg_level, const int cmsg_type, in print_cmsg_type_data() argument
483 print_scm_rights(tcp, cmsg_data, data_len); in print_cmsg_type_data()
486 print_scm_creds(tcp, cmsg_data, data_len); in print_cmsg_type_data()
489 print_scm_security(tcp, cmsg_data, data_len); in print_cmsg_type_data()
497 print_cmsg_ip_pktinfo(tcp, cmsg_data, data_len); in print_cmsg_type_data()
500 print_cmsg_ip_ttl(tcp, cmsg_data, data_len); in print_cmsg_type_data()
503 print_cmsg_ip_tos(tcp, cmsg_data, data_len); in print_cmsg_type_data()
507 print_cmsg_ip_opts(tcp, cmsg_data, data_len); in print_cmsg_type_data()
510 print_cmsg_ip_recverr(tcp, cmsg_data, data_len); in print_cmsg_type_data()
513 print_cmsg_ip_origdstaddr(tcp, cmsg_data, data_len); in print_cmsg_type_data()
516 print_cmsg_ip_checksum(tcp, cmsg_data, data_len); in print_cmsg_type_data()
519 print_scm_security(tcp, cmsg_data, data_len); in print_cmsg_type_data()
529 printcmsghdr(struct tcb *tcp, unsigned long addr, size_t len) in printcmsghdr() argument
538 if (!buf || umoven(tcp, addr, len, buf) < 0) { in printcmsghdr()
574 print_cmsg_type_data(tcp, cmsg_level, cmsg_type, in printcmsghdr()
599 do_msghdr(struct tcb *tcp, struct msghdr *msg, unsigned long data_size) in do_msghdr() argument
602 printsock(tcp, (long)msg->msg_name, msg->msg_namelen); in do_msghdr()
605 tprint_iov_upto(tcp, (unsigned long)msg->msg_iovlen, in do_msghdr()
611 printcmsghdr(tcp, (unsigned long) msg->msg_control, in do_msghdr()
658 extractmsghdr(struct tcb *tcp, long addr, struct msghdr *msg) in extractmsghdr() argument
664 if (umove(tcp, addr, &msg32) < 0) in extractmsghdr()
669 if (umove(tcp, addr, msg) < 0) in extractmsghdr()
675 extractmmsghdr(struct tcb *tcp, long addr, unsigned int idx, struct mmsghdr *mmsg) in extractmmsghdr() argument
682 if (umove(tcp, addr, &mmsg32) < 0) in extractmmsghdr()
691 if (umove(tcp, addr, mmsg) < 0) in extractmmsghdr()
698 printmsghdr(struct tcb *tcp, long addr, unsigned long data_size) in printmsghdr() argument
702 if (verbose(tcp) && extractmsghdr(tcp, addr, &msg)) in printmsghdr()
703 do_msghdr(tcp, &msg, data_size); in printmsghdr()
709 dumpiov_in_msghdr(struct tcb *tcp, long addr) in dumpiov_in_msghdr() argument
713 if (extractmsghdr(tcp, addr, &msg)) in dumpiov_in_msghdr()
714 dumpiov(tcp, msg.msg_iovlen, (long)msg.msg_iov); in dumpiov_in_msghdr()
718 printmmsghdr(struct tcb *tcp, long addr, unsigned int idx, unsigned long msg_len) in printmmsghdr() argument
722 if (extractmmsghdr(tcp, addr, idx, &mmsg)) { in printmmsghdr()
724 do_msghdr(tcp, &mmsg.msg_hdr, msg_len ? msg_len : mmsg.msg_len); in printmmsghdr()
732 decode_mmsg(struct tcb *tcp, unsigned long msg_len) in decode_mmsg() argument
735 if (syserror(tcp)) { in decode_mmsg()
736 printaddr(tcp->u_arg[1]); in decode_mmsg()
738 unsigned int len = tcp->u_rval; in decode_mmsg()
745 printmmsghdr(tcp, tcp->u_arg[1], i, msg_len); in decode_mmsg()
750 tprintf(", %u, ", (unsigned int) tcp->u_arg[2]); in decode_mmsg()
752 printflags(msg_flags, tcp->u_arg[3], "MSG_???"); in decode_mmsg()
756 dumpiov_in_mmsghdr(struct tcb *tcp, long addr) in dumpiov_in_mmsghdr() argument
758 unsigned int len = tcp->u_rval; in dumpiov_in_mmsghdr()
763 if (extractmmsghdr(tcp, addr, i, &mmsg)) { in dumpiov_in_mmsghdr()
766 dumpiov(tcp, mmsg.msg_hdr.msg_iovlen, in dumpiov_in_mmsghdr()
793 printxval(domains, tcp->u_arg[0], "PF_???"); in SYS_FUNC()
795 tprint_sock_type(tcp->u_arg[1]); in SYS_FUNC()
797 switch (tcp->u_arg[0]) { in SYS_FUNC()
802 printxval(inet_protocols, tcp->u_arg[2], "IPPROTO_???"); in SYS_FUNC()
808 printxval(domains, tcp->u_arg[2], "PF_???"); in SYS_FUNC()
814 printxval(netlink_protocols, tcp->u_arg[2], "NETLINK_???"); in SYS_FUNC()
819 printxval(bt_protocols, tcp->u_arg[2], "BTPROTO_???"); in SYS_FUNC()
823 tprintf("%lu", tcp->u_arg[2]); in SYS_FUNC()
832 printfd(tcp, tcp->u_arg[0]); in SYS_FUNC()
834 printsock(tcp, tcp->u_arg[1], tcp->u_arg[2]); in SYS_FUNC()
835 tprintf(", %lu", tcp->u_arg[2]); in SYS_FUNC()
842 printfd(tcp, tcp->u_arg[0]); in SYS_FUNC()
844 tprintf("%lu", tcp->u_arg[1]); in SYS_FUNC()
850 do_sockname(struct tcb *tcp, int flags_arg) in do_sockname() argument
852 if (entering(tcp)) { in do_sockname()
853 printfd(tcp, tcp->u_arg[0]); in do_sockname()
859 if (!tcp->u_arg[2] || !verbose(tcp) || syserror(tcp) || in do_sockname()
860 umove(tcp, tcp->u_arg[2], &len) < 0) { in do_sockname()
861 printaddr(tcp->u_arg[1]); in do_sockname()
863 printaddr(tcp->u_arg[2]); in do_sockname()
865 printsock(tcp, tcp->u_arg[1], len); in do_sockname()
871 printflags(sock_type_flags, tcp->u_arg[flags_arg], in do_sockname()
879 do_sockname(tcp, -1); in SYS_FUNC()
885 do_sockname(tcp, 3); in SYS_FUNC()
891 printfd(tcp, tcp->u_arg[0]); in SYS_FUNC()
893 printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); in SYS_FUNC()
894 tprintf(", %lu, ", tcp->u_arg[2]); in SYS_FUNC()
896 printflags(msg_flags, tcp->u_arg[3], "MSG_???"); in SYS_FUNC()
903 printfd(tcp, tcp->u_arg[0]); in SYS_FUNC()
905 printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); in SYS_FUNC()
906 tprintf(", %lu, ", tcp->u_arg[2]); in SYS_FUNC()
908 printflags(msg_flags, tcp->u_arg[3], "MSG_???"); in SYS_FUNC()
911 printsock(tcp, tcp->u_arg[4], tcp->u_arg[5]); in SYS_FUNC()
913 tprintf(", %lu", tcp->u_arg[5]); in SYS_FUNC()
920 printfd(tcp, tcp->u_arg[0]); in SYS_FUNC()
922 printmsghdr(tcp, tcp->u_arg[1], (unsigned long) -1L); in SYS_FUNC()
925 printflags(msg_flags, tcp->u_arg[2], "MSG_???"); in SYS_FUNC()
932 if (entering(tcp)) { in SYS_FUNC()
934 printfd(tcp, tcp->u_arg[0]); in SYS_FUNC()
936 if (!verbose(tcp)) { in SYS_FUNC()
938 tcp->u_arg[1], (unsigned int) tcp->u_arg[2]); in SYS_FUNC()
939 printflags(msg_flags, tcp->u_arg[3], "MSG_???"); in SYS_FUNC()
942 if (verbose(tcp)) in SYS_FUNC()
943 decode_mmsg(tcp, (unsigned long) -1L); in SYS_FUNC()
950 if (entering(tcp)) { in SYS_FUNC()
951 printfd(tcp, tcp->u_arg[0]); in SYS_FUNC()
954 if (syserror(tcp)) in SYS_FUNC()
955 printaddr(tcp->u_arg[1]); in SYS_FUNC()
957 printstr(tcp, tcp->u_arg[1], tcp->u_rval); in SYS_FUNC()
959 tprintf(", %lu, ", tcp->u_arg[2]); in SYS_FUNC()
960 printflags(msg_flags, tcp->u_arg[3], "MSG_???"); in SYS_FUNC()
969 if (entering(tcp)) { in SYS_FUNC()
970 printfd(tcp, tcp->u_arg[0]); in SYS_FUNC()
974 if (syserror(tcp)) { in SYS_FUNC()
975 printaddr(tcp->u_arg[1]); in SYS_FUNC()
977 printstr(tcp, tcp->u_arg[1], tcp->u_rval); in SYS_FUNC()
980 tprintf(", %lu, ", tcp->u_arg[2]); in SYS_FUNC()
982 printflags(msg_flags, tcp->u_arg[3], "MSG_???"); in SYS_FUNC()
984 if (syserror(tcp) || !tcp->u_arg[4] || !tcp->u_arg[5] || in SYS_FUNC()
985 umove(tcp, tcp->u_arg[5], &fromlen) < 0) { in SYS_FUNC()
987 printaddr(tcp->u_arg[4]); in SYS_FUNC()
989 printaddr(tcp->u_arg[5]); in SYS_FUNC()
993 printsock(tcp, tcp->u_arg[4], fromlen); in SYS_FUNC()
1002 if (entering(tcp)) { in SYS_FUNC()
1003 printfd(tcp, tcp->u_arg[0]); in SYS_FUNC()
1006 if (syserror(tcp)) in SYS_FUNC()
1007 printaddr(tcp->u_arg[1]); in SYS_FUNC()
1009 printmsghdr(tcp, tcp->u_arg[1], tcp->u_rval); in SYS_FUNC()
1012 printflags(msg_flags, tcp->u_arg[2], "MSG_???"); in SYS_FUNC()
1021 if (entering(tcp)) { in SYS_FUNC()
1022 printfd(tcp, tcp->u_arg[0]); in SYS_FUNC()
1024 if (verbose(tcp)) { in SYS_FUNC()
1028 tcp->auxstr = sprint_timespec(tcp, tcp->u_arg[4]); in SYS_FUNC()
1030 tprintf("%#lx, %ld, ", tcp->u_arg[1], tcp->u_arg[2]); in SYS_FUNC()
1031 printflags(msg_flags, tcp->u_arg[3], "MSG_???"); in SYS_FUNC()
1033 print_timespec(tcp, tcp->u_arg[4]); in SYS_FUNC()
1037 if (verbose(tcp)) { in SYS_FUNC()
1038 decode_mmsg(tcp, 0); in SYS_FUNC()
1041 tprints(tcp->auxstr); in SYS_FUNC()
1042 tcp->auxstr = NULL; in SYS_FUNC()
1044 if (syserror(tcp)) in SYS_FUNC()
1046 if (tcp->u_rval == 0) { in SYS_FUNC()
1047 tcp->auxstr = "Timeout"; in SYS_FUNC()
1050 if (!verbose(tcp)) in SYS_FUNC()
1054 sprint_timespec(tcp, tcp->u_arg[4])); in SYS_FUNC()
1055 tcp->auxstr = str; in SYS_FUNC()
1064 printfd(tcp, tcp->u_arg[0]); in SYS_FUNC()
1066 printxval(shutdown_modes, tcp->u_arg[1], "SHUT_???"); in SYS_FUNC()
1073 return do_sockname(tcp, -1); in SYS_FUNC()
1077 printpair_fd(struct tcb *tcp, const int i0, const int i1) in printpair_fd() argument
1080 printfd(tcp, i0); in printpair_fd()
1082 printfd(tcp, i1); in printpair_fd()
1087 decode_pair_fd(struct tcb *tcp, const long addr) in decode_pair_fd() argument
1091 if (umove_or_printaddr(tcp, addr, &pair)) in decode_pair_fd()
1094 printpair_fd(tcp, pair[0], pair[1]); in decode_pair_fd()
1098 do_pipe(struct tcb *tcp, int flags_arg) in do_pipe() argument
1100 if (exiting(tcp)) { in do_pipe()
1101 if (syserror(tcp)) { in do_pipe()
1102 printaddr(tcp->u_arg[0]); in do_pipe()
1106 printpair_fd(tcp, tcp->u_rval, getrval2(tcp)); in do_pipe()
1109 decode_pair_fd(tcp, tcp->u_arg[0]); in do_pipe()
1113 printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???"); in do_pipe()
1121 return do_pipe(tcp, -1); in SYS_FUNC()
1126 return do_pipe(tcp, 1); in SYS_FUNC()
1131 if (entering(tcp)) { in SYS_FUNC()
1132 printxval(domains, tcp->u_arg[0], "PF_???"); in SYS_FUNC()
1134 tprint_sock_type(tcp->u_arg[1]); in SYS_FUNC()
1135 tprintf(", %lu", tcp->u_arg[2]); in SYS_FUNC()
1138 decode_pair_fd(tcp, tcp->u_arg[3]); in SYS_FUNC()
1157 print_sockopt_fd_level_name(struct tcb *tcp, int fd, int level, int name, bool is_getsockopt) in print_sockopt_fd_level_name() argument
1159 printfd(tcp, fd); in print_sockopt_fd_level_name()
1203 print_linger(struct tcb *tcp, long addr, int len) in print_linger() argument
1208 umove(tcp, addr, &linger) < 0) { in print_linger()
1221 print_ucred(struct tcb *tcp, long addr, int len) in print_ucred() argument
1226 umove(tcp, addr, &uc) < 0) { in print_ucred()
1239 print_tpacket_stats(struct tcb *tcp, long addr, int len) in print_tpacket_stats() argument
1244 umove(tcp, addr, &stats) < 0) { in print_tpacket_stats()
1258 print_icmp_filter(struct tcb *tcp, long addr, int len) in print_icmp_filter() argument
1263 umove(tcp, addr, &filter) < 0) { in print_icmp_filter()
1275 print_getsockopt(struct tcb *tcp, int level, int name, long addr, int len) in print_getsockopt() argument
1277 if (addr && verbose(tcp)) in print_getsockopt()
1283 print_linger(tcp, addr, len); in print_getsockopt()
1288 print_ucred(tcp, addr, len); in print_getsockopt()
1298 print_tpacket_stats(tcp, addr, len); in print_getsockopt()
1308 print_icmp_filter(tcp, addr, len); in print_getsockopt()
1317 if (verbose(tcp)) { in print_getsockopt()
1319 printnum_int(tcp, addr, "%d"); in print_getsockopt()
1321 printstr(tcp, addr, len); in print_getsockopt()
1332 if (entering(tcp)) { in SYS_FUNC()
1333 print_sockopt_fd_level_name(tcp, tcp->u_arg[0], in SYS_FUNC()
1334 tcp->u_arg[1], tcp->u_arg[2], true); in SYS_FUNC()
1338 if (syserror(tcp) || umove(tcp, tcp->u_arg[4], &len) < 0) { in SYS_FUNC()
1340 tcp->u_arg[3], tcp->u_arg[4]); in SYS_FUNC()
1342 print_getsockopt(tcp, tcp->u_arg[1], tcp->u_arg[2], in SYS_FUNC()
1343 tcp->u_arg[3], len); in SYS_FUNC()
1351 print_mreq(struct tcb *tcp, long addr, unsigned int len) in print_mreq() argument
1356 printstr(tcp, addr, len); in print_mreq()
1359 if (umove_or_printaddr(tcp, addr, &mreq)) in print_mreq()
1374 print_mreq6(struct tcb *tcp, long addr, unsigned int len) in print_mreq6() argument
1381 if (umove_or_printaddr(tcp, addr, &mreq)) in print_mreq6()
1400 printstr(tcp, addr, len); in print_mreq6()
1406 print_group_req(struct tcb *tcp, long addr, int len) in print_group_req() argument
1411 umove(tcp, addr, &greq) < 0) { in print_group_req()
1417 print_sockaddr(tcp, (const void *) &greq.gr_group, in print_group_req()
1426 print_tpacket_req(struct tcb *tcp, long addr, int len) in print_tpacket_req() argument
1431 umove(tcp, addr, &req) < 0) { in print_tpacket_req()
1448 print_packet_mreq(struct tcb *tcp, long addr, int len) in print_packet_mreq() argument
1453 umove(tcp, addr, &mreq) < 0) { in print_packet_mreq()
1471 print_setsockopt(struct tcb *tcp, int level, int name, long addr, int len) in print_setsockopt() argument
1473 if (addr && verbose(tcp)) in print_setsockopt()
1479 print_linger(tcp, addr, len); in print_setsockopt()
1490 print_mreq(tcp, addr, len); in print_setsockopt()
1496 print_group_req(tcp, addr, len); in print_setsockopt()
1513 print_mreq6(tcp, addr, len); in print_setsockopt()
1526 print_tpacket_req(tcp, addr, len); in print_setsockopt()
1532 print_packet_mreq(tcp, addr, len); in print_setsockopt()
1542 print_icmp_filter(tcp, addr, len); in print_setsockopt()
1551 if (verbose(tcp)) { in print_setsockopt()
1553 printnum_int(tcp, addr, "%d"); in print_setsockopt()
1555 printstr(tcp, addr, len); in print_setsockopt()
1566 print_sockopt_fd_level_name(tcp, tcp->u_arg[0], in SYS_FUNC()
1567 tcp->u_arg[1], tcp->u_arg[2], false); in SYS_FUNC()
1568 print_setsockopt(tcp, tcp->u_arg[1], tcp->u_arg[2], in SYS_FUNC()
1569 tcp->u_arg[3], tcp->u_arg[4]); in SYS_FUNC()