


t6recvfrom(3N)                 1.1                 t6recvfrom(3N)


NNAAMMEE
       t6recvfrom  -  read  security  attributes  and data from a
       trusted endpoint

SSYYNNOOPPSSIISS
       cccc [ _f_l_a_g ... ] _f_i_l_e ...  --lltt66 [ _l_i_b_r_a_r_y ... ]

       ##iinncclluuddee <<ttssiixx//tt66aattttrrss..hh>>
       iinntt tt66rreeccvvffrroomm((iinntt ffdd,, cchhaarr **bbuuff,, iinntt lleenn,, iinntt ffllaaggss,,
            ssttrruucctt ssoocckkaaddddrr **ffrroomm,, iinntt **ffrroommlleenn,,
            tt66aattttrr__tt aattttrr__ppttrr,, tt66mmaasskk__tt **nneeww__aattttrrss))

DDEESSCCRRIIPPTTIIOONN
       tt66rreeccvvffrroomm  receives  data  and  its  associated  security
       attributes  from  a  communication endpoint.  The _f_r_o_m and
       _f_r_o_m_l_e_n parameters are only used if you  wish  to  receive
       the source address for the data.  This may not be applica-
       ble for some trusted endpoints.  If not used, these fields
       should  be  set  to 00.  If _f_r_o_m is not a NNUULLLL pointer, the
       source address of the message is filled in.  ffrroommlleenn is  a
       value-result  parameter,  initialized  to  the size of the
       buffer associated with ffrroomm, and  modified  on  return  to
       indicate the actual size of the address stored there.  The
       length of the message is returned.  If a  message  is  too
       long  to  fit  in the supplied buffer, excess bytes may be
       discarded depending on the type of socket the  message  is
       received from (see ssoocckkeett(3N)).

       The  ffllaaggss parameter is formed by ORing one or more of the
       following:

       MMSSGG__OOOOBB
              Read any "out-of-band" data present on  the  socket
              rather   than   the  regular  "in-band"  data.   If
              aattttrr__ppttrr is non-NNUULLLL, "out-of-band"  data  security
              attributes are also retrieved.

       MMSSGG__PPEEEEKK
              "Peek"  at the data present on the socket; the data
              is returned, but not consumed, so that a subsequent
              receive  operation  will  see  the  same  data.  If
              aattttrr__ppttrr is non-NNUULLLL, security  attributes  of  the
              data are also peeked.

       aattttrr__ppttrr  specifies  a control structure in which to store
       those attributes the caller wishes to retrieve.  To get an
       attribute  from the control structure, see tt66ggeett__aattttrr(3N).
       Any attribute that the receiving process does not care  to
       receive  may  not  be  specified in the control structure.
       This minimizes the attribute translation time when passing
       the attributes out of the kernel.

       If the tt66nneeww__aattttrr(3N) call was made previously with a set-
       ting of OONN, the security attributes of the  received  data



TSIX(RE)                   12 Nov 1995                          1





t6recvfrom(3N)                 1.1                 t6recvfrom(3N)


       will  be  returned only if they have changed from the last
       set  read.   **nneeww__aattttrrss  is  set  to  the  mask  of  those
       attributes   actually  returned.  If  new  attributes  are
       detected, all attributes requested by the  receiving  pro-
       cess are returned, not just those that have changed.

       Again,  it  is  critical  that  the return value always be
       checked.  It is the number of bytes actually received,  or
       --11  with  the  error  code stored in eerrrrnnoo.  Revocation of
       access is possible if the received data changes to a level
       not accessible to the receiving process.

RREETTUURRNN VVAALLUUEE
       tt66rreeccvvffrroomm  returns --11 on failure, and the number of bytes
       read on successful completion.

SSEEEE AALLSSOO
       lliibbtt66(3N), tt66ggeett__aattttrr(3N), tt66sseennddttoo(3N)

NNOOTTEESS





































TSIX(RE)                   12 Nov 1995                          2


