Little-endian IPv4 addresses

What

Monero encodes IPv4 addresses in little-endian byte order.

Expected

In general, networking-related protocols/code use networking order (big-endian).

Why

TODO

Affects

Any representation and (de)serialization of IPv4 addresses must keep little endian in-mind, e.g. the P2P wire format or int encoded IPv4 addresses in RPC.

For example, the ip field in set_bans.

For Cuprate, this means Rust's Ipv4Addr::from_bits/from cannot be used in these cases as it assumes big-endian encoding.

Source

Last change: 2024-11-18, commit: e8598a0