What is a tower or advanced work defending the entrance to a castle or city, as at a gate or bridge. It was often large and strong, having a ditch and drawbridge of its own called?

barbacan — ( Fort.) A tower or advanced work defending the entrance to a castle or city, as at a gate or bridge. It was often large and strong, having a ditch and drawbridge of its own. (Webster's 1913.)

Sources