                    PURE-C Inet Library for STinG

                           December 2, 1999

                                  by

                           Olivier Booklage

                          obooklage@free.fr



Contents
========

 1  Introduction

 2  Start , Loop and End mains functions
    2.1  Inet_Init
    2.2  Inet_Loop
    2.3  Inet_Terminate
    2.4  Inet_System

 3  Connections Functions
    3.1  Inet_Open
    3.2  Inet_Listen
    3.3  Inet_Close

 4  Send data Functions
    4.1  Inet_Send_String
    4.2  Inet_Send_Data
    4.3  Inet_Send_File
    4.4  Inet_Check_File
    4.5  Inet_OutIsEmpty

 5  Read data functions
    5.1  Inet_CountData
    5.2  Inet_ReadData
    5.3  Inet_ReadString
    5.4  Inet_IsChar
    5.5  Inet_IsString

 6  Private memory block functions
    6.1  Inet_NewUserBlk
    6.2  Inet_UserBlk
    6.3  Inet_FreeUserBlk

 7  Tools
    7.1  Inet_Err
    7.2  Inet_Number
    7.3  Inet_First
    7.4  Inet_Next
    7.5  Inet_Name
    7.6  Inet_MyName
    7.7  Inet_Local
    7.8  Inet_IsIp
    7.9  Inet_MyIp
    7.10  Inet_Proto
    7.11  inetoa
    7.12  atoinet

 8  Masquerade tools
    8.1  MasqueradeIP
    8.2  MasqueradePort

 9  PORT tools
    9.1  IP_Address

10  TOS client Squeleton

11  TOS server Squeleton
        11.0.1  INET_SYSTEM_TOS
        11.0.2  INET_SYSTEM_GEM
        11.0.3  INET_SYSTEM_ACC
        11.0.4  NETWORK_OK
        11.0.5  NETWORK_NOINIT
        11.0.6  NETWORK_NOCOOKIE
        11.0.7  NETWORK_NOMAGIC
        11.0.8  NETWORK_NOTRANSPORT
        11.0.9  NETWORK_NODRIVER
        11.0.10  NETWORK_STIK_OK
        11.0.11  NETWORK_NOTACTIVE
        11.0.12  NETWORK_NOHANDLER
        11.0.13  INET_USE_DEBUG
        11.0.14  INET_NUSE_DEBUG
        11.0.15  INET_ICMP
        11.0.16  INET_TCP
        11.0.17  INET_UDP
        11.0.18  INET_NO_TIMEOUT
        11.0.19  INET_CONNECTING
        11.0.20  INET_CONNECTED
        11.0.21  INET_CONTACTED
        11.0.22  INET_DATA
        11.0.23  INET_TIMER
        11.0.24  INET_LEAVE
        11.0.25  INET_LEAVED
        11.0.26  INET_STATUS_CONTINUE
        11.0.27  INET_STATUS_FINISH
        11.0.28  INET_STATUS_KILL



1  Introduction
***************

This is a general library for use STiK-STinG for PureC.

I have no time for instance to finish *.HYP complete documentation,
but for programmers, the file PURE-C\INCLUDE\STING\INET.H content lot
of comments.

In the folder EXEMPLES\, you can find 4 samples of easy programming
STiK-STinG applications.

More finished documentation in next release ?

Cheers Olivier Booklage.

obooklage@free.fr http://obooklage.free.fr



2  Start , Loop and End mains functions
***************************************

 2.1  Inet_Init
 2.2  Inet_Loop
 2.3  Inet_Terminate
 2.4  Inet_System


2.1  Inet_Init
==============

*INT Inet_Init( INT system );* /* Required before any utilisation */

You need *pctoslib.lib* and *pcextlib.lib* for this library.

/* system parameter */

#define INET_SYSTEM_TOS   0
#define INET_SYSTEM_GEM   1
#define INET_SYSTEM_ACC   2 /* or any GEM program without memory allocation, STinG memory is used.*/

/* returns values */

