Raw socket TCP/IP

dennis luehring dl.soluz at gmx.net
Wed Mar 7 23:25:54 PST 2012


Am 08.02.2012 19:35, schrieb Eyyub:
> BUMP,
>
> I really need help please !
>
>
> Eyyub.

what are you trying to archive?  did you got an 
Ethernet-Frame+IP-Frame+(your replacement for tcp or udp) - or are your 
trying to change the tcp frame before sending?



and if your using Windows:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms740548%28v=vs.85%29.aspx

----
here are two basic types of such raw sockets:

The first type uses a known protocol type written in the IP header that 
is recognized by a Winsock service provider. An example of the first 
type of socket is a socket for the ICMP protocol (IP protocol type = 1) 
or the ICMPv6 protocol (IP procotol type = 58).

The second type allows any protocol type to be specified. An example of 
the second type would be an experimental protocol that is not directly 
supported by the Winsock service provider such as the Stream Control 
Transmission Protocol (SCTP).

----
Limitations on Raw Sockets

On Windows 7, Windows Vista, Windows XP with Service Pack 2 (SP2), and 
Windows XP with Service Pack 3 (SP3), the ability to send traffic over 
raw sockets has been restricted in several ways:

-TCP data cannot be sent over raw sockets.

-UDP datagrams with an invalid source address cannot be sent over raw 
sockets. The IP source address for any outgoing UDP datagram must exist 
on a network interface or the datagram is dropped. This change was made 
to limit the ability of malicious code to create distributed 
denial-of-service attacks and limits the ability to send spoofed packets 
(TCP/IP packets with a forged source IP address).

These above restrictions do not apply to Windows Server 2008 R2, Windows 
Server 2008 , Windows Server 2003, or to versions of the operating 
system earlier than Windows XP with SP2.



More information about the Digitalmars-d-learn mailing list