Archived from groups: comp.dcom.lans.ethernet (More info?)
Hello Everybody,
I have been trying to understand the example code provided for GARP in
802.1d 1998 edition.
There are certain variables for which I am not able to understand their
significance as regard to the code implementation.
If someone has implemented/studied this kindly suggest if my
understanding is correct.
There is a variable in Garp.h file
unsigned last_gid_used;
and it has been used at numerous places in the code.
I am giving excerpts from the example implementation in the standard
Here I am assume that they are trying to make sure that at the time
when GID instance is created for this port it should be in default,
i.e insure to this port/instance that there are transmissions pending
(2) It has been used in Destroy GID as well where I assume code is
going through the whole array of GID instances and seeing if the
instances which are registered and then destroying them
(3)
static void gid_leaveall(Gid *my_port)
{ /*
* only for shared media at present
*/
unsigned i;
Garp *application;
application = my_port->application;
for (i = 0; i <= application->last_gid_used; i++)
(void) gidtt_event(my_port, &my_port->machines[i], Gid_rcv_leaveempty);
}
I am having problems undestanding the code at this point because I was
assuming that last_gid_used is keeping track of the number og gid
instances created for the application
But above code is used for sending leaveall messages to all the state
machines of a port(Participant)
How come we are using last_gid_used?
Should not we use upper_limit of gid machines allowed per port
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.