gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::ListenSocketUnixFile Class Reference

#include <socket.hh>

Inheritance diagram for gem5::ListenSocketUnixFile:
gem5::ListenSocketUnix gem5::ListenSocket gem5::Named

Public Member Functions

 ListenSocketUnixFile (const std::string &_name, const std::string &_dir, const std::string &_fname)
 
 ~ListenSocketUnixFile ()
 
void listen () override
 
void output (std::ostream &os) const override
 
- Public Member Functions inherited from gem5::ListenSocket
virtual ~ListenSocket ()
 
virtual int accept ()
 
int getfd () const
 
bool islistening () const
 
- Public Member Functions inherited from gem5::Named
 Named (const std::string &name_)
 
virtual ~Named ()=default
 
virtual std::string name () const
 

Protected Member Functions

bool unlink () const
 
size_t prepSockaddrUn (sockaddr_un &addr) const override
 
- Protected Member Functions inherited from gem5::ListenSocketUnix
void checkPathLength (const std::string &original, size_t max_len)
 
 ListenSocketUnix (const std::string &_name)
 
- Protected Member Functions inherited from gem5::ListenSocket
void setListening ()
 
 ListenSocket (const std::string &_name)
 

Protected Attributes

std::string dir
 
std::string resolvedDir
 
std::string fname
 
- Protected Attributes inherited from gem5::ListenSocket
bool listening = false
 
int fd = -1
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::ListenSocket
static void disableAll ()
 
static bool allDisabled ()
 
static void loopbackOnly ()
 
static int socketCloexec (int domain, int type, int protocol)
 
static int acceptCloexec (int sockfd, struct sockaddr *addr, socklen_t *addrlen)
 
- Static Protected Member Functions inherited from gem5::ListenSocket
static void cleanup ()
 
- Static Protected Attributes inherited from gem5::ListenSocket
static bool listeningDisabled = false
 The following variables are only used by socket unit tests: listeningDisabled, anyListening, bindToLoopback.
 
static bool anyListening = false
 
static bool bindToLoopback = false
 

Detailed Description

Definition at line 173 of file socket.hh.

Constructor & Destructor Documentation

◆ ListenSocketUnixFile()

gem5::ListenSocketUnixFile::ListenSocketUnixFile ( const std::string & _name,
const std::string & _dir,
const std::string & _fname )

Definition at line 304 of file socket.cc.

References gem5::ListenSocketUnix::checkPathLength(), and fname.

◆ ~ListenSocketUnixFile()

gem5::ListenSocketUnixFile::~ListenSocketUnixFile ( )

Definition at line 311 of file socket.cc.

References gem5::ArmISA::fd, and unlink().

Member Function Documentation

◆ listen()

void gem5::ListenSocketUnixFile::listen ( )
overridevirtual

◆ output()

void gem5::ListenSocketUnixFile::output ( std::ostream & os) const
overridevirtual

Implements gem5::ListenSocket.

Definition at line 364 of file socket.cc.

References dir, fname, and gem5::X86ISA::os.

◆ prepSockaddrUn()

size_t gem5::ListenSocketUnixFile::prepSockaddrUn ( sockaddr_un & addr) const
overrideprotectedvirtual

Implements gem5::ListenSocketUnix.

Definition at line 328 of file socket.cc.

References gem5::X86ISA::addr, and fname.

◆ unlink()

bool gem5::ListenSocketUnixFile::unlink ( ) const
protected

Definition at line 321 of file socket.cc.

References fname, and resolvedDir.

Referenced by listen(), and ~ListenSocketUnixFile().

Member Data Documentation

◆ dir

std::string gem5::ListenSocketUnixFile::dir
protected

Definition at line 176 of file socket.hh.

Referenced by listen(), and output().

◆ fname

std::string gem5::ListenSocketUnixFile::fname
protected

Definition at line 178 of file socket.hh.

Referenced by listen(), ListenSocketUnixFile(), output(), prepSockaddrUn(), and unlink().

◆ resolvedDir

std::string gem5::ListenSocketUnixFile::resolvedDir
protected

Definition at line 177 of file socket.hh.

Referenced by listen(), and unlink().


The documentation for this class was generated from the following files:

Generated on Tue Jun 18 2024 16:24:12 for gem5 by doxygen 1.11.0