man(1) Manual page archive


     IMPORT(2)                                               IMPORT(2)

     Name
          import - Imports a box under a given name in the name space.

     Synopsis
          #include <ulib.h>

          void import(char* nm, char* addr, char* sel, char* selc, int p)

     Description
          Import defines a new name for a box. The name defined, nm,
          is introduced in the prefix table that implements the name
          space. After the call, any name starting with the same pre-
          fix is considered to match and the imported box may be
          selected for the operation.

          The box imported is located at the server whose network
          address is addr and is known by that server as the box with
          name sel and constraint selc.

          The special network address any may be used to request that
          any box advertised under name sel with constraint matching
          selc be imported to the name space as soon as the advertise-
          ment is received.

          The p parameter determines the place where the entry is
          placed in the name space. This is important since entries
          are searched in order from the ones above to the ones below.
          For automatic imports of advertised boxes, entries will be
          added to the place determined at the time of the call. Val-
          ues for p can be:

          MABOVE  determines that the entry goes above existing ones.
          MBELOW  determines that it goes below existing ones.
          MUNIX   determines that goes above after removing existing
                  ones for the same name.

     Example
               import("/c", "nautilus:777", "/b", nil, MABOVE);
               import("/c", "any", "/b", "*!p98", MABOVE);

          The first call adds the name (the prefix) /c to the name
          space above existing entries. The box known as /b by the
          server reachable by the connection /b/con/nautilus:777 is
          the one installed. The second call is similar, but instead
          of requesting an immediate import, arranges for boxes adver-
          tised under the name /b with constraints matching *!98 to be
          imported under the name /c as soon as the ad is received
          (their entries will be installed above the ones existing at
          the time of the call).

     IMPORT(2)                                               IMPORT(2)

     Source
          /src/b/port/box.c

     See also
          intro(2) and forget(2).

     Bugs