OSPF has five packet types. Like EIGRP, OSPF does not use TCP or UDP, but instead uses its own IP Protocol – number 89. All OSPF packets have a common 24 byte header. OSPF v2 (IPv4) is described in RFC 2328 and OSPF v3 (IPv6) is described in RFC 5340
Section A.3.1 of RFC 2328 describes the OSPF header (the header for version 3 excludes the authentication):

Each field is described below:
Version number: Version 2 (for IPv4) or version 3 (for IPv6)
Type: Five types are defined :
- Type 1 – Hello
- Type 2 – Database Description
- Type 3 – Link State Request
- Type 4 – Link State Update
- Type 5 – Link State Acknowledgement
Packet Length: This is the length of the packet including the payload
Router ID: This is the Router ID of the packet originating the packet
Area ID: This is a 32 bit number representing the area number. e.g. area zero being 0.0.0.0. Note that Cisco IOS accepts this as either a decimal number, or in the format of an IP Address.
R2(config-if)#ip ospf 1 area ? <0-4294967295> OSPF area ID as a decimal value A.B.C.D OSPF area ID in IP address format
Checksum: This is a checksum using one’s compliment to ensure packet integrity.
AuType: This is the Authentication Type. Currently there are three types:
- Type 0 – Null Authentication
- Type 1 – Simple Password
- Type 2 – Cryptographic authentication
Authentication: These are 64bit fields used by the authentication scheme, as defined by the AuType.
The following is a Wireshark capture showing the header detail:
