base: socket: add UnixSocketAddr for representing socket paths

Added UnixSocketAddr that wraps around sockaddr_un. Using this
wrapper, users can create both file based sockets as well as
abstract sockets.

Change-Id: Ibf105b92a6a6ac7fc9136ed307f824c83e45c06c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66471
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Simon Park
2023-01-03 01:07:03 -08:00
parent 313f557b93
commit 15cb9c7abe
7 changed files with 216 additions and 32 deletions

View File

@@ -68,7 +68,8 @@ Source('pollevent.cc')
Source('random.cc')
Source('remote_gdb.cc')
Source('socket.cc')
GTest('socket.test', 'socket.test.cc', 'socket.cc')
SourceLib('z', tags='socket_test')
GTest('socket.test', 'socket.test.cc', 'socket.cc', 'output.cc', with_tag('socket_test'))
Source('statistics.cc')
Source('str.cc', add_tags=['gem5 trace', 'gem5 serialize'])
GTest('str.test', 'str.test.cc', 'str.cc')