A mucus-secreting membrane lining body cavities and canals connecting with the external air as the alimentary canal and respiratory tract.