|
int | createDgramSocket (const std::string &path) |
| Create a SOCK_DGRAM AF_UNIX socket at the given path. Removes the socket at the given path if it exists. More...
|
|
|
const std::string | mSourceSocketPath |
|
const std::string | mDestinationSocketPath |
|
int | mSourceSocketFd |
|
int | mDestinationSocketFd |
|
sockaddr_un | mDestinationSocketAddress |
|
char | mBuf [BUFFER_SIZE] |
|
std::mutex | mLock |
|
◆ DobbyLogRelay()
DobbyLogRelay::DobbyLogRelay |
( |
const std::string & |
sourceSocketPath, |
|
|
const std::string & |
destinationSocketPath |
|
) |
| |
Create relay between two UNIX datagram sockets.
All messages sent to the source socket are forwarded to the destination socket. Used to relay messages to the host syslog/journald and ensure the messages are tagged with the dobby daemon PID for the RDK log collection scripts
◆ addToPollLoop()
Adds the log relay to a given poll loop so that the process() method is called when the source socket receives data.
- Parameters
-
[in] | pollLoop | The poll loop to add ourselves to |
◆ createDgramSocket()
int DobbyLogRelay::createDgramSocket |
( |
const std::string & |
path | ) |
|
|
private |
Create a SOCK_DGRAM AF_UNIX socket at the given path. Removes the socket at the given path if it exists.
- Parameters
-
[in] | path | The path the socket should be created at |
◆ process()
void DobbyLogRelay::process |
( |
const std::shared_ptr< AICommon::IPollLoop > & |
pollLoop, |
|
|
epoll_event |
event |
|
) |
| |
|
overridevirtual |
Called on the poll loop. Forwards the data from the source to the destination socket.
- Parameters
-
[in] | pollLoop | The pollLoop instance that the process method was called from |
[in] | events | The epoll event that occured |
Implements AICommon::IPollSource.
◆ removeFromPollLoop()
void DobbyLogRelay::removeFromPollLoop |
( |
const std::shared_ptr< AICommon::IPollLoop > & |
pollLoop | ) |
|
Removes the log relay to a given poll loop.
- Parameters
-
[in] | pollLoop | The poll loop to add ourselves to |
The documentation for this class was generated from the following files:
- daemon/lib/source/include/DobbyLogRelay.h
- daemon/lib/source/DobbyLogRelay.cpp