packet building in libnet
I am using libnet to create packets in a network. Traffic I want is tcp/ip/ethernet. Is it necessary that the payload be atttached to the packet using libnet_build_tcp() function itself? What happens if payload is left NULL in tcp build phase and attach it in build_ip() or build_ethernet() phase? I tried it, no error happens at any stage. But there is no traffic in the network. Is it possible at all in theory, to use the payload field in any of the build functions? The build packets are almost similar, except for 3 bytes, which I have not checked what they are. At least the MAC address of src and destination are there in the beginning of the packet.