Chapter 3. IPv6, Unix Domain Sockets, and Network Interfaces

In this chapter, we will cover the following topics:

  • Forwarding a local port to a remote host
  • Pinging hosts on the network with ICMP
  • Waiting for a remote network service
  • Enumerating interfaces on your machine
  • Finding the IP address for a specific interface on your machine
  • Finding whether an interface is up on your machine
  • Detecting inactive machines on your network
  • Performing a basic IPC using connected sockets (socketpair)
  • Performing IPC using Unix domain sockets
  • Finding out if your Python supports IPv6 sockets
  • Extracting an IPv6 prefix from an IPv6 address
  • Writing an IPv6 echo client/server

Introduction

This chapter extends the use of Python's socket library with a few third-party libraries. It also discusses some advanced techniques, for example, the asynchronous ayncore module from the Python standard library. This chapter also touches upon various protocols, ranging from an ICMP ping to an IPv6 client/server.

In this chapter, a few useful Python third-party modules have been introduced by some example recipes. For example, the network packet capture library, Scapy, is well known among Python network programmers.

A few recipes have been dedicated to explore the IPv6 utilities in Python including an IPv6 client/server. Some other recipes cover Unix domain sockets.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.209.180