Decode the third argument of socket().
This commit is contained in:
parent
58227c6061
commit
ecac235bb0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317732
@ -46,7 +46,7 @@ enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Ioctl,
|
||||
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,
|
||||
|
@ -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, unsigned long *args, long *retval,
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user