Hi @UKHeliBob, thank you for your reply.
You can ignore the "user_interface.h" bit, it's left over code and not relevant.
I cannot find a function within WiFI.h that will do packet injection like the wifi_send_pkt_freedom(wifipkt, count, 0) command. However there must be something surely as ESP32 is the successor to the ESP8266.