I admit that I'm not exactly sure what your context is or what you're looking at, but over the wire, IP addresses are encoded in big-endian format.
If that's the kind of 'reversal' you're talking about, then I suggest you take a look at:
$ man 3 htons