home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / gcc / ixemulsrc.lha / ixemul / include / inetd.h < prev    next >
C/C++ Source or Header  |  1996-12-11  |  2KB  |  50 lines

  1. #ifndef INETD_H
  2. #define INETD_H \
  3.      "$Id: inetd.h,v 4.1 1994/10/03 20:52:20 ppessi Exp $"
  4. /*
  5.  *      Internet daemon interface definitions
  6.  *
  7.  *      Copyright © 1994 AmiTCP/IP Group,
  8.  *                       Network Solutions Development, Inc.
  9.  *                       All rights reserved.
  10.  */
  11.  
  12. /* 
  13.  * The DaemonPort structure and its associated memory
  14.  * must be allocated with AllocVec call 
  15.  */
  16. struct DaemonPort {
  17.   struct MsgPort dp_Port;
  18.   void         (*dp_ExitCode)();
  19. };
  20.  
  21. #define DAEMONPORTNAME "inetd.ipc"
  22.  
  23. /*
  24.  * A message associated with each launched process 
  25.  */
  26. struct DaemonMessage {
  27.   struct Message dm_Msg;    /* Message name is FreeVec()'ed by inetd */
  28.   struct Process*dm_Pid;    /* set by the launcher */
  29.   struct Segment*dm_Seg;    /* used only if resident segment */
  30.   LONG           dm_Id;        /* socket id */
  31.   LONG         dm_Retval;    /* non-zero errorcode */
  32.   UBYTE          dm_Family;    /* address/protocol family */
  33.   UBYTE          dm_Type;
  34. };
  35.  
  36. /* Daemon types, used as socket types */
  37. #define DMTYPE_UNKNOWN   -1
  38. #define DMTYPE_INTERNAL  0        /* type is within builtin struct */
  39. #define DMTYPE_STREAM    SOCK_STREAM    /* stream socket */
  40. #define DMTYPE_DGRAM     SOCK_DGRAM    /* datagram socket */
  41. #define DMTYPE_RAW       SOCK_RAW    /* raw-protocol interface */
  42. #define DMTYPE_RDM       SOCK_RDM    /* reliably-delivered message */
  43. #define DMTYPE_SEQPACKET SOCK_SEQPACKET /* sequenced packet stream */
  44.  
  45. /* Return values from the startup code */
  46. #define DERR_LIB    0xA0
  47. #define DERR_OBTAIN 0xA1
  48.  
  49. #endif /* INETD_H */
  50.