vsomeip
vsomeip copied to clipboard
[BUG] CommonAPI SOME/IP stub implementation _client->getHostAddress() returns "0.0.0.0" rather than peer's address
vSomeip Version
v3.4.10
Boost Version
1.81
Environment
Embedded Linux
Describe the bug
Stub implementations are passed the 'const std::shared_ptrCommonAPI::ClientId _client' as their first parameter, but the _client->getHostAddress() does not return the IP address of the client.
Reproduction Steps
Create a simple method in .fidl, .fdepl. Implement the stub implementation of this method, and look at the content of the _client->getHostAddress() when the method is invoked from a remote client.
Expected behaviour
I expect to be able to read the IP address of the client in _client->getHostAddress().
Logs and Screenshots
Stub Implementation:
void VideoCameraStubImpl::setCamExclusive(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _ttl, setCamExclusiveReply_t _reply)
{
(void)_ttl;
std::cout << "getUid:" << _client->getUid() << std::endl;
std::cout << "getGid:" << _client->getGid() << std::endl;
std::cout << "getEnv:" << _client->getEnv() << std::endl;
std::cout << "getHostAddress:" << _client->getHostAddress() << std::endl;
_reply();
}
Console output:
getUid:4294967295
getGid:4294967295
getEnv:
getHostAddress:0.0.0.0