home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff225.lzh / AmigaTCP / src / netuser.h < prev    next >
C/C++ Source or Header  |  1989-06-24  |  992b  |  35 lines

  1. /* Global structures and constants needed by an Internet user process */
  2. #define    NCONN    20        /* Maximum number of open network connections */
  3.  
  4. extern int32 ip_addr;    /* Our IP address */
  5.  
  6. extern int net_error;    /* Error return code */
  7. #define    NONE    0        /* No error */
  8. #define    CON_EXISTS    1    /* Connection already exists */
  9. #define    NO_CONN    2        /* Connection does not exist */
  10. #define    CON_CLOS    3    /* Connection closing */
  11. #define    NO_SPACE    4    /* No memory for TCB creation */
  12. #define    WOULDBLK    5    /* Would block */
  13. #define    NOPROTO        6    /* Protocol or mode not supported */
  14. #define    INVALID        7    /* Invalid arguments */
  15.  
  16. /* Codes for the tcp_open call */
  17. #define    TCP_PASSIVE    0
  18. #define    TCP_ACTIVE    1
  19.  
  20. /* Socket structure */
  21. struct socket {
  22.     int32 address;        /* IP address */
  23.     int16 port;            /* port number */
  24. };
  25.  
  26. /* Connection structure (two sockets) */
  27. struct connection {
  28.     struct socket local;
  29.     struct socket remote;
  30. };
  31. #define    NULLSOCK    (struct socket *)NULL
  32. int32 aton();
  33. char *inet_ntoa(),*psocket();
  34. long htol();
  35.