IPv6 Core Protocols
Implementation
The Morgan Kaufmann Series in Networking
Series Editor: David Clark, M.I.T.
IPv6 Core Protocols Implementation
Qing Li, Tatuya Jinmei, and Keiichi Shima
Smart Phone and Next-Generation Mobile Computing
Pei Zheng and Lionel Ni
GMPLS: Architecture and Applications
Adrian Farrel and Igor Bryskin
Network Security: A Practical Approach
Jan L. Harrington
Content Networking: Architecture, Protocols, and
Practice
Markus Hofmann and Leland R. Beaumont
Network Algorithmics: An Interdisciplinary Approach to
Designing Fast Networked Devices
George Varghese
Network Recovery: Protection and Restoration of
Optical, SONET-SDH, IP, and MPLS
Jean Philippe Vasseur, Mario Pickavet, and Piet
Demeester
Routing, Flow, and Capacity Design in Communication
and Computer Networks
Michał Pi´oro and Deepankar Medhi
Wireless Sensor Networks: An Information Processing
Approach
Feng Zhao and Leonidas Guibas
Communication Networking: An Analytical Approach
Anurag Kumar, D. Manjunath, and Joy Kuri
The Internet and Its Protocols: A Comparative
Approach
Adrian Farrel
Modern Cable Television Technology: Video, Voice, and
Data Communications, 2e
Walter Ciciora, James Farmer, David Large, and Michael
Adams
Bluetooth Application Programming with the Java APIs
C Bala Kumar, Paul J. Kline, and Timothy
J. Thompson
Policy-Based Network Management: Solutions for the
Next Generation
John Strassner
Computer Networks: A Systems Approach, 3e
Larry L. Peterson and Bruce S. Davie
Network Architecture, Analysis, and Design, 2e
James D. McCabe
MPLS Network Management: MIBs, Tools, and
Techniques
Thomas D. Nadeau
Developing IP-Based Services: Solutions for Service
Providers and Vendors
Monique Morrow and Kateel Vijayananda
Telecommunications Law in the Internet Age
Sharon K. Black
Optical Networks: A Practical Perspective, 2e
Rajiv Ramaswami and Kumar N. Sivarajan
Internet QoS: Architectures and Mechanisms
Zheng Wang
TCP/IP Sockets in Java: Practical Guide for
Programmers
Michael J. Donahoo and Kenneth L. Calvert
TCP/IP Sockets in C: Practical Guide for Programmers
Kenneth L. Calvert and Michael J. Donahoo
Multicast Communication: Protocols, Programming,
and Applications
Ralph Wittmann and Martina Zitterbart
MPLS: Technology and Applications
Bruce Davie and Yakov Rekhter
High-Performance Communication Networks, 2e
Jean Walrand and Pravin Varaiya
Internetworking Multimedia
Jon Crowcroft, Mark Handley, and Ian Wakeman
Understanding Networked Applications: A First Course
David G. Messerschmitt
Integrated Management of Networked Systems:
Concepts, Architectures, and their Operational
Application
Heinz-Gerd Hegering, Sebastian Abeck, and Bernhard
Neumair
Virtual Private Networks: Making the Right Connection
Dennis Fowler
Networked Applications: A Guide to the New Computing
Infrastructure
David G. Messerschmitt
Wide Area Network Design: Concepts and Tools for
Optimization
Robert S. Cahn
For further information on these books and for a list
of forthcoming titles, please visit our Web site at
http://www.mkp.com.
IPv6 Core Protocols
Implementation
Qing Li
Blue Coat Systems, Inc.
Tatuya Jinmei
Toshiba Corporation
Keiichi Shima
Internet Initiative Japan, Inc.
AMSTERDAM • BOSTON • HEIDELBERG • LONDON
SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO
NEW YORK • OXFORD • PARIS • SAN DIEGO
Morgan Kaufmann Publishers is an imprint of Elsevier
Side-by-Side Design
Acquisitions Editor Rick Adams
Publishing Services Manager George Morrison
Production Editor Dawnmarie Simpson
Associate Acquisitions Editor Rachel Roumeliotis
Cover Design Eric DeCicco
Cover Image
Cover Illustration Side-by-Side Design
Composition diacriTech
Technical Illustration diacriTech
Copyeditor
Proofreader
Indexer
Interior printer The Maple-Vail Book Manufacturing Group
Cover printer Phoenix Color Corporation
JC Publishing
Janet Cocker
Joan Green
Morgan Kaufmann Publishers is an imprint of Elsevier.
500 Sansome Street, Suite 400, San Francisco, CA 94111
This book is printed on acid-free paper.
c 2007 by Elsevier Inc. All rights reserved.
Designations used by companies to distinguish their products are often claimed as trademarks or registered trademarks.
In all instances in which Morgan Kaufmann Publishers is aware of a claim, the product names appear in initial capital or
all capital letters. Readers, however, should contact the appropriate companies for more complete information regarding
trademarks and registration.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means—
electronic, mechanical, photocopying, scanning, or otherwise—without prior written permission of the publisher.
Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone:
(+44) 1865 843830, fax: (+44) 1865 853333, E-mail: permissions@elsevier.com. You may also complete your request
online via the Elsevier homepage (http://elsevier.com), by selecting
“Support & Contact” then “Copyright and Permission” and then “Obtaining Permissions.”
Library of Congress Cataloging-in-Publication Data
Li, Qing, 1971-
IPv6 core protocols implementation/Qing Li, Tatuya Jinmei, Keiichi Shima
p. cm.
Includes bibliographical references and index.
ISBN-13: 978-0-12-447751-3 (hardcover : alk. paper)
ISBN-10: 0-12-447751-8 (hardcover : alk. paper) 1. TCP/IP (Computer network protocol) I.
Jinmei, Tatuya, 1971- II. Shima, Keiichi, 1970- III. Title.
TK5105.585.L536 2007
004.6
2–dc22
2006012796
ISBN 13: 978-0-12-447751-3
ISBN 10: 0-12-447751-8
For information on all Morgan Kaufmann publications,
visit our Web site at www.mkp.com or www.books.elsevier.com
Printed in the United States of America
06 07 08 09
5 4 3 2 1
To Huaying, Jane and Adalia
in Him
—Qing Li
To all those who have been involved in and supported the KAME project: sponsors, supervisors,
developers, contributors, and users.
—Tatuya Jinmei
To all KAME developers, all people who developed the Internet, and all people who will develop
the future Internet.
—Keiichi Shima
This Page Intentionally Left Blank
Contents
Foreword xix
Preface xxi
About the Authors xxix
1
Introduction 1
1.1
1.2
1.3
1.4
1.5
Commercial Success of KAME 6
Source Tree Structure
Build Procedure
Introduction 1
A Brief History of IPv6 and KAME 1
1.2.1
Overview of the KAME Distribution 6
1.3.1
1.3.2
Overview of BSD Network Implementation 11
Source Code Narrations
1.5.1
1.5.2
1.5.3
1.5.4
14
Typographical Conventions
Sample Source Code Description 15
Preprocessor Variables
Networking Device and Architecture Assumptions 17
16
14
7
7
1.6 Mbufs and IPv6
17
Common Mbuf Manipulation Macros and Functions
1.6.1
1.6.2 Mbuf Tagging 20
1.6.3 Mbuf Requirement for IPv6
1.6.4
Diagnosing Mbuf Chain 26
24
20
vii