  In [1], K\"otter and Kschischang presented a new model for error correcting
codes in network coding. The alphabet in this model is the subspace lattice of
a given vector space, a code is a subset of this lattice and the used metric on
this alphabet is the map d: (U, V) \longmapsto dim(U + V) - dim(U \bigcap V).
In this paper we generalize this model to arbitrary modular lattices, i.e. we
consider codes, which are subsets of modular lattices. The used metric in this
general case is the map d: (x, y) \longmapsto h(x \bigvee y) - h(x \bigwedge
y), where h is the height function of the lattice. We apply this model to
submodule lattices. Moreover, we show a method to compute the size of spheres
in certain modular lattices and present a sphere packing bound, a sphere
covering bound, and a singleton bound for codes, which are subsets of modular
lattices.
  [1] R. K\"otter, F.R. Kschischang: Coding for errors and erasures in random
network coding, IEEE Trans. Inf. Theory, Vol. 54, No. 8, 2008
