Can we send a Broadcast Packet via RAW Socket ?? I am unable to send it as "sendto" is returning err-101(Network Unreachable). I already Enabled the Broadcast Socket Option and IPHDR_INCL Options. Any Suggestions ??
-Thnx,
KeWLGuY
Printable View
Can we send a Broadcast Packet via RAW Socket ?? I am unable to send it as "sendto" is returning err-101(Network Unreachable). I already Enabled the Broadcast Socket Option and IPHDR_INCL Options. Any Suggestions ??
-Thnx,
KeWLGuY
This might be a good link http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
Thanks S_M_A for the link. That's informational.I am following all the Rules mentioned in the link. Socket type was DGRAM & Machine is having Valid IP Address & I am filling the IPHEADER with that IP Address and also enabled BROADCAST Option & IPHDR_INCL Options. Destination address was also filled up as "BROADCAST" Address & trying to send the packet via "sendto". Still; no Luck for me .Please let me know ; if U want me to send the code ?
Finally able to send the Broadcast via RAW Socket. Actual issue is not with Code. It is with System not having Default Gateway. Another Query was; How can I send the VLAN Information to application via RAW Sockets ?? Kernel is removing the 4 bytes VLAN Information and sending the remaining Ether/IP/UDP information. VLAN ID is not going to application.
Looking for some suggestions.