Iran has reportedly agreed to bar military vessels from the Strait of Hormuz under a deal being brokered by Oman.