# Raw sockets in Go: Link layer

DevFeed: [Raw sockets in Go: Link layer](<https://devfeed.tech/articles/raw-sockets-in-go-link-layer-35450.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/raw-sockets-in-go-link-layer/>)

Author: Graham King

Published: 2015-01-31T20:55:57Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Network](<https://devfeed.tech/topics/network.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>), [POSIX](<https://devfeed.tech/topics/posix.md>), [Unix](<https://devfeed.tech/topics/unix.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Protocol (disambiguation)](<https://devfeed.tech/topics/protocol.md>), [Internet](<https://devfeed.tech/topics/internet.md>), [HTTP](<https://devfeed.tech/topics/http.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [go](<https://devfeed.tech/tags/go.md>), [headers](<https://devfeed.tech/tags/headers.md>), [http](<https://devfeed.tech/tags/http.md>), [ip](<https://devfeed.tech/tags/ip.md>), [ipv4](<https://devfeed.tech/tags/ipv4.md>), [ipv6](<https://devfeed.tech/tags/ipv6.md>), [linux](<https://devfeed.tech/tags/linux.md>), [network](<https://devfeed.tech/tags/network.md>), [network-programming](<https://devfeed.tech/tags/network-programming.md>), [posix](<https://devfeed.tech/tags/posix.md>), [programming](<https://devfeed.tech/tags/programming.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [raw](<https://devfeed.tech/tags/raw.md>), [socket](<https://devfeed.tech/tags/socket.md>), [software](<https://devfeed.tech/tags/software.md>), [tcp](<https://devfeed.tech/tags/tcp.md>), [udp](<https://devfeed.tech/tags/udp.md>), [unix](<https://devfeed.tech/tags/unix.md>)

## AI overview

A technical tutorial on using raw sockets in Go at the link layer. It explains receiving IP packets, inspecting and crafting IP headers, selecting address families and protocols, sending ICMP echo requests, and observing kernel responses. It also discusses Linux behavior and portability limitations for raw sockets.

## Source excerpt

Diving deep into raw sockets and IP headers with Go: A technical exploration.