IPv6 was introduced in 1994 and has been in development at the IETF for over 10 years. It has now reached the deployment stage. KAME, the de-facto open-source reference implementation of the IPv6 standards, played a significant role in the acceptance and the adoption of the IPv6 technology. The adoption of KAME by key companies in a wide spectrum of commercial products is a testimonial to the success of the KAME project, which concluded not long ago.

This book is the first and the only one of its kind, which reveals all of the details of the KAME IPv6 protocol stack, explaining exactly what every line of code does and why it was designed that way. Through the dissection of both the code and its design, the authors illustrate how IPv6 and its related protocols have been interpreted and implemented from the specifications. This reference will demystify those ambiguous areas in the standards, which are open to interpretation and problematic in deployment, and presents solutions offered by KAME in dealing with these implementation challenges.

Key Features

  • Covering a snapshot version of KAME dated April 2003 based on FreeBSD 4.8
  • Extensive line-by-line code listings with meticulous explanation of their rationale and use for the KAME snapshot implementation, which is generally applicable to most recent versions of the KAME IPv6 stack including those in recent releases of BSD variants
  • Numerous diagrams and illustrations help in visualizing the implementation
  • In-depth discussion of the standards provides intrinsic understanding of the specifications


Software developors; network designers

Table of Contents

Foreword Preface 1 Introduction 1.1 Introduction 1.2 A Brief History of IPv6 and KAME 1.2.1 Commercial Success of KAME 1.3 Overview of the KAME Distribution 1.3.1 Source Tree Structure 1.3.2 Build Procedure 1.4 Overview of BSD Network Implementation 1.5 Source Code Narrations 1.5.1 Typographical Conventions 1.5.2 Sample Source Code Description 1.5.3 Preprocessor Variables 1.5.4 Networking Device and Architecture Assumptions 1.6 Mbufs and IPv6 1.6.1 Common Mbuf Manipulation Macros and Functions 1.6.2 Mbuf Tagging 1.6.3 Mbuf Requirement for IPv6 1.6.4 Diagnosing Mbuf Chain 2 IPv6 Addressing Architecture 2.1 Introduction 2.2 IPv6 Addresses 2.3 Textual Representation of IPv6 Addresses 2.4 Address Scopes 2.4.1 Scope Zones 2.4.2 Zone Indices 2.4.3 Textual Representation of Scoped Addresses 2.4.4 Deprecation of Unicast Site-local Addresses 2.5 IPv6 Address Format 2.5.1 Interface Identifier Generation 2.5.2 Notes about Address Format 2.5.3 Multicast Address Format 2.6 Node Address Requirements 2.7 IPv6 Address Space Management 2.8 Code Introduction 2.8.1 IPv6 Address Structures—in6_addr{} and sockaddr_in6{} 2.8.2 Macros and Variables 2.9 Handling Scope Zones 2.9.1 Initialization of Scope Zones 2.9.2 Scope Zone IDs 2.9.3 Zone IDs in Address Structures 2.9.4 Scope-Related Utility Functions 2.10 Interface A


No. of pages:
© 2006
Morgan Kaufmann
Print ISBN:
Electronic ISBN:


"IPv6 Core Protocols Implementation addresses with technical depth and clarity an IPv6 implementation on University California Berkeley Source Code Distribution (BSD), from the KAME project that was based in Japan, which is both a commercial and academic success in the world wide networking implementation market. The book begins with an overview of the KAME project and source code distribution, and then provides a concise, but thorough overview of the BSD network implementation. Then the book provides the architecture and an implementation code base component for IPv6 added to the current BSD TCP/IP Internet Protocol layer code base, the implications of the changes to the Transport Layer, and then provides a review of the BSD Socket Application Interface changes for IPv6. The authors did a very good job of representing the source code implementation and it was easy to read and comprehend, with discussion for each programmatic presentation of the code base functions and data structures. This book will be valuable to both networking architects and programmers that have to absorb and understand the implementation of IPv6 within the TCP/IP network implementation and reference model. The book was a pleasure to read and reminded me of the TCP/IP technical books by the late Dr. Richard Stevens, and afforded me the same technical depth." -Jim Bound, CTO IPv6 Forum