08/04/13 10:34:11
普段、BSDやLinuxを使っている者として、最近大きなカルチャーショックを受けた!
あの重いと言われてる M$ VISTA上での仮想環境で幾つものOSが実環境と変わりなく
スイスイと動くスーパーPCを体験してしまうとbig endian とかlittle endian、
そんな事どうでもよいと、思ってしまった…
話は変わるけど、コードは、big endian little endianどちらでもどーぞって、こんな感じ?
u_long int htonl(u_long int hostlong);
u_short int htons(u_short int hostshort);
u_long int ntohl(u_long int netlong);
u_short int ntohs(u_short int netshort);