• Home
  • Raw
  • Download

Lines Matching refs:tcp

1200 printsock(struct tcb *tcp, long addr, int addrlen)  in printsock()  argument
1226 if (!verbose(tcp)) { in printsock()
1235 if (umoven(tcp, addr, addrlen, addrbuf.pad) < 0) { in printsock()
1251 printpathn(tcp, addr + 2, strlen(addrbuf.sau.sun_path)); in printsock()
1254 printpathn(tcp, addr + 3, strlen(addrbuf.sau.sun_path + 1)); in printsock()
1335 printstr(tcp, (long) &((struct sockaddr *) addr)->sa_data, in printsock()
1354 printcmsghdr(struct tcb *tcp, unsigned long addr, unsigned long len) in printcmsghdr() argument
1358 if (cmsg == NULL || umoven(tcp, addr, len, (char *) cmsg) < 0) { in printcmsghdr()
1405 do_msghdr(struct tcb *tcp, struct msghdr *msg) in do_msghdr() argument
1408 printsock(tcp, (long)msg->msg_name, msg->msg_namelen); in do_msghdr()
1411 tprint_iov(tcp, (unsigned long)msg->msg_iovlen, in do_msghdr()
1417 printcmsghdr(tcp, (unsigned long) msg->msg_control, in do_msghdr()
1429 printmsghdr(tcp, addr) in printmsghdr() argument
1430 struct tcb *tcp; in printmsghdr()
1435 if (umove(tcp, addr, &msg) < 0) {
1439 do_msghdr(tcp, &msg);
1444 printmmsghdr(struct tcb *tcp, long addr) in printmmsghdr() argument
1451 if (umove(tcp, addr, &mmsg) < 0) { in printmmsghdr()
1456 do_msghdr(tcp, &mmsg.msg_hdr); in printmmsghdr()
1468 tprint_sock_type(struct tcb *tcp, int flags) in tprint_sock_type() argument
1484 sys_socket(struct tcb *tcp) in sys_socket() argument
1486 if (entering(tcp)) { in sys_socket()
1487 printxval(domains, tcp->u_arg[0], "PF_???"); in sys_socket()
1489 tprint_sock_type(tcp, tcp->u_arg[1]); in sys_socket()
1491 switch (tcp->u_arg[0]) { in sys_socket()
1496 printxval(protocols, tcp->u_arg[2], "IPPROTO_???"); in sys_socket()
1502 printxval(domains, tcp->u_arg[2], "PF_???"); in sys_socket()
1507 tprintf("%lu", tcp->u_arg[2]); in sys_socket()
1516 sys_so_socket(tcp) in sys_so_socket() argument
1517 struct tcb *tcp; in sys_so_socket()
1519 if (entering(tcp)) {
1524 tcp->u_arg[0], tcp->u_arg[1], tcp->u_arg[2]);
1525 printpath(tcp, tcp->u_arg[3]);
1526 tprintf(", %ld", tcp->u_arg[4]);
1532 sys_so_socketpair(tcp) in sys_so_socketpair() argument
1533 struct tcb *tcp; in sys_so_socketpair()
1535 if (entering(tcp)) {
1537 tprintf("0x%lx", tcp->u_arg[0]);
1544 sys_bind(tcp) in sys_bind() argument
1545 struct tcb *tcp; in sys_bind()
1547 if (entering(tcp)) {
1548 tprintf("%ld, ", tcp->u_arg[0]);
1549 printsock(tcp, tcp->u_arg[1], tcp->u_arg[2]);
1550 tprintf(", %lu", tcp->u_arg[2]);
1556 sys_connect(tcp) in sys_connect() argument
1557 struct tcb *tcp; in sys_connect()
1559 return sys_bind(tcp);
1563 sys_listen(tcp) in sys_listen() argument
1564 struct tcb *tcp; in sys_listen()
1566 if (entering(tcp)) {
1567 tprintf("%ld, %lu", tcp->u_arg[0], tcp->u_arg[1]);
1573 do_accept(struct tcb *tcp, int flags_arg) in do_accept() argument
1575 if (entering(tcp)) { in do_accept()
1576 tprintf("%ld, ", tcp->u_arg[0]); in do_accept()
1579 if (!tcp->u_arg[2]) in do_accept()
1580 tprintf("%#lx, NULL", tcp->u_arg[1]); in do_accept()
1583 if (tcp->u_arg[1] == 0 || syserror(tcp) in do_accept()
1584 || umove (tcp, tcp->u_arg[2], &len) < 0) { in do_accept()
1585 tprintf("%#lx", tcp->u_arg[1]); in do_accept()
1587 printsock(tcp, tcp->u_arg[1], len); in do_accept()
1590 printnum_int(tcp, tcp->u_arg[2], "%u"); in do_accept()
1594 printflags(sock_type_flags, tcp->u_arg[flags_arg], in do_accept()
1601 sys_accept(struct tcb *tcp) in sys_accept() argument
1603 return do_accept(tcp, -1); in sys_accept()
1608 sys_accept4(struct tcb *tcp) in sys_accept4() argument
1610 return do_accept(tcp, 3); in sys_accept4()
1615 sys_send(tcp) in sys_send() argument
1616 struct tcb *tcp; in sys_send()
1618 if (entering(tcp)) {
1619 tprintf("%ld, ", tcp->u_arg[0]);
1620 printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
1621 tprintf(", %lu, ", tcp->u_arg[2]);
1623 printflags(msg_flags, tcp->u_arg[3], "MSG_???");
1629 sys_sendto(tcp) in sys_sendto() argument
1630 struct tcb *tcp; in sys_sendto()
1632 if (entering(tcp)) {
1633 tprintf("%ld, ", tcp->u_arg[0]);
1634 printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
1635 tprintf(", %lu, ", tcp->u_arg[2]);
1637 printflags(msg_flags, tcp->u_arg[3], "MSG_???");
1640 printsock(tcp, tcp->u_arg[4], tcp->u_arg[5]);
1642 tprintf(", %lu", tcp->u_arg[5]);
1650 sys_sendmsg(tcp) in sys_sendmsg() argument
1651 struct tcb *tcp; in sys_sendmsg()
1653 if (entering(tcp)) {
1654 tprintf("%ld, ", tcp->u_arg[0]);
1655 printmsghdr(tcp, tcp->u_arg[1]);
1658 printflags(msg_flags, tcp->u_arg[2], "MSG_???");
1666 sys_recv(tcp) in sys_recv() argument
1667 struct tcb *tcp; in sys_recv()
1669 if (entering(tcp)) {
1670 tprintf("%ld, ", tcp->u_arg[0]);
1672 if (syserror(tcp))
1673 tprintf("%#lx", tcp->u_arg[1]);
1675 printstr(tcp, tcp->u_arg[1], tcp->u_rval);
1677 tprintf(", %lu, ", tcp->u_arg[2]);
1678 printflags(msg_flags, tcp->u_arg[3], "MSG_???");
1684 sys_recvfrom(tcp) in sys_recvfrom() argument
1685 struct tcb *tcp; in sys_recvfrom()
1689 if (entering(tcp)) {
1690 tprintf("%ld, ", tcp->u_arg[0]);
1692 if (syserror(tcp)) {
1694 tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3],
1695 tcp->u_arg[4], tcp->u_arg[5]);
1699 printstr(tcp, tcp->u_arg[1], tcp->u_rval);
1701 tprintf(", %lu, ", tcp->u_arg[2]);
1703 printflags(msg_flags, tcp->u_arg[3], "MSG_???");
1705 if (!tcp->u_arg[4] || !tcp->u_arg[5]) {
1706 if (tcp->u_arg[4] == 0)
1709 tprintf(", %#lx", tcp->u_arg[4]);
1710 if (tcp->u_arg[5] == 0)
1713 tprintf(", %#lx", tcp->u_arg[5]);
1716 if (umove(tcp, tcp->u_arg[5], &fromlen) < 0) {
1721 printsock(tcp, tcp->u_arg[4], tcp->u_arg[5]);
1731 sys_recvmsg(tcp) in sys_recvmsg() argument
1732 struct tcb *tcp; in sys_recvmsg()
1734 if (entering(tcp)) {
1735 tprintf("%ld, ", tcp->u_arg[0]);
1737 if (syserror(tcp) || !verbose(tcp))
1738 tprintf("%#lx", tcp->u_arg[1]);
1740 printmsghdr(tcp, tcp->u_arg[1]);
1743 printflags(msg_flags, tcp->u_arg[2], "MSG_???");
1750 sys_recvmmsg(struct tcb *tcp) in sys_recvmmsg() argument
1753 if (entering(tcp)) { in sys_recvmmsg()
1755 tprintf("%ld, ", tcp->u_arg[0]); in sys_recvmmsg()
1756 if (verbose(tcp)) { in sys_recvmmsg()
1757 sprint_timespec(str, tcp, tcp->u_arg[4]); in sys_recvmmsg()
1758 tcp->auxstr = strdup(str); in sys_recvmmsg()
1760 tprintf("%#lx, %ld, ", tcp->u_arg[1], tcp->u_arg[2]); in sys_recvmmsg()
1761 printflags(msg_flags, tcp->u_arg[3], "MSG_???"); in sys_recvmmsg()
1763 print_timespec(tcp, tcp->u_arg[4]); in sys_recvmmsg()
1767 if (verbose(tcp)) { in sys_recvmmsg()
1768 if (syserror(tcp)) in sys_recvmmsg()
1769 tprintf("%#lx", tcp->u_arg[1]); in sys_recvmmsg()
1771 printmmsghdr(tcp, tcp->u_arg[1]); in sys_recvmmsg()
1772 tprintf(", %ld, ", tcp->u_arg[2]); in sys_recvmmsg()
1774 printflags(msg_flags, tcp->u_arg[3], "MSG_???"); in sys_recvmmsg()
1776 tprintf(", %s", tcp->auxstr ? tcp->auxstr : "{...}"); in sys_recvmmsg()
1777 free((void *) tcp->auxstr); in sys_recvmmsg()
1778 tcp->auxstr = NULL; in sys_recvmmsg()
1780 if (syserror(tcp)) in sys_recvmmsg()
1782 if (tcp->u_rval == 0) { in sys_recvmmsg()
1783 tcp->auxstr = "Timeout"; in sys_recvmmsg()
1786 if (!verbose(tcp)) in sys_recvmmsg()
1790 sprint_timespec(str + strlen(str), tcp, tcp->u_arg[4]); in sys_recvmmsg()
1791 tcp->auxstr = str; in sys_recvmmsg()
1807 sys_shutdown(tcp) in sys_shutdown() argument
1808 struct tcb *tcp; in sys_shutdown()
1810 if (entering(tcp)) {
1811 tprintf("%ld, ", tcp->u_arg[0]);
1812 printxval(shutdown_modes, tcp->u_arg[1], "SHUT_???");
1818 sys_getsockname(tcp) in sys_getsockname() argument
1819 struct tcb *tcp; in sys_getsockname()
1821 return sys_accept(tcp);
1825 sys_getpeername(tcp) in sys_getpeername() argument
1826 struct tcb *tcp; in sys_getpeername()
1828 return sys_accept(tcp);
1832 do_pipe(struct tcb *tcp, int flags_arg) in do_pipe() argument
1834 if (exiting(tcp)) { in do_pipe()
1835 if (syserror(tcp)) { in do_pipe()
1836 tprintf("%#lx", tcp->u_arg[0]); in do_pipe()
1841 if (umoven(tcp, tcp->u_arg[0], sizeof fds, (char *) fds) < 0) in do_pipe()
1846 tprintf("[%lu, %lu]", tcp->u_rval, getrval2(tcp)); in do_pipe()
1848 tprintf("%#lx", tcp->u_arg[0]); in do_pipe()
1853 printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???"); in do_pipe()
1860 sys_pipe(struct tcb *tcp) in sys_pipe() argument
1862 return do_pipe(tcp, -1); in sys_pipe()
1867 sys_pipe2(struct tcb *tcp) in sys_pipe2() argument
1869 return do_pipe(tcp, 1); in sys_pipe2()
1874 sys_socketpair(struct tcb *tcp) in sys_socketpair() argument
1880 if (entering(tcp)) { in sys_socketpair()
1881 printxval(domains, tcp->u_arg[0], "PF_???"); in sys_socketpair()
1883 tprint_sock_type(tcp, tcp->u_arg[1]); in sys_socketpair()
1885 switch (tcp->u_arg[0]) { in sys_socketpair()
1887 printxval(protocols, tcp->u_arg[2], "IPPROTO_???"); in sys_socketpair()
1893 printxval(domains, tcp->u_arg[2], "PF_???"); in sys_socketpair()
1898 tprintf("%lu", tcp->u_arg[2]); in sys_socketpair()
1902 if (syserror(tcp)) { in sys_socketpair()
1903 tprintf(", %#lx", tcp->u_arg[3]); in sys_socketpair()
1907 if (umoven(tcp, tcp->u_arg[3], sizeof fds, (char *) fds) < 0) in sys_socketpair()
1913 tprintf(", [%lu, %lu]", tcp->u_rval, getrval2(tcp)); in sys_socketpair()
1920 sys_getsockopt(struct tcb *tcp) in sys_getsockopt() argument
1922 if (entering(tcp)) { in sys_getsockopt()
1923 tprintf("%ld, ", tcp->u_arg[0]); in sys_getsockopt()
1924 printxval(socketlayers, tcp->u_arg[1], "SOL_???"); in sys_getsockopt()
1926 switch (tcp->u_arg[1]) { in sys_getsockopt()
1928 printxval(sockoptions, tcp->u_arg[2], "SO_???"); in sys_getsockopt()
1932 printxval(sockipoptions, tcp->u_arg[2], "IP_???"); in sys_getsockopt()
1937 printxval(sockipv6options, tcp->u_arg[2], "IPV6_???"); in sys_getsockopt()
1942 printxval(sockipxoptions, tcp->u_arg[2], "IPX_???"); in sys_getsockopt()
1947 printxval(sockpacketoptions, tcp->u_arg[2], "PACKET_???"); in sys_getsockopt()
1952 printxval(socktcpoptions, tcp->u_arg[2], "TCP_???"); in sys_getsockopt()
1957 printxval(socksctpoptions, tcp->u_arg[2], "SCTP_???"); in sys_getsockopt()
1964 tprintf("%lu", tcp->u_arg[2]); in sys_getsockopt()
1970 if (syserror(tcp) || umove (tcp, tcp->u_arg[4], &len) < 0) { in sys_getsockopt()
1972 tcp->u_arg[3], tcp->u_arg[4]); in sys_getsockopt()
1976 switch (tcp->u_arg[1]) { in sys_getsockopt()
1978 switch (tcp->u_arg[2]) { in sys_getsockopt()
1983 if (umove (tcp, in sys_getsockopt()
1984 tcp->u_arg[3], in sys_getsockopt()
2000 if (umove (tcp, in sys_getsockopt()
2001 tcp->u_arg[3], in sys_getsockopt()
2017 switch (tcp->u_arg[2]) { in sys_getsockopt()
2022 if (umove (tcp, in sys_getsockopt()
2023 tcp->u_arg[3], in sys_getsockopt()
2040 printnum_int(tcp, tcp->u_arg[3], "%d"); in sys_getsockopt()
2043 printstr (tcp, tcp->u_arg[3], len); in sys_getsockopt()
2051 static void printicmpfilter(tcp, addr) in printicmpfilter() argument
2052 struct tcb *tcp; in printicmpfilter()
2061 if (syserror(tcp) || !verbose(tcp)) {
2065 if (umove(tcp, addr, &filter) < 0) {
2077 printsockopt (tcp, level, name, addr, len) in printsockopt() argument
2078 struct tcb *tcp; in printsockopt()
2094 if (umove (tcp, addr, &linger) < 0)
2134 if (umove(tcp, addr, &req) < 0)
2165 printicmpfilter(tcp, addr);
2184 printnum_int (tcp, addr, "%d");
2187 printstr (tcp, addr, len);
2196 print_sock_optmgmt (tcp, addr, len) in print_sock_optmgmt() argument
2197 struct tcb *tcp; in print_sock_optmgmt()
2205 if (umove(tcp, addr, &hdr) < 0) break;
2215 printsockopt (tcp, hdr.level, hdr.name, addr, hdr.len);
2224 printstr (tcp, addr, len);
2232 sys_setsockopt(tcp) in sys_setsockopt() argument
2233 struct tcb *tcp; in sys_setsockopt()
2235 if (entering(tcp)) {
2236 tprintf("%ld, ", tcp->u_arg[0]);
2237 printsockopt (tcp, tcp->u_arg[1], tcp->u_arg[2],
2238 tcp->u_arg[3], tcp->u_arg[4]);
2239 tprintf(", %lu", tcp->u_arg[4]);
2258 netlib_call(tcp, func) in netlib_call() argument
2259 struct tcb *tcp; in netlib_call()
2262 if (entering(tcp)) {
2264 printxval (sock_version, tcp->u_arg[0], "__NETLIB_???");
2266 --tcp->u_nargs;
2267 for (i = 0; i < tcp->u_nargs; i++)
2268 tcp->u_arg[i] = tcp->u_arg[i + 1];
2269 return func (tcp);
2273 return func (tcp);
2277 sys_xsocket(tcp) in sys_xsocket() argument
2278 struct tcb *tcp; in sys_xsocket()
2280 return netlib_call (tcp, sys_socket);
2284 sys_xsocketpair(tcp) in sys_xsocketpair() argument
2285 struct tcb *tcp; in sys_xsocketpair()
2287 return netlib_call (tcp, sys_socketpair);
2291 sys_xbind(tcp) in sys_xbind() argument
2292 struct tcb *tcp; in sys_xbind()
2294 return netlib_call (tcp, sys_bind);
2298 sys_xconnect(tcp) in sys_xconnect() argument
2299 struct tcb *tcp; in sys_xconnect()
2301 return netlib_call (tcp, sys_connect);
2305 sys_xlisten(tcp) in sys_xlisten() argument
2306 struct tcb *tcp; in sys_xlisten()
2308 return netlib_call (tcp, sys_listen);
2312 sys_xaccept(tcp) in sys_xaccept() argument
2313 struct tcb *tcp; in sys_xaccept()
2315 return netlib_call (tcp, sys_accept);
2319 sys_xsendmsg(tcp) in sys_xsendmsg() argument
2320 struct tcb *tcp; in sys_xsendmsg()
2322 return netlib_call (tcp, sys_sendmsg);
2326 sys_xrecvmsg(tcp) in sys_xrecvmsg() argument
2327 struct tcb *tcp; in sys_xrecvmsg()
2329 return netlib_call (tcp, sys_recvmsg);
2333 sys_xgetsockaddr(tcp) in sys_xgetsockaddr() argument
2334 struct tcb *tcp; in sys_xgetsockaddr()
2336 if (entering(tcp)) {
2337 printxval (sock_version, tcp->u_arg[0], "__NETLIB_???");
2339 if (tcp->u_arg[1] == 0) {
2342 else if (tcp->u_arg[1] == 1) {
2346 tprintf ("%ld, ", tcp->u_arg [1]);
2348 tprintf ("%ld, ", tcp->u_arg [2]);
2351 if (tcp->u_arg[3] == 0 || syserror(tcp)) {
2352 tprintf("%#lx", tcp->u_arg[3]);
2354 printsock(tcp, tcp->u_arg[3], tcp->u_arg[4]);
2357 printnum(tcp, tcp->u_arg[4], "%lu");
2365 sys_xgetsockopt(tcp) in sys_xgetsockopt() argument
2366 struct tcb *tcp; in sys_xgetsockopt()
2368 return netlib_call (tcp, sys_getsockopt);
2372 sys_xsetsockopt(tcp) in sys_xsetsockopt() argument
2373 struct tcb *tcp; in sys_xsetsockopt()
2375 return netlib_call (tcp, sys_setsockopt);
2379 sys_xshutdown(tcp) in sys_xshutdown() argument
2380 struct tcb *tcp; in sys_xshutdown()
2382 return netlib_call (tcp, sys_shutdown);