#define NETWORK_OK             0        /* Initialisation correcte */
#define NETWORK_NOINIT        -100      /* Pas encore d'initialisation */
#define NETWORK_NOCOOKIE      -101      /* Pas de cookie */
#define NETWORK_NOMAGIC       -102      /* Le nombre magique n'est pas bon */
#define NETWORK_NOTRANSPORT   -103      /* Pas de transport valable pour STiK */
#define NETWORK_NODRIVER      -104      /* Pas de driver STinG prsent */
#define NETWORK_STIK_OK       -104      /* StiK present */
#define NETWORK_NOTACTIVE     -105      /* STinG n'est pas actif */
#define NETWORK_NOHANDLER     -106      /* Routine TIMER non installable */

You can have corresponding error string by using Inet_Err() function.


2.2  Inet_Loop
==============

/* Required, you must call this function in a loop GEM or TOS */

*VOID Inet_Loop(VOID);*


2.3  Inet_Terminate
===================

/* Required before quit your program */

*VOID Inet_Terminate( VOID );*

All handles are close, and memory release.


2.4  Inet_System
================

/* Optionnal and personnal, print some debugging information on screen
*/

*VOID Inet_System( BOOLEAN debug_msg );*

/* parameter */

#define INET_USE_DEBUG    TRUE    /* print messages from library */
#define INET_NUSE_DEBUG   FALSE   /* do not print any message */



3  Connections Functions
************************

 3.1  Inet_Open
 3.2  Inet_Listen
 3.3  Inet_Close


3.1  Inet_Open
==============

Open a link with a host, return a handle if success or error code. use
timeout = INET_NO_TIMEOUT for 'ever'.

*INT Inet_Open( UBYTE *host , INT protocol, INT port, INT bufsize,
NPROC proc, INT timeout);*

    host is a string content an IP form as "192.0.1.3" or host name
     as "www.theweb.com".

    proto is protocole used as:

#define INET_ICMP   1   /* IP assigned number for ICMP                  */
#define INET_TCP    6   /* IP assigned number for TCP                   */
#define INET_UDP    17  /* IP assigned number for UDP                   */

    NPROC proc is your personnal function for managing connection as
     :


/* proto */

INT   proc( INT handle, INT action );

/* personnal function */

INT proc( INT handle, INT action )
{

  switch( action )
  {
    /* ... */
  }

return(value);
}


*handle* is handle of current connection, *action* can be :

#define INET_CONNECTING     1     /* connection running... */
#define INET_CONNECTED      2     /* connected to host */
#define INET_CONTACTED      3     /* contacted by a host computer ( listen ) */
#define INET_DATA           4     /* some data sended by a host are available */
#define INET_TIMER          5     /* nothing to do, is just if you need any time for your private use */
#define INET_LEAVE          6     /* the host have closed the connection */
#define INET_LEAVED         7     /* you have closed the connection to host */

You *must* return one of this value :

#define INET_STATUS_CONTINUE     0    /* keep connection */
#define INET_STATUS_FINISH      -200  /* send all data and close connection */
#define INET_STATUS_KILL        -201  /* close connection now */

You can have corresponding error string by using Inet_Err() function.


3.2  Inet_Listen
================

/* Open an Passive (listen) , nber is number of listen connections */

*INT Inet_Listen( INT nber, INT protocol, INT port, INT bufsize, NPROC
proc, INT timeout);*

You can have corresponding error string by using Inet_Err() function.


3.3  Inet_Close
===============

/* Close the connection */

*INT Inet_Close( INT handle );*

You can have corresponding error string by using Inet_Err() function.



4  Send data Functions
**********************

 4.1  Inet_Send_String
 4.2  Inet_Send_Data
 4.3  Inet_Send_File
 4.4  Inet_Check_File
 4.5  Inet_OutIsEmpty


4.1  Inet_Send_String
=====================

/* Send a string */

*INT Inet_Send_String( INT handle, UBYTE *string );*

You can have corresponding error string by using Inet_Err() function.


4.2  Inet_Send_Data
===================

/* Send a data block */

*INT Inet_Send_Data( INT handle, VOID *buffer, INT len);*

You can have corresponding error string by using Inet_Err() function.


