  We consider 4d string compactifications in the presence of fluxes, and
classify particles, strings and domain walls arising from wrapped branes which
have charges conserved modulo an integer p, and whose annihilation is catalized
by fluxes, through the Freed-Witten anomaly or its dual versions. The
Z_p-valued strings and particles are associated to Z_p discrete gauge
symmetries, which we show are realized as discrete subgroups of 4d U(1)
symmetries broken by their Chern-Simons couplings to the background fluxes. We
also describe examples where the discrete gauge symmetry group is actually
non-Abelian. The Z_p-valued domain walls separate vacua which have different
flux quanta, yet are actually equivalent by an integer shift of axion fields
(or further string duality symmetries). We argue that certain examples are
related by T-duality to the realization of discrete gauge symmetries and Z_p
charges from torsion (co)homology. At a formal level, the groups classifying
these discrete charges should correspond to a generalization of K-theory in the
presence of general fluxes (and including fundamental strings and NS5-branes).
