home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / MSDOS / KA9Q / MSWIN / DSP2D_UP.ZIP / NETUSER.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-20  |  1.8 KB  |  58 lines

  1. /* Mods by G1EMM */
  2. #ifndef _NETUSER_H
  3. #define _NETUSER_H
  4.  
  5. /* Global structures and constants needed by an Internet user process */
  6.  
  7. #ifndef _GLOBAL_H
  8. #include "global.h"
  9. #endif
  10.  
  11. #define NCONN   20              /* Maximum number of open network connections */
  12.  
  13. extern int32 Ip_addr;   /* Our IP address */
  14. extern int Net_error;   /* Error return code */
  15. #define NONE            0       /* No error */
  16. #define CON_EXISTS      1       /* Connection already exists */
  17. #define NO_CONN         2       /* Connection does not exist */
  18. #define CON_CLOS        3       /* Connection closing */
  19. #define NO_MEM          4       /* No memory for TCB creation */
  20. #define WOULDBLK        5       /* Would block */
  21. #define NOPROTO         6       /* Protocol or mode not supported */
  22. #define INVALID         7       /* Invalid arguments */
  23.  
  24. #define INET_EOL        "\r\n"  /* Standard Internet end-of-line sequence */
  25.  
  26. /* Codes for the tcp_open call */
  27. #define TCP_PASSIVE     0
  28. #define TCP_ACTIVE      1
  29. #define TCP_SERVER      2       /* Passive, clone on opening */
  30.  
  31. /* Local IP wildcard address */
  32. #define INADDR_ANY      0x0L
  33.  
  34. /* Socket structure */
  35. struct socket {
  36.     int32 address;          /* IP address */
  37.     int16 port;             /* port number */
  38. };
  39. #define NULLSOCK        (struct socket *)0
  40.  
  41. /* Connection structure (two sockets) */
  42. struct connection {
  43.     struct socket local;
  44.     struct socket remote;
  45. };
  46. /* In domain.c: */
  47. int32 resolve __ARGS((char *name));
  48. int32 resolve_mx __ARGS((char *name));
  49. char *resolve_a __ARGS((int32 ip_address,int shorten));
  50.  
  51. /* In netuser.c: */
  52. int32 aton __ARGS((char *s));
  53. char *inet_ntoa __ARGS((int32 a));
  54. char *pinet __ARGS((struct socket *s));
  55. char *inet_ntobos __ARGS((int32 a));
  56.  
  57. #endif  /* _NETUSER_H */
  58.