AnimationInterface anim("DDoSim.xml");
ns3::AnimationInterface::SetConstantPosition(nodes.Get(0), 0, 0);
ns3::AnimationInterface::SetConstantPosition(nodes.Get(1), 10, 10);
ns3::AnimationInterface::SetConstantPosition(nodes.Get(2), 23, 10);
anim.UpdateNodeColor(nodes.Get(0), 0, 0, 255);
uint32_t x_pos = 0;
for (int l = 0; l < NUMBER_OF_BOTS; ++l)
{
ns3::AnimationInterface::SetConstantPosition(botNodes.Get(l), x_pos++, 30);
}
By default all the packets in the simulation are shown in blue color. I want the packet originating from node 0 in the simulation to be shown with different color than originating from botnodes, show that it can be easily seen which packets are from node0 and which are from botNodes.
Is there any way I can achieve this?

There is no way you can do so. You can only change the color of nodes, but not packets.