I am writing a packet generator, to test our local firewall.
Idea is to generate xxx number(say 1000) of DHCP (all kinds, including request, reply packets) packets.
For this I created a struct to hold the DHCP packet format data.
My question is:
Can I simply do sendto(socketid, &struct, sizeof(struct))
i.e. can I just push the stucture thru the socket (socketid).
Will this amount to DHCP packets being generated and sent?