if you could explain to me what the calculations are doing in detail... are they putting the bytes sent into network byte order?