Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>nbnamestat()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NBNAMESTAT()
 Determines the status of a NetBIOS name
------------------------------------------------------------------------------
 Syntax

     NBNAMESTAT(<nPos>,[<cStatName>]) --> nStatus

     Netware: 2.2 and 3.11

 Arguments

     <nPos>  Designates the position in the local name table that is
     read.

     <cStatName>  Designates a station name of the workstation from which
     the name table is read.  The default station is the local workstation.

 Returns

     NBNAMESTAT() returns a bit mask that contains the status of the
     specified NetBIOS name.  The highest bit (bit 8) indicates if the name
     is a station name (not set) or a group name (set).  The three lower bits
     (bits 1 to 3) are seen as one unit.  Their value returns information
     about the current state of the specified name.  The following table
     contains a description of the three bits:

     Table 31.3:  Coding of Bits 1-3 in the NBNAMESTAT() Return Value
     ------------------------------------------------------------------------
     Value   Binary    Definition
     ------------------------------------------------------------------------
     0       000       Name registration not finished
     4       100       Name registered properly
     5       101       Name already deleted, but sessions still to come
     6       110       Duplicate name
     7       111       Duplicate name, deletion in process
     ------------------------------------------------------------------------

     If an error occurs (for example, if <cStatName> has not been found), the
     function returns -1.

 Description

     Internally, each NetBIOS workstation keeps a local name table with up to
     20 NetBIOS names.  NBNAMESTAT() allows you to determine the status of
     each name in the table.  The status of a name in the name table can be
     determined for the local workstation or, by passing a NetBIOS station
     name <cStatName>, for any workstation in the network.

 Examples

     .  Check to see if the first NetBIOS name on the local
        workstation is a station or group name:

        nStat=NBNAMESTAT(1)
        IF nStat=-1
           ? 'Error!'
        ELSE
           IF ISBIT(nStat,8)
              ? 'Group name'
           ELSE
              ? 'Station name'
           ENDIF
        ENDIF

     .  Check to see if the third NetBIOS name on the local
        workstation is registered properly:

        IF NUMAND(NBNAMESTAT(3),7)=4
           ? 'Name registered properly!'
        ELSE
           ? 'Name not properly registered!'
        ENDIF

See Also: NBNAME() NBNAMECNT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson