We use RTEMS-4.0.0 In the file <rtems_bsdnet_internal.h> there are two strings : #define USHRT_MAX 65535 and #define SHRT_MAX 65535 But it seems wrong. May be second "define" should be changed to 32767 ?