The dpsend man page







NAME
     dpsend - send linked list to a DP process

SYNOPSIS
     #include 

     int dpsend(dest, data, mode)
     DPID *dest;
     DPDNODE *data;
     int mode;

DESCRIPTION
     Like dpwrite(), dpsend() is used to send data to the DP pro-
     cess  with dpid dest (dpid is described in the man page sec-
     tion for dpgetpid(3DP)).  Whereas dpwrite() is  best  for  a
     data  string, dpsend() is more suitable for sending a linked
     list of data blocks (the total size of the message  must  be
     no  greater  than  1024 bytes).  In other words, dpsend() is
     the general message-sending function call.

     The message data passed to dpsend() is a linked  list  of  a
     data structure called DPDNODE, defined in the DP header file
     as follows:

          typedef struct dpdstr {
               char *dpd_data;
               int  dpd_len;
               struct dpdstr *dpd_next;
          } DPDNODE;

     Each datum on the list is encoded in dpd_data,  and  dpd_len
     indicates  the  length of the datum.  dpd_next points to the
     next datum or can be NULL for the last datum on the list.

     The parameter mode is used to tell DP how to  send  out  the
     data.  Two orthogonal sets of options are valid:

          DPRECV and DPGETMSG:  DPRECV (defined in dp.h,  as  are
          the  other  flags)  indicates that the message is to be
          sent synchronously, that is, when  it  arrives  at  the
          address space of process dest , it will be queued until
          an explicit retrieving is done by  dest.  DPGETMSG,  on
          the  other hand, indicates the message should interrupt
          whatever process dest is doing; what the target process
          will  do  with  the data, however, is totally up to the
          user.

          DPREL and DPUNREL:  DPREL means the data should be sent
          reliably.   In  other  words,  as  long  as  the target
          machine is healthy  (as  well  as  the  network),  data
          marked  reliable  will be guaranteed of their delivery.
          DPUNREL indicates the data should be sent  without  any






          such guarantee.

     Care should be taken when transmitting data between machines
     that  have different byte-ordering schemes (i.e., big-endian
     or little-endian).  DP does not perform  any  conversion  on
     the  data  it  sends or receives, so the user is responsible
     for making any  necessary  conversions.   Examples  of  big-
     endian  systems  are  most  UNIX workstations (including Sun
     SPARCs and IBM RS/6000s), Motorola 68k series, and  the  KSR
     supercomputer.   Examples of little-endian systems are Intel
     80x86s and DEC workstations.

RETURN VALUES
     Upon success, dpsend()  returns  0.   Otherwise  a  negative
     integer is returned indicating one of the following errors:

          DPFAIL         General DP failure

          DPDESTDEAD     The destination is marked dead

REMARK
     This is a DP function call.

AUTHOR
     David Arnow

FILES
     /usr/include/dp/dp.h - DP header file
     /usr/lib/libdp.a     - DP library file

SEE ALSO
     dpwrite(3DP), dprecv(3DP), dpgetmsg(3DP)





Essential DP MAN Pages:

General/Essential:


Non-Interrupting Messages:


Interrupting Messages:
  • dpblock
  • dpcatchmsg
  • dpgetmsg
  • dppause
  • dpunblock

    Other:
    Return to DP For Students Return to The DP Project Return to David Arnow's Home Page