MCPcopy Create free account
hub / github.com/ElementsProject/lightning / GetByte

Function GetByte

connectd/netaddress.c:78–83  ·  view source on GitHub ↗

The bitcoin code packs addresses backwards, so we map it here. */

Source from the content-addressed store, hash-verified

76
77/* The bitcoin code packs addresses backwards, so we map it here. */
78static unsigned int GetByte(const struct wireaddr *addr, int n)
79{
80 size_t off = IPv4In6(addr);
81 assert(off + n < addr->addrlen);
82 return addr->addr[addr->addrlen - 1 - off - n];
83}
84
85static bool IsRFC1918(const struct wireaddr *addr)
86{

Callers 9

IsRFC1918Function · 0.85
IsRFC2544Function · 0.85
IsRFC3927Function · 0.85
IsRFC6598Function · 0.85
IsRFC5737Function · 0.85
IsRFC3849Function · 0.85
IsRFC4193Function · 0.85
IsRFC4843Function · 0.85
IsLocalFunction · 0.85

Calls 1

IPv4In6Function · 0.85

Tested by

no test coverage detected