4.3  Inet_Send_File
===================

/* Send a file to host */

*INT Inet_Send_File( INT handle, UBYTE *filename );*

You can have corresponding error string by using Inet_Err() function.


4.4  Inet_Check_File
====================

/* Return postive value if file exist, or negative TOS error code */

*INT Inet_Check_File( UBYTE *filename );*


4.5  Inet_OutIsEmpty
====================

/* Return TRUE if all data are be sended to the host */

*BOOLEAN Inet_OutIsEmpty( INT handle );*



5  Read data functions
**********************

 5.1  Inet_CountData
 5.2  Inet_ReadData
 5.3  Inet_ReadString
 5.4  Inet_IsChar
 5.5  Inet_IsString


5.1  Inet_CountData
===================

*INT Inet_CountData( INT handle );*

/* Return number of bytes available to read */

You can have corresponding error string by using Inet_Err() function.


5.2  Inet_ReadData
==================

/* Read almost 'limit' data in buffer */

*INT Inet_ReadData( INT handle, VOID *buffer , INT limit);*

You can have corresponding error string by using Inet_Err() function.


5.3  Inet_ReadString
====================

/* Read a string with 'limit' maximum bytes */

*INT Inet_ReadString( INT handle, UBYTE *string , INT limit);*

You can have corresponding error string by using Inet_Err() function.


5.4  Inet_IsChar
================

/* Return TRUE if the char 'c' is in data availables */

*BOOLEAN Inet_IsChar( INT handle , UBYTE c );*


5.5  Inet_IsString
==================

/* Return TRUE if string 'string' is in data availables */

*BOOLEAN Inet_IsString( INT handle , UBYTE *string );*



6  Private memory block functions
*********************************

 6.1  Inet_NewUserBlk
 6.2  Inet_UserBlk
 6.3  Inet_FreeUserBlk


6.1  Inet_NewUserBlk
====================

/* Create memory block if possible */

*VOID *Inet_NewUserBlk( INT handle, LONG count, LONG size );*

You can have corresponding error string by using Inet_Err() function.


6.2  Inet_UserBlk
=================

/* Return memory block , NULL if do not exist */

*VOID *Inet_UserBlk( INT handle );*


6.3  Inet_FreeUserBlk
=====================

/* Free memory block */

*VOID Inet_FreeUserBlk( INT handle );*



7  Tools
********

 7.1  Inet_Err
 7.2  Inet_Number
 7.3  Inet_First
 7.4  Inet_Next
 7.5  Inet_Name
 7.6  Inet_MyName
 7.7  Inet_Local
 7.8  Inet_IsIp
 7.9  Inet_MyIp
 7.10  Inet_Proto
 7.11  inetoa
 7.12  atoinet


7.1  Inet_Err
=============

/* Return a string message for any negative error code */

*UBYTE *Inet_Err( INT code );*


7.2  Inet_Number
================

/* Return the number of connection */

*INT Inet_Number( VOID );*


7.3  Inet_First
===============

/* You can scan all handles (connections) by using this start
function: */

*INT Inet_First( VOID );*


7.4  Inet_Next
==============

/* You can scan all handles (connections) by using this next function:
*/

*INT Inet_Next( VOID );*


7.5  Inet_Name
==============

/* Name of host if can be resolved or empty string if no connection
exist */

*UBYTE *Inet_Name( INT handle );*


7.6  Inet_MyName
================

/* My name for a host if can be resolved or empty string if no
connection exist */

*UBYTE *Inet_MyName( INT handle );*


7.7  Inet_Local
===============

/* Return my IP address for the IP remote , route depending,
Masquerade compatible if version>=1.11 */

*ULONG Inet_Local( const ULONG remote );*


7.8  Inet_IsIp
==============

/* Return host IP address for me , route depending, Masquerade
compatible if version>=1.11 */

*ULONG Inet_IsIp( INT handle );*


7.9  Inet_MyIp
==============

/* Return my IP address for an host , route depending, Masquerade
compatible if version>=1.11 */

*ULONG Inet_MyIp( INT handle );*


