does anyone know where the ports table insert is done in the code?

I am making some modifications to the code and I need to know in which part of the code the insertion of the ports table is made