Raw socket

From Wikipedia, the free encyclopedia
Jump to: navigation, search

In computer networking, a raw socket is an internet socket that allows direct sending and receiving of Internet Protocol packets without any protocol-specific transport layer formatting.

Raw sockets vs standard sockets[edit]

In standard sockets, the payload to be transmitted is encapsulated according to the chosen transport layer protocol (e.g. TCP, UDP). In contrast, raw sockets usually receive raw packets including the header. When transmitting packets, the automatic addition of a header may be a configurable option of the socket.

Uses[edit]

Raw sockets are used in security related applications like nmap, packet-sniffer. One possible use case for raw sockets is the implementation of new transport-layer protocols in user space.[1]

Raw sockets are typically available in network equipment, and used for routing protocols such as the Internet Group Management Protocol (IGMP) and Open Shortest Path First (OSPF), and in the Internet Control Message Protocol (ICMP, best known for the ping suboperation).[2]

Support by socket APIs[edit]

Most socket application programming interfaces (APIs), especially those based on Berkeley sockets, support raw sockets.

Windows XP[edit]

When Microsoft released Windows XP in 2001 with raw socket support implemented in the Winsock interface, the media criticized Microsoft[3] asserting that raw sockets are only of use to hackers to perform TCP reset attacks. Three years after the Windows XP release, Microsoft silently limited Winsock's raw socket support in a non-removable hotfix and offered no further support or workarounds for applications that used them.[4]

See also[edit]

References[edit]

External links[edit]