At what stage in the packet forwarding process is the IP packet header examined?

A.
When the router first receives a frame from a LAN.
B.
After the forwarding table is checked.
C.
After the IP datagram is extracted from the L2 frame.
D.
Immediately before the IP packet is encapsulated for transmission.