It sets the rec_type to REC_TYPE_PACKET, and also sets the rec_header.packet_header.pkt_encap field to the link-layer encapsulation value provided. That way, wtap_reset_rec(), which doesn't know what the type of the record will be, isn't setting a union member that might not be the right one. We probably want to have it set rec->block appropriately, too. This routine could set other things in the future, as appropriate.