System wide equates

This chapter documents DEFINES.FTH which contains definitions of constants and equates used throughout PowerNet.

Application definitions

0 equ INVALID_SOCKET    \ -- 0
Words returning a socket number return zero to indicate an invalid socket.

-1 equ SOCKET_ERROR     \ -- -1
Many BSD layer and lower layers return -1 for an error because a return of 0 as a length is valid. It also permits systems to use 0< as an error check. Do not change.

Standard TCP/IP and Winsock values

PowerNet provides a number of standard equates taken from TCP/IP definitions and the Winsock API. These are not documented here. If you are interested see DEFINES.FTH.

Although a large number of these equates are defined, and are not currently used, they occupy no memory in the target system because these are EQUates rather than CONSTANTs.