+ const\r
+ IPPROTO_UDP=17;\r
+ IPPROTO_ICMP=1;\r
+ function ntohs(invalue:word):word;inline;\r
+ var\r
+ invaluebytes : array[0..1] of byte absolute invalue;\r
+ resultbytes : array[0..1] of byte absolute result;\r
+ begin\r
+ {$ifdef endian_little}\r
+ resultbytes[0] := invaluebytes[1];\r
+ resultbytes[1] := invaluebytes[0];\r
+ {$else}\r
+ result := invalue;\r
+ {$endif}\r
+ end; \r