diff options
author | Brandon Potter <brandon.potter@amd.com> | 2018-04-18 15:00:14 -0400 |
---|---|---|
committer | Anthony Gutierrez <anthony.gutierrez@amd.com> | 2019-01-22 02:12:11 +0000 |
commit | 7936e63336a736ca7d857e4fb7578895b249382e (patch) | |
tree | adfa0a7e2087b1059c5d93b48fd71fa95a198d2b /src/sim/syscall_emul.hh | |
parent | bc74c58eaf55005a6a4b2e67657da4121554943c (diff) | |
download | gem5-7936e63336a736ca7d857e4fb7578895b249382e.tar.xz |
sim-se: add ability to get/set sock metadata
Add getsockopt, getsockname, setsockname, and getpeername
system calls.
Change-Id: Ifa1d9a95f15b4fb12859dbfd3c4bd248de2e3d32
Reviewed-on: https://gem5-review.googlesource.com/c/12116
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Diffstat (limited to 'src/sim/syscall_emul.hh')
-rw-r--r-- | src/sim/syscall_emul.hh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index 67fa9e3d3..c52589f3a 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -302,6 +302,10 @@ SyscallReturn pipeImpl(SyscallDesc *desc, int num, Process *p, SyscallReturn getpidFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc); +// Target getpeername() handler. +SyscallReturn getpeernameFunc(SyscallDesc *desc, int num, + Process *p, ThreadContext *tc); + // Target bind() handler. SyscallReturn bindFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc); @@ -369,6 +373,18 @@ SyscallReturn accessFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc, int index); +// Target getsockopt() handler. +SyscallReturn getsockoptFunc(SyscallDesc *desc, int num, + Process *p, ThreadContext *tc); + +// Target setsockopt() handler. +SyscallReturn setsockoptFunc(SyscallDesc *desc, int num, + Process *p, ThreadContext *tc); + +// Target getsockname() handler. +SyscallReturn getsocknameFunc(SyscallDesc *desc, int num, + Process *p, ThreadContext *tc); + /// Futex system call /// Implemented by Daniel Sanchez /// Used by printf's in multi-threaded apps |