|
|
Description:
|
hubrptrAddrSearchTable OBJECT-TYPE
SYNTAX SEQUENCE OF HubrptrAddrSearchEntry
ACCESS not-accessible
STATUS mandatory
DESCRIPTION
"This table contains one entry per repeater in the
system. It defines objects which allow a network
management application to instruct an agent to watch
for a given MAC address and report which port it
was seen on. Only one address search can be in
progress on each repeater at any one time. Before
starting an address search, a management application
should obtain 'ownership' of the entry in
hubrptrAddrSearchTable for the repeater that is to
perform the search. This is accomplished with the
hubrptrAddrSearchLock and hubrptrAddrSearchStatus as
follows:
try_again:
get(HubrptrAddrSearchLock, hubrptrAddrSearchStatus)
while (HubrptrAddrSearchStatus != notInUse){/* Loop waiting for objects to be available*/
short delay
get(HubrptrAddrSearchLock, hubrptrAddrSearchStatus)}
/* Try to claim map objects */
lock_value = hubrptrAddrSearchLock
if ( set(HubrptrAddrSearchLock = lock_value,
hubrptrAddrSearchStatus = inUse,
hubrptrAddrSearchOwner = 'my-IP-address)
== FAILURE)
/* Another manager got the lock */
goto try_again
/* I have the lock */
set (HubrptrAddrSearchAddress = <search target>)
wait for hubrptrAddrSearchState to change from none
if (HubrptrAddrSearchState == single)
get (HubrptrAddrSearchGroup, hubrptrAddrSearchPort)
/* release the lock, making sure not to overwrite
anyone else's lock */
set (HubrptrAddrSearchLock = lock_value+1,
hubrptrAddrSearchStatus = notInUse,
hubrptrAddrSearchOwner = '')
A management station first retrieves the values of
the appropriate instances of the hubrptrAddrSearchLock
and hubrptrAddrSearchStatus objects, periodically
repeating the retrieval if necessary, until the value
of hubrptrAddrSearchStatus is 'notInUse'. The
management station then tries to set the same
instance of the hubrptrAddrSearchLock object to the
value it just retrieved, the same instance of the
hubrptrAddrSearchStatus object to 'inUse', and the
corresponding instance of hubrptrAddrSearchOwner to a
value indicating itself. If the set operation
succeeds, then the management station has obtained
ownership of the hubrptrAddrSearchEntry, and the value
of hubrptrAddrSearchLock is incremented by the agent (as
per the semantics of INTEGER). Failure of the
set operation indicates that some other manager has
obtained ownership of the hubrptrAddrSearchEntry.
Once ownership is obtained, the management station
can proceed with the search operation. Note that the
agent will reset hubrptrAddrSearchStatus to 'notInUse'
if it has been in the 'inUse' state for an abnormally
long period of time, to prevent a misbehaving manager
from permanently locking the entry. It is suggested
that this timeout period be between one and five
minutes.
When the management station has completed its search
operation, it should free the entry by setting
the instance of the hubrptrAddrSearchLock object to the
previous value + 1, the instance of the
hubrptrAddrSearchStatus to 'notInUse', and the instance
of hubrptrAddrSearchOwner to a zero length string. This
is done to prevent overwriting another station's
lock."
|
|
|
|
|
|