
NNNNAAAAMMMMEEEE
      libtclObjSrv.so - TCL-library interface to the object server

SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
      lllliiiibbbbttttccccllllOOOObbbbjjjjSSSSrrrrvvvv....ssssoooo

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
      _l_i_b_t_c_l_O_b_j_S_r_v._s_o is a TCL shared library with extensions for accessing
      the object server.  It supports the ggggeeeetttt, sssseeeetttt, ccccrrrreeeeaaaatttteeee, rrrreeeemmmmoooovvvveeee, vvvveeeerrrriiiiffffyyyy,
      sssseeeeaaaarrrrcccchhhh and DDDDSSSSsssseeeeaaaarrrrcccchhhh operations, as well as an iiiinnnnffffoooo psuedo-op that
      returns information about the database.

      For each object class there is a command defined; the command name is
      the class name prefixed by a dot "." character.  The first parameter to
      the object commands is an option, one of:  ggggeeeetttt, sssseeeetttt, ccccrrrreeeeaaaatttteeee, rrrreeeemmmmoooovvvveeee,
      vvvveeeerrrriiiiffffyyyy, sssseeeeaaaarrrrcccchhhh, DDDDSSSSsssseeeeaaaarrrrcccchhhh, or iiiinnnnffffoooo.  For example, the following command:

      sgitcl> .hostObject info

      will execute the iiiinnnnffffoooo option for the hhhhoooossssttttOOOObbbbjjjjeeeecccctttt class.  The object name
      may be abbreviated to the least unambiguous string.  The options are
      described in detail below.

   OOOOppppeeeennnniiiinnnngggg tttthhhheeee lllliiiibbbbrrrraaaarrrryyyy
      To open the library, execute the following command from within sgitcl:

          sgitcl> dlopen libtclObjSrv.so init ObjSrv_Init

      The target server will default to the login host.  The IP address of the
      target is available in the TCL variable "_objAddr".  To change targets,
      set this variable to the IP address of the desired server.  For example:

          sgitcl> set _objAddr 192.26.75.54
          192.26.75.54

      will target object operations at the specified machine (the set command
      will print the new value of the variable).  There is also a command
      called "gethostbyname" that will do an IP lookup on a server name; so
      the above command could be executed as:

          sgitcl> set _objAddr [gethostbyname alpine]
          192.26.75.54

      The brackets tell TCL to execute the contents as a seperate command and
      substitute the result string for the bracketed text.

   CCCCoooommmmmmmmaaaannnndddd SSSSyyyynnnnttttaaaaxxxx
      sgitcl> ._o_b_j_e_c_t_N_a_m_e ggggeeeetttt _o_i_d _a_t_t_r_i_b_u_t_e_s

      The ggggeeeetttt option retrieves attributes of an object instance, specified by
      _o_i_d.  The _a_t_t_r_i_b_u_t_e_s to be retrieved are defined by a list of aid's;
      attribute names may also be used (derived attributes are recognized).
      The list must be enclosed in quotes "" or braces {} if it contains more
      than one element.  The returned string will contain the values formatted
      as a list in the order specified on the command.

      EEEExxxxaaaammmmpppplllleeee:
          sgitcl> .hostObject get 59.201.1762020729.1 {59.201.1 owner}
          alpine rj

      sgitcl> ._o_b_j_e_c_t_N_a_m_e sssseeeetttt _o_i_d _a_i_d-_v_a_l_u_e-_l_i_s_t

      The sssseeeetttt option sets the values of attributes of an object instance,
      specified by _o_i_d .  The _a_i_d-_v_a_l_u_e-_l_i_s_t parameter is a list of aid/value
      pairs defining the attributes to be set.  The return value is an empty
      string.

      EEEExxxxaaaammmmpppplllleeee:
          sgitcl> .hostObject set 59.201.1762020729.1 {owner Beavis}
          sgitcl> .hostObject get 59.201.1762020729.1 {owner}
          Beavis

      sgitcl> ._o_b_j_e_c_t_N_a_m_e ccccrrrreeeeaaaatttteeee _a_i_d-_v_a_l_u_e-_l_i_s_t

      The ccccrrrreeeeaaaatttteeee option makes a new instance of the class.  The _a_i_d-_v_a_l_u_e-_l_i_s_t
      is a list of aid/value pairs defining the attributes of the object; any
      requiredOnCreate attributes must be defined.  The return value is the
      _o_i_d of the new instance.

      EEEExxxxaaaammmmpppplllleeee:
          sgitcl> set beavisOID [.peopleNISObject create \
          sgitcl>         {loginName beavis jobTitle "MTV flunky"}]
          sgitcl> .peopleNISObject get $beavisOID jobTitle
          MTV flunky

      Note the use of TCL's sssseeeetttt command to store the returned _o_i_d in a
      variable, which can then be used to perform further operations on the
      new object.


      The rrrreeeemmmmoooovvvveeee option destroys an instance of the class, specified by _o_i_d .
      The return value is an empty string.

      EEEExxxxaaaammmmpppplllleeee:
          sgitcl> .peopleNISObject remove $beavisOID
          sgitcl> .peopleNISObject get $beavisOID loginName
          query error (1)

      Note that after the object is removed, an attempt to access that object
      results in LEGO error 1 (LLLLEEEEGGGGOOOO____EEEERRRRRRRR____NNNNooooSSSSuuuucccchhhhNNNNaaaammmmeeee).

      sgitcl> ._o_b_j_e_c_t_N_a_m_e vvvveeeerrrriiiiffffyyyy

      Performs the vvvveeeerrrriiiiffffyyyy operation on the target server.  Returns an empty
      string.  In this case, the object name is not significant (i.e. any
      class may be used).

      EEEExxxxaaaammmmpppplllleeee:
          sgitcl> .host verify

      sgitcl> ._o_b_j_e_c_t_N_a_m_e sssseeeeaaaarrrrcccchhhh _a_t_t_r-_v_a_l_u_e-_o_p-_l_i_s_t

      Performs a sssseeeeaaaarrrrcccchhhh on the target server.  The _a_t_t_r-_v_a_l_u_e-_o_p-_l_i_s_t is a
      list of attribute/value comparisons defining the filter to be applied to
      the object database.  Each comparison consists of an _a_i_d (or attribute
      name), a comparison operator, and a value.  The return value is a list
      of matching _o_i_d's.

      EEEExxxxaaaammmmpppplllleeee:
          sgitcl> .host search {systemName=alpine owner = rj}
          59.201.1762020729.1

      Note that spaces are optional around the operator; if the value string
      is a list, or contains embedded whitespace, it must be enclosed in
      quotes or braces, and must be preceded by a space (before the open quote
      or brace).  The comparison operators are defined as for C/C++:

              =       exactly equal
              !=      not equal
              >=      greater than or equal
              <=      less than or equal
              >       strictly greater
              <       strictly less

      Integer values are translated in hex if preceded by 0x, and in octal if
      a leading zero (i.e. C style translation).  Boolean values may be
      specified as "true" or "false".  An attribute of type legoTypeTime is
      translated using the getdate() routine.  Strings with embedded spaces
      must be enclosed in quotes or braces.

      The "matches any" operator is not defined; simply leaving the attribute
      out of the filter will achieve the same effect.

      sgitcl> ._o_b_j_e_c_t_N_a_m_e DDDDSSSSsssseeeeaaaarrrrcccchhhh _a_t_t_r-_v_a_l_u_e-_o_p-_l_i_s_t _i_m_p_o_r_t_a_n_t-_a_t_t_r_s [----aaaannnnyyyy]

      Performs a Directory Server search.  The _a_t_t_r-_v_a_l_u_e-_o_p-_l_i_s_t is as for
      sssseeeeaaaarrrrcccchhhh .  The _i_m_p_o_r_t_a_n_t-_a_t_t_r_s argument is a list of aid's/attribute
      names to be returned.  The optional switch -aaaannnnyyyy indicates that any
      server may respond; if ommitted, then the search is directed at the
      current target server.  The return value is a list of oid/attribute-list
      pairs, one for each matching object found.  After this command returns,
      the global variable "_objResponder" will contain the IP address of the
      server that responded.

      EEEExxxxaaaammmmpppplllleeee:
          sgitcl> set _objResponder
          can't read "_objResponder": no such variable
          sgitcl> .host DSsearch {systemName=alpine} {numCPUs memSize} -any
          59.201.1762020729.1 {1 41943040}
          sgitcl> set _objResponder
          192.26.75.11

      sgitcl> ._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo [_o_p_t_i_o_n [args]]

      Provides information about the object database.  With no ooooppppttttiiiioooonnnn
      parameter, the info command will return the complete description of the
      object as it appears in the *.op file used to initialize the database.
      The other options are described below:

      sgitcl> ._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo aaaannnnaaaammmmeeeessss

      returns a list of the attribute names defined for the object; derived
      attributes are NOT included.

      sgitcl> ._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo ooooiiiidddd

      returns the class oid (with the system and instance fields set to zero).

      sgitcl> ._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo aaaaiiiidddd _a_t_t_r-_n_a_m_e

      returns the aid of the named attribute.

      sgitcl> ._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo aaaattttttttrrrr _a_t_t_r-_n_a_m_e

      returns the text description of an attribute as it appears in the *.op
      file.

      sgitcl> ._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo ppppaaaarrrreeeennnntttt

      returns the name of the base class.  For the bbbbaaaasssseeeeOOOObbbbjjjjeeeecccctttt class, the
      returned value is an empty string.

SSSSEEEEEEEE AAAALLLLSSSSOOOO
      TCL(1)
