Could be either of the above depending on if it is a plumbing vent, or an attic vent. Attic vent is much wider diameter than a plumbing vent.
I just replaced two attic vents (second link above). They were not missing or broken, but were beginning to get chalky and brittle. You can just screw the cap off the new on and screw it on the old base and not have to worry about trying to get the old base and caulking off.
If you are missing a plumbing vent and the base is still intact, the easiest thing is to replace it with a spring loaded cap
like this one. I lost one to a tree limb and it broke part of the base. I installed one of these as a temporary measure until I could replace the base. That was several years ago and it is still there. :)