Plays a role in electron transport. Utilizes the bis-histidyl hexacoordinated complex with iron to transfer electrons to cytochrome c and molecular oxygen. Plays a regulatory role in the periodicity of the defecation cycle under oxidative stress conditions. Not involved in imparting protection against general conditions of oxidative stress. May participate in redox reactions under anaerobic conditions. Homodimer. Occurs in an equilibrium of monomeric and dimeric forms in solution. Transported to the nucleus by myristoylation of the N-terminal glycine. Detected in the head mesodermal cell. In the tail region, detected in the stomatointestinal and anal depressor muscle cells. Expressed at all developmental stages, but expression relative to adult is decreased in the L3 and dauer stages. Up-regulated by anoxia but not affected by hypoxia. Binds carbon monoxide (CO). Belongs to the globin family.