7.10  Inet_Proto
================

/* Return protocol used for a connection */

*INT Inet_Proto( INT handle );*

/* Return 0 if unknown */

#define INET_ICMP   1   /* IP assigned number for ICMP                  */
#define INET_TCP    6   /* IP assigned number for TCP                   */
#define INET_UDP    17  /* IP assigned number for UDP                   */

You can have corresponding error string by using Inet_Err() function.


7.11  inetoa
============

/* Return STRING for IP address */

*UBYTE *inetoa( const ULONG ip );*


7.12  atoinet
=============

/* Return IP address of a string, eg: "194.2.128.1" */

*ULONG atoinet( const UBYTE *string );*



8  Masquerade tools
*******************

 8.1  MasqueradeIP
 8.2  MasqueradePort


8.1  MasqueradeIP
=================

/* Return real IP address of masqued port or 0L if no port masqued */

*ULONG MasqueradeIP(VOID);*


8.2  MasqueradePort
===================

/* Name of masqued port or " if no port masqued */

*UBYTE *MasqueradePort(VOID);*



9  PORT tools
*************

 9.1  IP_Address


9.1  IP_Address
===============

/* IP address of port (masqued or not masqued) or 0L if not exist */

*ULONG IP_Address( const PORT *port );*

You must include the sting header file *<ports.h>* for use this
function.



10  TOS client Squeleton
************************


/*------------------------------------------------
//
//	Module	:	squelet.c
//
//	Objet		:	Squeleton of CLIENT program using INET.LIB for STinG
//
//	ToDo		:
//
//	Tab.		:	2
//
//
//
//	Maintenance	:
//
//		Version		:	V1.0
//		Auteur		:	Olivier Booklage
//		Email			:	obooklage@free.fr
//		Homepage	:	http://obooklage.free.fr/
//		Date			:	02/12/1999
//		Remarques	: client.prj :


client.tos
=
pcvstart.o

client.c

pctoslib.lib
pcstdlib.lib
pcextlib.lib
sting\inet.lib

//
//
//
//-----------------------------------------------*/

#include  <stdio.h>
#include  <stdlib.h>
#include  <tos.h>
#include  <portab.h>
#include  <string.h>
#include  <sting\inet.h>

/* ---       Includes internes       -- */

/* --- Constantes globales internes --- */

#define BUFSIZE     1024
#define PORT        6969
#define TIMEOUT     30    /* 30 sec */
#define HOST				"127.0.0.1"

/* --- Structures globales internes --- */

/* --- Variables globales  internes --- */

LOCAL UBYTE buffer[BUFSIZE];
LOCAL UBYTE message1[]="Hello Server\r\n";
LOCAL UBYTE message2[]="Bye Server\r\n";

/* ---     Prototypage interne      --- */

WORD  main(VOID);

INT   HandleActions( INT handle, INT action );

INT   ConnectingTo( INT handle );
INT   ConnectedTo( INT handle );
INT   ContactedBy( INT handle );
INT   Data( INT handle );
INT   Timer( VOID );
INT   Leave( INT handle );
INT   Leaved( INT handle );

/* ---         Fonctions            --- */

WORD main(VOID)
{
INT ret;
WORD key = 0;

  ret = Inet_Init( INET_SYSTEM_TOS );

  if ( (ret != NETWORK_OK) && (ret != NETWORK_STIK_OK) )
  {
    printf("Error   : %s\n",Inet_Err(ret));
    return(-1);
  }

  ret =  Inet_Open( HOST , INET_TCP, PORT, BUFSIZE, HandleActions, TIMEOUT );
  if ( ret < 0 )
  {
    printf("Error   : %s %s\n", HOST, Inet_Err(ret) );
    Inet_Terminate();
    return(-1);
  }

  while ( Cconis() !=0 )  Crawcin();

  printf("Client Ready. Press Esc to quit.\n");

  do
  {
    Inet_Loop();
    if ( Cconis() !=0 ) key=(int)Crawcin()&0xFF;
  }
  while ( key != 27 );

  Inet_Terminate();

return(0);
}

