The dpwrite man page







NAME
     dpwrite - send a DP message encoded in a byte string

SYNOPSIS
     #include 

     int dpwrite(dest, data, nbytes, mode)
     DPID *dest;
     char *data;
     int nbytes;
     int mode;

DESCRIPTION
     dpwrite() is used to send nbytes bytes of  data  to  the  DP
     process  with  dpid pointed to by dest (dpid is described in
     the man pages for dpgetpid(3DP)).  The data parameter can be
     used to send data of any type, as long as the pointer to the
     bytes of data is cast to type (char  *).   nbytes  indicates
     the  size  of  the  data  body  and  can  be up to 1K bytes.
     dpwrite() is  a  simpler  data-sending  interface  than  its
     cousin function dpsend().

     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  message  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, dpwrite() 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
     dpsend(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