O'Reilly logo

The Sockets Networking API: UNIX® Network Programming Volume 1, Third Edition by Andrew M. Rudoff, Bill Fenner, W. Richard Stevens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 28. Raw Sockets

Introduction

Raw sockets provide three features not provided by normal TCP and UDP sockets:

  • Raw sockets let us read and write ICMPv4, IGMPv4, and ICMPv6 packets. The ping program, for example, sends ICMP echo requests and receives ICMP echo replies. (We will develop our own version of the ping program in Section 28.5.) The multicast routing daemon, mrouted, sends and receives IGMPv4 packets.

    This capability also allows applications that are built using ICMP or IGMP to be handled entirely as user processes, instead of putting more code into the kernel. The router discovery daemon (in. rdisc under Solaris 2.x; Appendix F of TCPv1 describes how to obtain the source code for a publicly available version), for example, is built ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required