INT HandleActions( INT handle, INT action )
{

  switch( action )
  {
    case INET_CONNECTING :
      return( ConnectingTo( handle ) );

    case INET_CONNECTED :
      return( ConnectedTo( handle ) );

    case INET_CONTACTED :
      return( ContactedBy( handle ) );

    case INET_DATA :
      return( Data( handle ) );

    case INET_TIMER :
      return( Timer() );

    case INET_LEAVE :
      return( Leave( handle ) );

    case INET_LEAVED :
      return( Leaved( handle ) );

    default :
      if ( action > 0 )
        fprintf( stdout,"%s\n", Inet_Err(action));
      else
      {
        fprintf( stdout,"%s\n", Inet_Err(action));
        return(INET_STATUS_KILL);
      }
    break;
  }

return(INET_STATUS_CONTINUE);
}

INT ConnectingTo( INT handle )
{

  printf("Connecting to %s...\n", Inet_Name(handle) );

return(INET_STATUS_CONTINUE);
}

INT ConnectedTo( INT handle )
{

  printf("Connected to %s !\n", Inet_Name(handle) );
  printf("Send a message to server %s.\n", Inet_Name(handle) );
  Inet_Send_String( handle, message1);

return(INET_STATUS_CONTINUE);
}

INT ContactedBy( INT handle )
{
  printf("Contacted by %s\n", Inet_Name(handle) );

return(INET_STATUS_CONTINUE);
}

INT Data ( INT handle )
{

  Inet_ReadString( handle, (VOID *)buffer , BUFSIZE);
  printf("Received \"%s\" from server %s.\n", buffer, Inet_Name(handle) );
  printf("Send a message to server %s.\n", Inet_Name(handle) );
  Inet_Send_String( handle, message2);

return(INET_STATUS_CONTINUE);
}

INT Timer( VOID )
{

  /* nothing to do yet */

return(INET_STATUS_CONTINUE);
}

INT Leave( INT handle )
{
  printf("Host %s gone.\n", Inet_Name(handle) );

return(INET_STATUS_KILL);
}

INT Leaved( INT handle )
{
  printf("Connection with %s is finish.\n", Inet_Name(handle) );

return(INET_STATUS_KILL);
}

/* ---          EOF                 --- */




11  TOS server Squeleton
************************


/*------------------------------------------------
//
//	Module	:	squelet.c
//
//	Objet		:	Squeleton of SERVER program using INET.LIB for STinG
//
//	ToDo		:
//
//	Tab.		:	2
//
//
//
//	Maintenance	:
//
//		Version		:	V1.0
//		Auteur		:	Olivier Booklage
//		Email			:	obooklage@free.fr
//		Homepage	:	http://obooklage.free.fr/
//		Date			:	23/11/1999
//		Remarques	: client.prj :

server.tos
=
pcvstart.o

server.c

pctoslib.lib
pcstdlib.lib
pcextlib.lib
sting\inet.lib

//
//
//
//-----------------------------------------------*/

#include  <stdio.h>
#include  <stdlib.h>
#include  <tos.h>
#include  <portab.h>
#include  <string.h>
#include  <sting\inet.h>

/* ---       Includes internes       -- */

/* --- Constantes globales internes --- */

#define BUFSIZE     1024
#define PORT        6969
#define LISTENSLOTS	4
#define TIMEOUT     30    /* 30 sec */

/* --- Structures globales internes --- */

/* --- Variables globales  internes --- */

LOCAL UBYTE buffer[BUFSIZE];
LOCAL UBYTE message1[]="Hello Client\r\n";
LOCAL UBYTE message2[]="Bye Server\r\n";

/* ---     Prototypage interne      --- */

WORD  main(VOID);

INT   HandleActions( INT handle, INT action );

INT   ConnectingTo( INT handle );
INT   ConnectedTo( INT handle );
INT   ContactedBy( INT handle );
INT   Data( INT handle );
INT   Timer( VOID );
INT   Leave( INT handle );
INT   Leaved( INT handle );

/* ---         Fonctions            --- */

