pass argument DeviceID to func craftPacket to identify virtual device

To pass argument DeviceID to func craftPacket to identify virtual devicee the packet is intended for.
Change all the related API func as well.