HPUX ipccreate[2]






 ipccreate(2)                                                   ipccreate(2)





 NAME
      ipccreate - create a call socket

 SYNOPSIS
      #include<sys/ns_ipc.h>

      void ipccreate(
           ns_int_t socketkind,
           ns_int_t protocol,
           ns_int_t *flags,
           short opt[],
           ns_int_t *calldesc,
           ns_int_t *result);

 DESCRIPTION
      ipccreate is used to create a call socket for use with subsequent
      NetIPC calls to establish a virtual circuit connection between two
      processes.

      A process can have a system-defined maximum number of descriptors open
      at a time (see getrlimit(2)).  ipccreate() returns an error if a
      process attempts to exceed this limit.  This limit includes file
      descriptors, as well as socket descriptors and destination
      descriptors.  These descriptors may reference sockets and/or files
      inherited by or otherwise opened by the process.

      The NSO_PROTOCOL_ADDRESS option (code 128) can be used to create a
      call socket with a specific protocol address.  The peer process, which
      must have a priori knowledge of this protocol address, can call
      ipcdest() with this address to obtain a destination descriptor that
      will enable ipcconnect() to connect to this call socket.

 PARAMETERS
      socketkind     (input parameter) Must be NS_CALL.  Other values are
                     reserved for future use.

      protocol       (input parameter) Indicates the protocol module that
                     the calling process wants to access.  Must be NSP_TCP
                     or zero.  Other values are reserved for future use.

      flags          (input parameter) Must be 0 or a pointer to 0.  Other
                     values are reserved for future use.

      opt            (input parameter) See below.

      calldesc       (output parameter) Call socket descriptor.  Refers to
                     the newly-created call socket.

      result         (output parameter) See diagnostics section below for
                     more information.




 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992






 ipccreate(2)                                                   ipccreate(2)





    Opt Parameter
      See initopt and addopt for more information on NetIPC option buffers.

      NSO_MAX_CONN_REQ_BACK
                     (optioncode = 6) (datalength = 2)
                     A two-byte integer specifying the maximum number of
                     unreceived connection requests that can be queued to a
                     call socket.  If this value is not specified, the
                     default maximum is used.  Default: One request.  Range:
                     1 to 20.  (Note that a queue limit of one may be too
                     few if many processes attempt to initiate connections
                     to the call socket simultaneously.  If this occurs,
                     some connection requests will be automatically
                     rejected.)

      NSO_PROTOCOL_ADDRESS
                     (optioncode = 128) (datalength = 2)
                     A two-byte integer specifying a protocol-specific
                     address to be used by the newly-created call socket.
                     If this option is not specified, or if zero is
                     specified, Net.SM IPC dynamically allocates an address.
                     You must have super-user capability to request protocol
                     addresses less than 1024.  Recommended Range: 30767
                     through 32767.  If the protocol is TCP then this option
                     specifies the TCP port.

 RETURN VALUE
      None.  Errors are returned in the result parameter.

 ERRORS
      [NSR_BOUNDS_VIO]         One of the pointer arguments is invalid.

      [NSR_DUP_ADDRESS]        The protocol address specified in the
                               NSO_PROTOCOL_ADDRESS option is in use.

      [NSR_DUP_OPTION]         A particular option is defined more than once
                               in the opt parameter.

      [NSR_FLAGS]              The flags parameter was not 0 or a pointer to
                               0.

      [NSR_KIND_AND_PROTOCOL]  The requested protocol is not supported in
                               the default domain.

      [NSR_MAX_CONNECTQ]       The NSO_MAX_CONN_REQ_BACK option must be
                               greater than 0 and less than 20.

      [NSR_NO_DESC_AVAILABLE]  The process exceeded the system-defined
                               number of file and socket descriptors that
                               can be open at a time (see getrlimit(2)).




 Hewlett-Packard Company            - 2 -     HP-UX Release 9.0: August 1992






 ipccreate(2)                                                   ipccreate(2)





      [NSR_NO_ERROR]           The call was successful.

      [NSR_NO_FILE_AVAILABLE]  The system cannot allocate a file structure
                               at this time.

      [NSR_NO_MEMORY]          Sufficient system memory is not available to
                               execute this call at this time.

      [NSR_NOT_ALLOWED]        The protocol address specified via the
                               NSO_PROTOCOL_ADDRESS option was less than
                               1024 and the program did not have super-user
                               capability.

      [NSR_OPT_OPTION]         An option specified in the opt parameter is
                               unknown or unsupported.

      [NSR_OPT_SYNTAX]         A length or offset value in the opt parameter
                               is invalid.

      [NSR_PROTOCOL]           The combination of the protocol parameter and
                               socketkind parameter could not be satisfied.
                               At least one is incorrect.

 AUTHOR
      ipccreate() was developed by HP.

 SEE ALSO
      getrlimit(2), ipcconnect(2), ipccontrol(2), ipcdest(2),
      ipcgetnodename(2), ipclookup(2), ipcname(2), ipcnamerase(2),
      ipcrecv(2), ipcrecvcn(2), ipcselect(2), ipcsend(2), ipcsetnodename(2),
      ipcshutdown(2), addopt(3N), initopt(3N), ipcerrmsg(3N),
      optoverhead(3N), readopt(3N).






















 Hewlett-Packard Company            - 3 -     HP-UX Release 9.0: August 1992