GARP/GVRP Question

Forum General Networking : Network General Discussions - GARP/GVRP Question

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

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

e.g

(1)in Gid.c under gid_create_gid as follows -

my_port->last_transmitted = application->last_gid_used;
my_port->last_to_transmit = application->last_gid_used;

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

static void gid_destroy_gid(Gid *gid)
{
unsigned gid_index;
for (gid_index = 0; gid_index <= gid->application-
>last_gid_used; gid_index++)
{
if (gid_registered_here(gid, gid_index))
gid->application->leave_indication_fn(gid->application,
gid, gid_index);
}
sysfree(gid->machines);
sysfree(gid);
}

(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

Kindly correct me my understanding??

Your help would be highly appreciated.

Thanks in advance.
Sincerely,
Jassy.

Sponsored Links
Register or log in to remove.
Tom's Hardware > Forum > General Networking > Network General Discussions > GARP/GVRP Question
Go to:

There are 1144 identified and unidentified users. To see the list of identified users, Click here.

Please mind

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.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them