Cheng-huang, sometimes spelled Ch'eng-huang, are protective deities in Chinese mythology. There is one Cheng-huang for each village, and it is his job to ward off trouble, provide rain in case of drought, and help the citizens prosper. They also escort the souls of departed villagers to heaven; with the help of a Cheng-huang, a priest may be able to deliver a soul out from hell.
Along with the Tu-di, the Cheng-huang are Yu-huang's primary agents for taking care of everyday events on earth.
The tradition of the Cheng-huang dates back to pre-Taoist times, but it has been adopted by Taoism.
I have also found reference to Cheng-huang as the god of walls and ditches.