+/**
+ * canqueue_ends_filt_conjuction - computes conjunction of incoming edges filters filters
+ * @qends: pointer to ends structure
+ * @qends: pointer the filter structure filled by computed filters conjunction
+ *
+ * Return Value: Number of incoming edges
+ */
+int canqueue_ends_filt_conjuction(struct canque_ends_t *qends, struct canfilt_t *filt)
+{
+ struct canque_edge_t *edge;
+ int cnt=0;
+ unsigned long filtid=0;
+ unsigned long filtmask=~0;
+ unsigned long local_only=canque_filtid2internal(0,MSG_LOCAL);
+
+ canque_for_each_inedge(qends, edge){
+ /* skip edges processing only local messages */
+ if(edge->filtid & edge->filtmask & local_only)
+ continue;
+
+ if(!cnt++)
+ filtid = edge->filtid;
+ else
+ filtmask &= ~(filtid ^ edge->filtid);
+
+ filtmask &= edge->filtmask;
+ }
+
+ filt->id = filtid & MSG_ID_MASK;
+ filt->mask = filtmask & MSG_ID_MASK;
+ filtid >>= 28;
+ filtmask >>= 28;
+ filt->flags = filtid & MSG_EXT;
+ if(filtmask & (MSG_EXT))
+ filt->flags |= MSG_EXT_MASK;
+ if(filtid & (MSG_RTR<<1))
+ filt->flags |= MSG_RTR<<1;
+ if(filtmask & (MSG_RTR<<1))
+ filt->flags |= MSG_RTR_MASK;
+ return cnt;
+}