WORD main(VOID)
{
INT ret;
WORD key = 0;

  ret = Inet_Init( INET_SYSTEM_TOS );

  if ( (ret != NETWORK_OK) && (ret != NETWORK_STIK_OK) )
  {
    printf("Error   : %s\n",Inet_Err(ret));
    return(-1);
  }

  ret =  Inet_Listen( LISTENSLOTS, INET_TCP, PORT, BUFSIZE, HandleActions, TIMEOUT );
  if ( ret < 0 )
  {
    printf("Error   : %s\n", Inet_Err(ret) );
    Inet_Terminate();
    return(-1);
  }

  while ( Cconis() !=0 )  Crawcin();

  printf("Server Ready. Press Esc to quit.\n");

  do
  {
    Inet_Loop();
    if ( Cconis() !=0 ) key=(int)Crawcin()&0xFF;
  }
  while ( key != 27 );

  Inet_Terminate();

return(0);
}

INT HandleActions( INT handle, INT action )
{

  switch( action )
  {
    case INET_CONNECTING :
      return( ConnectingTo( handle ) );

    case INET_CONNECTED :
      return( ConnectedTo( handle ) );

    case INET_CONTACTED :
      return( ContactedBy( handle ) );

    case INET_DATA :
      return( Data( handle ) );

    case INET_TIMER :
      return( Timer() );

    case INET_LEAVE :
      return( Leave( handle ) );

    case INET_LEAVED :
      return( Leaved( handle ) );

    default :
      if ( action > 0 )
        fprintf( stdout,"<%04d> : %s\n", handle, Inet_Err(action));
      else
      {
        fprintf( stdout,"<%04d> ? %s\n", handle, Inet_Err(action));
        return(INET_STATUS_KILL);
      }
    break;
  }

return(INET_STATUS_CONTINUE);
}

INT ConnectingTo( INT handle )
{

  printf("Connecting to %s...\n", Inet_Name(handle) );

return(INET_STATUS_CONTINUE);
}

INT ConnectedTo( INT handle )
{

	 printf("Connected to %s !\n", Inet_Name(handle) );

return(INET_STATUS_CONTINUE);
}

INT ContactedBy( INT handle )
{
  printf("Contacted by %s\n", Inet_Name(handle) );

return(INET_STATUS_CONTINUE);
}

INT Data ( INT handle )
{

  Inet_ReadString( handle, (VOID *)buffer , BUFSIZE);

  printf("Received \"%s\" from client %s.\n", buffer, Inet_Name(handle) );

	if ( strcmp( buffer, message2 ) == SUCCESS )
	{
	  printf("Close connection with %s.\n", Inet_Name(handle) );
		return(INET_STATUS_FINISH);
	}

  printf("Send a message to client %s.\n", Inet_Name(handle) );

  Inet_Send_String( handle, message1);

return(INET_STATUS_CONTINUE);
}

INT Timer( VOID )
{

  /* nothing to do yet */

return(INET_STATUS_CONTINUE);
}

INT Leave( INT handle )
{
  printf("Host %s gone.\n", Inet_Name(handle) );

return(INET_STATUS_KILL);
}

INT Leaved( INT handle )
{
  printf("Connection with %s is finish.\n", Inet_Name(handle) );

return(INET_STATUS_KILL);
}

/* ---          EOF                 --- */


     11.0.1  INET_SYSTEM_TOS
     11.0.2  INET_SYSTEM_GEM
     11.0.3  INET_SYSTEM_ACC
     11.0.4  NETWORK_OK
     11.0.5  NETWORK_NOINIT
     11.0.6  NETWORK_NOCOOKIE
     11.0.7  NETWORK_NOMAGIC
     11.0.8  NETWORK_NOTRANSPORT
     11.0.9  NETWORK_NODRIVER
     11.0.10  NETWORK_STIK_OK
     11.0.11  NETWORK_NOTACTIVE
     11.0.12  NETWORK_NOHANDLER
     11.0.13  INET_USE_DEBUG
     11.0.14  INET_NUSE_DEBUG
     11.0.15  INET_ICMP
     11.0.16  INET_TCP
     11.0.17  INET_UDP
     11.0.18  INET_NO_TIMEOUT
     11.0.19  INET_CONNECTING
     11.0.20  INET_CONNECTED
     11.0.21  INET_CONTACTED
     11.0.22  INET_DATA
     11.0.23  INET_TIMER
     11.0.24  INET_LEAVE
     11.0.25  INET_LEAVED
     11.0.26  INET_STATUS_CONTINUE
     11.0.27  INET_STATUS_FINISH
     11.0.28  INET_STATUS_KILL


