You are talking an array of 16 bytes. It does not help. Endianness only matters for things big bytes.
If these are really raw bytes, then just send them, you will get them only the same
If this is really the structure you want to send,
struct msg { int foo; int bar; .....
Then you need to work through the buffer, pulling the desired values.
When sending, you need to collect the package in the standard order
int off = 0; *(int*)&buff[off] = htonl(foo); off += sizeof(int); *(int*)&buff[off] = htonl(bar); ...
When you receive
int foo = ntohl((int)buff[off]); off += sizeof(int); int bar = ntohl((int)buff[off]); ....
EDIT: I see that you want to send an IPv6 address, they are always in the network byte order, so you can just pass it raw.
pm100 source share