Ok, so you probably didn't get the answer you expected because you have to do byte-swapping in reference to some symbol size. As Sergey explained above, the symbol size can be 16 bits, 32 bits, or whatever.
32 bits is a common size (your example uses that size)... so let's go with that...
So what you should do is (in pseudo-code):
offset=0;
while(offset<dmp1_size){>
buff[symbol_size] = *dmp1+offset;
offset+=symbol_size;
}
Does that make sense? ...you have to do your swapping one symbol at a time, not do the whole buffer at once.