
Coding ping from scratch in C teaches building a raw IP socket, crafting ICMP echo packets, and testing connectivity on Linux and Windows.
Implement icmp echo handling in c by folding 16-bit chunks, calculating the carry, and building a hello payload; test by allocating, printing, and verifying the packet.
Learn how to compute the internet checksum for an ICMP packet using a 16-bit one's complement sum, handling overflow, and verifying with the final FFFF result.
Explore how Ethernet frames use MAC addresses for local delivery, including broadcast and unicast frames, and how switches build a MAC address table to forward traffic efficiently.
Explore how ICMP and IP packets work in ping from scratch, covering IPv4, TTL, echo requests and replies, and the role of checksums and endian handling.
Follow along as we build and verify an IP packet from an ICMP payload, implement eval IP, handle endian and checksum, and prepare for raw sockets in a later step.
Learn to build a raw ip/icmp packet sender in c by crafting an ip packet with an icmp payload, computing length, and sending via sendto, testing with tcpdump.
Learn to build a ping utility from scratch using raw sockets and ICMP, implementing sending and receiving IP packets, debugging with tcpdump, and fixing the checksum logic.
Explore building a ping utility in C from scratch, including crafting ICMP echo requests, validating checksums, handling IP/ICMP headers, and debugging pointer and memory issues.
We built ping from scratch in C, using Linux socket options to set receive and send timeouts, and tested with responsive and non-responsive targets.
Coding PING from scratch in C
Ping is a tool which sends a data packet to a device on the local network or on the internet. When the remote node receives this packet, it responds in kind. As soon as the first device receives this response, it knows that the connection works.
This is a very useful troubleshooting tool that ships with every major operating system, but today we are going to code our own. And we will do it using raw sockets, capturing every packet on the network and filtering out all but ping. Basically we will communicate directly with the network card of the computer, and design the IP packet by hand.
-Why learn C from dr Jonas Birch and not from the other ten Udemy instructors?
Experience in the C language. When dr Birch was 18 years old and had been coding C for five years, he was traveling all over Europe, invited to different coding and security conferences, giving lectures about C and security. Since then he has coded C almost every day - for an additional 20 years!
Experience in teaching. Dr Birch has been teaching the C language (live) almost full time the last six years, helping hundreds and hundreds of students learn the mother of all languages - in Linux.
Very soothening voice and amazing sound quality. Dr Birch has a very dark, relaxing voice which is very easy to listen to (a really underestimated feature). He is recording in a professional recording studio with enterprise level microphone and equipment, which makes for a very good listening experience.
Enroll Now or try out the free sample lectures.