Chapter 3. Using Libnet

In this chapter, we will cover:

  • Installing libnet
  • Adding libnet to your project
  • Resolving names to addresses with libnet
  • Retrieving local addresses with libnet
  • Constructing a Ping packet with libnet
  • Constructing a UDP packet with libnet
  • Constructing a TCP packet with libnet

Introduction

Libnet is a library that allows developers to construct and inject individual network packets. The libnet API hides most of the packet creation low-level details from the developer and allows the developer to quickly create and inject simple packets. Not only can libnet be used to create very powerful network security and monitoring tools, but it can also be used for malicious activities.

Note

While it is possible to compile libnet for the iPhone, ...

Get iOS and OS X Network Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.