diff options
author | Gabe Black <gabeblack@google.com> | 2017-05-05 16:50:22 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2017-05-09 16:44:30 +0000 |
commit | f2b6dc8d2701dc8da5d365a73336d4a8a3dd3478 (patch) | |
tree | 7ea103b6d3de20eee5783787abde491ab0c67b6e /src/base/socket.hh | |
parent | 20e221c9c9d4fb4314af062f062a196fafdbb515 (diff) | |
download | gem5-f2b6dc8d2701dc8da5d365a73336d4a8a3dd3478.tar.xz |
base: Teach the socket listeners how to bind to the loopback.
The loopback device will allow access to various services like remote GDB
debugging, connecting to the terminal, etc., without letting external
agents like port scanners connect and disrupting the simulation.
Change-Id: I76dccbf152fa278ae9f342b25f7e345a1329fbe4
Reviewed-on: https://gem5-review.googlesource.com/3080
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/base/socket.hh')
-rw-r--r-- | src/base/socket.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/base/socket.hh b/src/base/socket.hh index 942318e45..fab7f7576 100644 --- a/src/base/socket.hh +++ b/src/base/socket.hh @@ -37,10 +37,14 @@ class ListenSocket static bool listeningDisabled; static bool anyListening; + static bool bindToLoopback; + public: static void disableAll(); static bool allDisabled(); + static void loopbackOnly(); + protected: bool listening; int fd; |