Lines Matching refs:mcast

55 static void pico_mcast_src_filtering_cleanup(struct mcast_filter_parameters*mcast )
59 pico_tree_foreach_safe(index, mcast->allow, _tmp)
61 pico_tree_delete(mcast->allow, index->keyValue);
63 pico_tree_foreach_safe(index, mcast->block, _tmp)
65 pico_tree_delete(mcast->block, index->keyValue);
68 static int pico_mcast_src_filtering_inc_inc(struct mcast_filter_parameters*mcast )
73 if (mcast->p->event == MCAST_EVENT_DELETE_GROUP) {
75 mcast->record_type = MCAST_CHANGE_TO_INCLUDE_MODE;
76 mcast->filter = mcast->allow;
77 if (mcast->p->MCASTFilter) {
78 pico_tree_foreach(index, mcast->p->MCASTFilter) /* B */
80 if (pico_tree_insert(mcast->allow, index->keyValue) == &LEAF) {
84 mcast->sources++;
93 if (mcast->p->event == MCAST_EVENT_CREATE_GROUP) /* first ADD_SOURCE_MEMBERSHIP */
94 mcast->record_type = MCAST_CHANGE_TO_INCLUDE_MODE;
96 mcast->record_type = MCAST_ALLOW_NEW_SOURCES;
98 mcast->filter = mcast->allow;
99 pico_tree_foreach(index, mcast->p->MCASTFilter) /* B */
101 if (pico_tree_insert(mcast->allow, index->keyValue) == &LEAF) {
105 mcast->sources++;
107 pico_tree_foreach(index, &mcast->g->MCASTSources) /* A */
109 source = pico_tree_findKey(mcast->allow, index->keyValue);
111 pico_tree_delete(mcast->allow, source);
112 mcast->sources--;
115 if (!pico_tree_empty(mcast->allow)) /* record type is ALLOW */
119 mcast->record_type = MCAST_BLOCK_OLD_SOURCES;
120 mcast->filter = mcast->block;
121 pico_tree_foreach(index, &mcast->g->MCASTSources) /* A */
123 if (pico_tree_insert(mcast->block, index->keyValue) == &LEAF) {
127 mcast->sources++;
129 pico_tree_foreach(index, mcast->p->MCASTFilter) /* B */
131 source = pico_tree_findKey(mcast->block, index->keyValue);
133 pico_tree_delete(mcast->block, source);
134 mcast->sources--;
137 if (!pico_tree_empty(mcast->block)) /* record type is BLOCK */
141 (mcast->p)->f = NULL;
145 static int pico_mcast_src_filtering_inc_excl(struct mcast_filter_parameters*mcast )
148 mcast->record_type = MCAST_CHANGE_TO_EXCLUDE_MODE;
149 mcast->filter = mcast->block;
150 pico_tree_foreach(index, mcast->p->MCASTFilter) /* B */
152 if (pico_tree_insert(mcast->block, index->keyValue) == &LEAF) {
156 mcast->sources++;
160 static int pico_mcast_src_filtering_excl_inc(struct mcast_filter_parameters*mcast )
163 mcast->record_type = MCAST_CHANGE_TO_INCLUDE_MODE;
164 mcast->filter = mcast->allow;
165 if (mcast->p->MCASTFilter) {
166 pico_tree_foreach(index, mcast->p->MCASTFilter) /* B */
168 if (pico_tree_insert(mcast->allow, index->keyValue) == &LEAF) {
172 mcast->sources++;
178 static int pico_mcast_src_filtering_excl_excl(struct mcast_filter_parameters*mcast )
182 mcast->record_type = MCAST_BLOCK_OLD_SOURCES;
183 mcast->filter = mcast->block;
184 pico_tree_foreach(index, mcast->p->MCASTFilter)
186 if (pico_tree_insert(mcast->block, index->keyValue) == &LEAF) {
191 mcast->sources++;
193 pico_tree_foreach(index, &mcast->g->MCASTSources) /* A */
195 source = pico_tree_findKey(mcast->block, index->keyValue); /* B */
197 pico_tree_delete(mcast->block, source);
198 mcast->sources--;
201 if (!pico_tree_empty(mcast->block)) /* record type is BLOCK */
205 mcast->record_type = MCAST_ALLOW_NEW_SOURCES;
206 mcast->filter = mcast->allow;
207 pico_tree_foreach(index, &mcast->g->MCASTSources)
209 if (pico_tree_insert(mcast->allow, index->keyValue) == &LEAF) {
213 mcast->sources++;
215 pico_tree_foreach(index, mcast->p->MCASTFilter) /* B */
217 source = pico_tree_findKey(mcast->allow, index->keyValue); /* A */
219 pico_tree_delete(mcast->allow, source);
220 mcast->sources--;
223 if (!pico_tree_empty(mcast->allow)) /* record type is ALLOW */
227 mcast->p->f = NULL;