the function of Add tunnel phase routine

Could you please give me some explanations about the function of Add tunnel phase routine? I cannot find  more detailed information about it.