in reply to ntohl() in perl
Remember that on some systems there is no difference between "Network" and "Host" order. Using reverse is irresponsible.sub ntohl { pack("L", unpack("N", $_[0])); } sub ntohs { pack("S", unpack("n", $_[0])); } sub htonl { ntohl(@_); } sub htons { ntohs(@_); }
|
|---|
| Replies are listed 'Best First'. |
|---|