From owner-svn-src-head@freebsd.org Wed May 3 09:23:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6700DD59593; Wed, 3 May 2017 09:23:15 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20B9919A; Wed, 3 May 2017 09:23:15 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v439NEcY072631; Wed, 3 May 2017 09:23:14 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v439NEWv072629; Wed, 3 May 2017 09:23:14 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201705030923.v439NEWv072629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 3 May 2017 09:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317732 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 May 2017 09:23:15 -0000 Author: tuexen Date: Wed May 3 09:23:13 2017 New Revision: 317732 URL: https://svnweb.freebsd.org/changeset/base/317732 Log: Decode the third argument of socket(). Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Wed May 3 09:20:36 2017 (r317731) +++ head/usr.bin/truss/syscall.h Wed May 3 09:23:13 2017 (r317732) @@ -46,7 +46,7 @@ enum Argtype { None = 1, Hex, Octal, Int LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, - Kldunloadflags, Sizet, Madvice, Socklent, + Kldunloadflags, Sizet, Madvice, Socklent, Sockprotocol, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Wed May 3 09:20:36 2017 (r317731) +++ head/usr.bin/truss/syscalls.c Wed May 3 09:23:13 2017 (r317732) @@ -317,7 +317,7 @@ static struct syscall decoded_syscalls[] { .name = "sigwaitinfo", .ret_type = 1, .nargs = 2, .args = { { Sigset | IN, 0 }, { Ptr, 1 } } }, { .name = "socket", .ret_type = 1, .nargs = 3, - .args = { { Sockdomain, 0 }, { Socktype, 1 }, { Int, 2 } } }, + .args = { { Sockdomain, 0 }, { Socktype, 1 }, { Sockprotocol, 2 } } }, { .name = "stat", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Stat | OUT, 1 } } }, { .name = "statfs", .ret_type = 1, .nargs = 2, @@ -1917,6 +1917,17 @@ print_arg(struct syscall_args *sc, unsig case Socklent: fprintf(fp, "%u", (socklen_t)args[sc->offset]); break; + case Sockprotocol: { + int protocol; + + protocol = args[sc->offset]; + if (protocol == 0) { + fputs("0", fp); + } else { + print_integer_arg(sysdecode_ipproto, fp, protocol); + } + break; + } case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp);