home *** CD-ROM | disk | FTP | other *** search
/ Millennium Time Capsule / AC2000.BIN / disks / ac9_disk / net157 / transprt.bh < prev   
Encoding:
Text File  |  1997-07-24  |  3.4 KB  |  75 lines

  1. '
  2. '      transprt.h          (c) Steve Adam   1995
  3. '                              steve@netinfo.com.au
  4. '                   Support by Dan Ackerman 1996
  5. '                              ackerman.29@postbox.acs.ohio-state.edu
  6. '
  7. '      Include this file to use functions from STiK.
  8. '      i.e.: tcp, udp, etc ...
  9. '
  10. '      Converted to HiSoft BASIC by Paul Jones.
  11.  
  12. ' * TCP connection states
  13.  
  14. CONST TCLOSED%=0   ' No connection.  Null, void, absent, ...         
  15. CONST TLISTEN%=1   ' Wait for remote request                         
  16. CONST TSYN_SENT%=2   ' Connect request sent.  Await matching request   
  17. CONST TSYN_RECV%=3   ' Wait for connection ACK.  (Listener only ??)    
  18. CONST TESTABLISH%=4   ' Connection is established.  Handshake completed 
  19. CONST TFIN_WAIT1%=5   ' Await termination request or acknowledgement    
  20. CONST TFIN_WAIT2%=6   ' Await termination request                       
  21. CONST TCLOSE_WAIT%=7   ' Await termination request from local user       
  22. CONST TCLOSING%=8   ' Await termination acknowledge from remote TCP   
  23. CONST TLAST_ACK%=9   ' Await acknowledgement of terminate request sent 
  24. CONST TTIME_WAIT%=10   ' Delay to ensure remote has received term' ACK   
  25.  
  26. ' * Error return values
  27.  
  28. CONST E_NORMAL%=0       ' No error occured ...                    
  29. CONST E_OBUFFULL%=-1       ' Output buffer is full                   
  30. CONST E_NODATA%=-2       ' No data available                       
  31. CONST E_EOF%=-3       ' EOF from remote                         
  32. CONST E_RRESET%=-4       ' RST received from remote                
  33. CONST E_UA%=-5       ' RST.  Other end sent unacceptable pkt   
  34. CONST E_NOMEM%=-6       ' Something failed due to lack of memory  
  35. CONST E_REFUSE%=-7       ' Connection refused by remote            
  36. CONST E_BADSYN%=-8       ' A SYN was received in the window        
  37. CONST E_BADHANDLE%=-9       ' Bad connection handle used.             
  38. CONST E_LISTEN%=-10      ' The connection is in LISTEN state       
  39. CONST E_NOCCB%=-11      ' No free CCB's available                 
  40. CONST E_NOCONNECTION%=-12      ' No connection matches this packet (TCP) 
  41. CONST E_CONNECTFAIL%=-13      ' Failure to connect to remote port (TCP) 
  42. CONST E_BADCLOSE%=-14      ' Invalid TCP_close() requested           
  43. CONST E_USERTIMEOUT%=-15      ' A user function timed out               
  44. CONST E_CNTIMEOUT%=-16      ' A the connection timed out              
  45. CONST E_CANTRESOLVE%=-17      ' Can't resolve the hostname              
  46. CONST E_BADDNAME%=-18      ' Domain name or dotted dec. bad format   
  47. CONST E_LOSTCARRIER%=-19      ' The modem disconnected                  
  48. CONST E_NOHOSTNAME%=-20      ' Hostname does not exist                 
  49. CONST E_DNSWORKLIMIT%=-21      ' Resolver Work limit reached             
  50. CONST E_NONAMESERVER%=-22      ' No nameservers could be found for query 
  51. CONST E_DNSBADFORMAT%=-23      ' Bad format of DS query                  
  52. CONST E_UNREACHABLE%=-24      ' Destination unreachable                 
  53. CONST E_DNSNOADDR%=-25      ' No address records exist for host       
  54. CONST E_LOCKED%=-26    ' Routine is unavailable
  55. CONST E_LASTERROR%=26    ' ABS of last error code in this list     
  56.  
  57. ' * FLagbox Flag definitions (max 64 flags ...)
  58.  
  59. CONST FL_do_resolve%=0
  60. CONST FL_housekeep%=1
  61. CONST FL_slipin%=2
  62. CONST FL_slipout%=3
  63. CONST FL_tcp_timer%=4
  64. CONST FL_frag_ttl_check%=5
  65. CONST FL_g_resv%=6
  66. CONST FL_g_wait%=7
  67.  
  68. ' * Values for protocol field
  69.  
  70. CONST P_ICMP%=1
  71. CONST P_TCP%=6
  72. CONST P_UDP%=17
  73.  
  74.  
  75.