11.0.1  INET_SYSTEM_TOS
-----------------------

"#define INET_SYSTEM_TOS 0"


11.0.2  INET_SYSTEM_GEM
-----------------------

"#define INET_SYSTEM_GEM 1"


11.0.3  INET_SYSTEM_ACC
-----------------------

"#define INET_SYSTEM_ACC 2"


11.0.4  NETWORK_OK
------------------

"#define NETWORK_OK 0"


11.0.5  NETWORK_NOINIT
----------------------

"#define NETWORK_NOINIT -100"


11.0.6  NETWORK_NOCOOKIE
------------------------

"#define NETWORK_NOCOOKIE -101"


11.0.7  NETWORK_NOMAGIC
-----------------------

"#define NETWORK_NOMAGIC -102"


11.0.8  NETWORK_NOTRANSPORT
---------------------------

"#define NETWORK_NOTRANSPORT -103"


11.0.9  NETWORK_NODRIVER
------------------------

"#define NETWORK_NODRIVER -104"


11.0.10  NETWORK_STIK_OK
------------------------

"#define NETWORK_STIK_OK -104 /* StiK present */"


11.0.11  NETWORK_NOTACTIVE
--------------------------

"#define NETWORK_NOTACTIVE -105 /* STinG n'est pas actif */"


11.0.12  NETWORK_NOHANDLER
--------------------------

"#define NETWORK_NOHANDLER -106 /* Routine TIMER non installable */"


11.0.13  INET_USE_DEBUG
-----------------------

"#define INET_USE_DEBUG TRUE /* print messages from library */"


11.0.14  INET_NUSE_DEBUG
------------------------

"#define INET_NUSE_DEBUG FALSE /* do not print any message */"


11.0.15  INET_ICMP
------------------

"#define INET_ICMP 1 /* IP assigned number for ICMP */"


11.0.16  INET_TCP
-----------------

"#define INET_TCP 6 /* IP assigned number for TCP */"


11.0.17  INET_UDP
-----------------

"#define INET_UDP 17 /* IP assigned number for UDP */"


11.0.18  INET_NO_TIMEOUT
------------------------

"#define INET_NO_TIMEOUT 0 /* Do not care about timeout, connection is
keeped alive */"


11.0.19  INET_CONNECTING
------------------------

"#define INET_CONNECTING 1 /* connection running... */"


11.0.20  INET_CONNECTED
-----------------------

"#define INET_CONNECTED 2 /* connected to host */"


11.0.21  INET_CONTACTED
-----------------------

"#define INET_CONTACTED 3 /* contacted by a host computer ( listen )
*/"


11.0.22  INET_DATA
------------------

"#define INET_DATA 4 /* some data sended by a host are available */"


11.0.23  INET_TIMER
-------------------

"#define INET_TIMER 5 /* nothing to do, is just if you need any time
for your private use */"


11.0.24  INET_LEAVE
-------------------

"#define INET_LEAVE 6 /* the host have closed the connection */"


11.0.25  INET_LEAVED
--------------------

"#define INET_LEAVED 7 /* you have closed the connection to host */"


11.0.26  INET_STATUS_CONTINUE
-----------------------------

"#define INET_STATUS_CONTINUE 0 /* keep connection */"


11.0.27  INET_STATUS_FINISH
---------------------------

"#define INET_STATUS_FINISH -200 /* send all data and close connection
*/"


11.0.28  INET_STATUS_KILL
-------------------------

"#define INET_STATUS_KILL -201 /* close connection now */"



UDO6
****

                   http://www.dirk-hagedorn.de/et/



