[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qpimd-users] querry realted with vifs and ifs in pimd
From: |
Everton Marques |
Subject: |
Re: [qpimd-users] querry realted with vifs and ifs in pimd |
Date: |
Wed, 9 Sep 2009 14:20:33 -0300 |
Hi,
On Wed, Sep 9, 2009 at 11:28 AM, <address@hidden> wrote:
>
> -> Each interface which is known as interface in pimd has pim_interface
> and they have ifindex(interface's) and vifindex(pim_interface's)
> respectively. Every interface as well as pim_inteface has primary
> address.
>
> if i am correct then can anyone tell me why are we duplicating same
> information in both interface and pim_interface? Is it due to dependance
> of quagga on other moduels or is it standarda way of defining inteface
> for each daemon?
Zebra lib creates an "struct interface" instance for *every* interface seen
by the operation system (even for those not running PIM). Those
interfaces are assigned an ifindex by the operating system. The
struct "interface" keeps a whole list of connected addresses (not just
one primary address), see the "connected" member.
pimd creates an "struct pim_interface" only for interfaces running
multicast (either PIM or IGMP). pimd needs to detect change in
the primary address of the interface, then it saves the current
primary address in "primary_address" under "struct pim_interface".
Also, in order to program the MFC, pimd needs to assign an unique
vif_index to an interface. Currently, such an unique vif_index is easily
allocated by copying the same value as interface->ifindex, but ifindex
and vif_index are not exactly the same thing, hence the apparent
duplication.
Everton