Windows-Server-2003/net/rras/ip/igmp
2024-08-04 01:28:15 +02:00
..
api.c Initiall commit 2024-08-04 01:28:15 +02:00
api.h Initiall commit 2024-08-04 01:28:15 +02:00
global.h Initiall commit 2024-08-04 01:28:15 +02:00
if.c Initiall commit 2024-08-04 01:28:15 +02:00
if.h Initiall commit 2024-08-04 01:28:15 +02:00
igmp.rc Initiall commit 2024-08-04 01:28:15 +02:00
igmptimer.c Initiall commit 2024-08-04 01:28:15 +02:00
igmptimer.h Initiall commit 2024-08-04 01:28:15 +02:00
igmptrace.h Initiall commit 2024-08-04 01:28:15 +02:00
igmpv2.def Initiall commit 2024-08-04 01:28:15 +02:00
log.h Initiall commit 2024-08-04 01:28:15 +02:00
macros.h Initiall commit 2024-08-04 01:28:15 +02:00
makefile Initiall commit 2024-08-04 01:28:15 +02:00
makefile.inc Initiall commit 2024-08-04 01:28:15 +02:00
mgmigmp.c Initiall commit 2024-08-04 01:28:15 +02:00
mgmigmp.h Initiall commit 2024-08-04 01:28:15 +02:00
mib.c Initiall commit 2024-08-04 01:28:15 +02:00
mib.h Initiall commit 2024-08-04 01:28:15 +02:00
packet.c Initiall commit 2024-08-04 01:28:15 +02:00
packet.h Initiall commit 2024-08-04 01:28:15 +02:00
pchigmp.h Initiall commit 2024-08-04 01:28:15 +02:00
readme Initiall commit 2024-08-04 01:28:15 +02:00
sources Initiall commit 2024-08-04 01:28:15 +02:00
sync.c Initiall commit 2024-08-04 01:28:15 +02:00
sync.h Initiall commit 2024-08-04 01:28:15 +02:00
table2.c Initiall commit 2024-08-04 01:28:15 +02:00
table2.h Initiall commit 2024-08-04 01:28:15 +02:00
table.c Initiall commit 2024-08-04 01:28:15 +02:00
table.h Initiall commit 2024-08-04 01:28:15 +02:00
work1.c Initiall commit 2024-08-04 01:28:15 +02:00
work1.h Initiall commit 2024-08-04 01:28:15 +02:00
work.c Initiall commit 2024-08-04 01:28:15 +02:00
work.h Initiall commit 2024-08-04 01:28:15 +02:00

#if (0)

//------------------------------------------------------------------------------
// Abbreviations:
//------------------------------------------------------------------------------

abbr:    struct type          description

pite:   PIF_TABLE_ENTRY:      pointer to interface table entry
pge:    PGROUP_TABLE_ENTRY:   pointer to group entry in group table.
GI_entry:                     the group entry for an interface.
pgie:   PGI_ENTRY:            pointer to group entry for an interface. It 
                              hangs from both pite and pge lists.
ppge:   PPROXY_GROUP_ENTRY:   pointer to group joined on proxy interface.
                              Hangs from pite & also listed in proxy hash table
ptg:                          pointer to timer global.                              
DCS:                          Dynamic critical section lock
DRW:                          Dynamic read-write lock
IF:                           Interface
groups-if list                list of all gi entries accessed through the 
                              ordered group list.
if-groups list                list of all gi entries accessed through the
                              ordered interface list.


    
//------------------------------------------------------------------------------
// Optimizations that can be done:
//------------------------------------------------------------------------------

1. Dynamically change the size of the interface, group, & proxy hash tables
2. Release InterfaceList locks early in AddInterface, DeleteInterface, etc.
   (in that case you have to set a flag saying being initialized, so that that
   interface is not enumerated)




//------------------------------------------------------------------------------
// Order of Locking:
//------------------------------------------------------------------------------

sockets-list    CSLock      protects the list of socket-event binding entries.
                            (many sockets, ie igmprtr interfaces are bound to 
                            the same wait-event entry).
                            Take write lock when the interface is being created,
                            deleted, activated or protocol change.
                            Take read lock when the input packet is being 
                            processed.

IF-list         CSLock      protects the ordered interface list 
                                g_pIfTable->IFLists_CS
                                
IF-bucket       DRWLock     protects the interface entry.
                            actually one lock for each interface hash bucket.
                            A write lock is required when an interface is 
                            created, deleted, activated or its config is changed.
                                g_pIfTable->[IFbucket].DRWLock
                                
Group-bucket    DCSLock     protects the group entry.
                            actually one lock for each group hash bucket.
                            Need this lock whenever accessing a group through
                            group hash table, or when adding/removing a GIentry
                            from a group list.
                                g_pGroupTable->[groupBucket].DCSLock

IF-groups-list  DCSLock     protects the list of gi_entries hanging from that IF.
                            actually one lock for each interface hash bucket.
                            can access/change a GI entry without this lock. 
                            however, this lock is required when a gi entry is 
                            created or delete.
                                g_pIfTable->[IFbucket].DCSLock
                                
Group-list      CSLock      protects the list of ordered groups.

Global lock     CSLock      protects
                                g_CS
Note: a problem arises when enumerating the groups-if list. I first take the
group-list lock, find the next group entry, release the group-list lock,
and then lock the group-bucket and access its fields.




//------------------------------------------------------------------------------
// Configuration
//------------------------------------------------------------------------------

1. Proxy cannot be configured on a RasServer interface, ie interface of type
   LOCAL_WORKSTATION_DIAL.
   
2. When IgmpRouter is configured on a RasServer interface(LOCAL_WORKSTATION_DIAL)
   no igmp Group Specific packets are sent in response to leave packets. This
   is based on the fact that there is only one ras-client on the other end.
   
3. When igmp router is configured on an interface, it sends StartupQueryCount
   General queries on that inteface spaced at StartupQueryInterval. The next
   General query timer is set to random value in [0,GenQueryInterval]. This is 
   so that when 'N' interfaces are configured with igmp router at startup, 
   all of them do not send General Queries at the same time (my own feeble 
   attempt to avoid synchronization of General Queries on different interfaces 
   of a router).



#endif // if (0)