OSPF is a classless interior gateway protocol (IGP) which supports VLSM, hence includes the subnet masks in the routing updates. OSPF routers exchange the state of their links (interfaces) by sending incremental updates, not the entire routing table.