MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / GetLoopbackAddressFor

Function GetLoopbackAddressFor

libi2pd_client/I2PTunnel.cpp:74–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 }
73
74 boost::asio::ip::address GetLoopbackAddressFor(const i2p::data::IdentHash & addr)
75 {
76 boost::asio::ip::address_v4::bytes_type bytes;
77 const uint8_t * ident = addr;
78 bytes[0] = 127;
79 memcpy (bytes.data ()+1, ident, 3);
80 boost::asio::ip::address ourIP = boost::asio::ip::address_v4 (bytes);
81 return ourIP;
82 }
83
84 boost::asio::ip::address GetLoopbackAddress6For(const i2p::data::IdentHash & addr)
85 {

Callers 2

MapToLoopbackFunction · 0.85
ObtainUDPSessionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected