draft-ietf-shim6-multihome-shim-api-08.txt   draft-ietf-shim6-multihome-shim-api-09.txt 
SHIM6 Working Group M. Komu SHIM6 Working Group M. Komu
Internet-Draft HIIT Internet-Draft HIIT
Intended status: Informational M. Bagnulo Intended status: Informational M. Bagnulo
Expires: November 8, 2009 UC3M Expires: January 14, 2010 UC3M
K. Slavov K. Slavov
S. Sugimoto, Ed. S. Sugimoto, Ed.
Ericsson Ericsson
May 7, 2009 July 13, 2009
Socket Application Program Interface (API) for Multihoming Shim Socket Application Program Interface (API) for Multihoming Shim
draft-ietf-shim6-multihome-shim-api-08 draft-ietf-shim6-multihome-shim-api-09
Status of this Memo Status of this Memo
This Internet-Draft is submitted to IETF in full conformance with the This Internet-Draft is submitted to IETF in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet- other groups may also distribute working documents as Internet-
Drafts. Drafts.
skipping to change at page 1, line 36 skipping to change at page 1, line 36
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on November 8, 2009. This Internet-Draft will expire on January 14, 2010.
Copyright Notice Copyright Notice
Copyright (c) 2009 IETF Trust and the persons identified as the Copyright (c) 2009 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents in effect on the date of Provisions Relating to IETF Documents in effect on the date of
publication of this document (http://trustee.ietf.org/license-info). publication of this document (http://trustee.ietf.org/license-info).
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
skipping to change at page 2, line 23 skipping to change at page 2, line 23
equipped with a conceptual sub-layer (hereafter "shim") inside the IP equipped with a conceptual sub-layer (hereafter "shim") inside the IP
layer that maintains mappings between identifiers and locators. layer that maintains mappings between identifiers and locators.
Examples of the shim are SHIM6 and HIP. Examples of the shim are SHIM6 and HIP.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5
3. System Overview . . . . . . . . . . . . . . . . . . . . . . . 6 3. System Overview . . . . . . . . . . . . . . . . . . . . . . . 6
4. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 7 4. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 7
5. Socket Options for Multihoming Shim Layer . . . . . . . . . . 9 5. Socket Options for Multihoming Shim Sub-Layer . . . . . . . . 9
5.1. SHIM_ASSOCIATED . . . . . . . . . . . . . . . . . . . . . 12 5.1. SHIM_ASSOCIATED . . . . . . . . . . . . . . . . . . . . . 13
5.2. SHIM_DONTSHIM . . . . . . . . . . . . . . . . . . . . . . 13 5.2. SHIM_DONTSHIM . . . . . . . . . . . . . . . . . . . . . . 14
5.3. SHIM_HOT_STANDBY . . . . . . . . . . . . . . . . . . . . . 13 5.3. SHIM_HOT_STANDBY . . . . . . . . . . . . . . . . . . . . . 15
5.4. SHIM_PATHEXPLORE . . . . . . . . . . . . . . . . . . . . . 14 5.4. SHIM_PATHEXPLORE . . . . . . . . . . . . . . . . . . . . . 15
5.5. SHIM_LOC_LOCAL_PREF . . . . . . . . . . . . . . . . . . . 15 5.5. SHIM_LOC_LOCAL_PREF . . . . . . . . . . . . . . . . . . . 16
5.6. SHIM_LOC_PEER_PREF . . . . . . . . . . . . . . . . . . . . 16 5.6. SHIM_LOC_PEER_PREF . . . . . . . . . . . . . . . . . . . . 17
5.7. SHIM_LOC_LOCAL_RECV . . . . . . . . . . . . . . . . . . . 17 5.7. SHIM_LOC_LOCAL_RECV . . . . . . . . . . . . . . . . . . . 18
5.8. SHIM_LOC_PEER_RECV . . . . . . . . . . . . . . . . . . . . 18 5.8. SHIM_LOC_PEER_RECV . . . . . . . . . . . . . . . . . . . . 19
5.9. SHIM_LOC_LOCAL_SEND . . . . . . . . . . . . . . . . . . . 18 5.9. SHIM_LOC_LOCAL_SEND . . . . . . . . . . . . . . . . . . . 19
5.10. SHIM_LOC_PEER_SEND . . . . . . . . . . . . . . . . . . . . 19 5.10. SHIM_LOC_PEER_SEND . . . . . . . . . . . . . . . . . . . . 21
5.11. SHIM_LOCLIST_LOCAL . . . . . . . . . . . . . . . . . . . . 20 5.11. SHIM_LOCLIST_LOCAL . . . . . . . . . . . . . . . . . . . . 21
5.12. SHIM_LOCLIST_PEER . . . . . . . . . . . . . . . . . . . . 22 5.12. SHIM_LOCLIST_PEER . . . . . . . . . . . . . . . . . . . . 23
5.13. SHIM_APP_TIMEOUT . . . . . . . . . . . . . . . . . . . . . 22 5.13. SHIM_APP_TIMEOUT . . . . . . . . . . . . . . . . . . . . . 23
5.14. SHIM_DEFERRED_CONTEXT_SETUP . . . . . . . . . . . . . . . 23 5.14. SHIM_DEFERRED_CONTEXT_SETUP . . . . . . . . . . . . . . . 24
5.15. Error Handling . . . . . . . . . . . . . . . . . . . . . . 24 5.15. Error Handling . . . . . . . . . . . . . . . . . . . . . . 25
6. Ancillary Data for Multihoming Shim . . . . . . . . . . . . . 24 6. Ancillary Data for Multihoming Shim . . . . . . . . . . . . . 25
6.1. Get Locator Information from Incoming Packet . . . . . . . 26 6.1. Get Locator Information from Incoming Packet . . . . . . . 27
6.2. Specify Locator Information for Outgoing Packet . . . . . 26 6.2. Specify Locator Information for Outgoing Packet . . . . . 27
6.3. Notification from Application to Multihoming Shim . . . . 26 6.3. Notification from Application to Multihoming Shim . . . . 27
7. Data Structures . . . . . . . . . . . . . . . . . . . . . . . 27 7. Data Structures . . . . . . . . . . . . . . . . . . . . . . . 28
7.1. Placeholder for Locator Information . . . . . . . . . . . 27 7.1. Placeholder for Locator Information . . . . . . . . . . . 28
7.2. Path Exploration Parameter . . . . . . . . . . . . . . . . 28 7.1.1. Handling Locator behind NAT . . . . . . . . . . . . . 29
7.3. Feedback Information . . . . . . . . . . . . . . . . . . . 29 7.2. Path Exploration Parameter . . . . . . . . . . . . . . . . 30
8. Implications for Existing Socket API Extensions . . . . . . . 29 7.3. Feedback Information . . . . . . . . . . . . . . . . . . . 30
9. Resolving Conflicts with Preference Values . . . . . . . . . . 30 8. Implications for Existing Socket API Extensions . . . . . . . 31
9.1. Implicit Forking . . . . . . . . . . . . . . . . . . . . . 30 9. Resolving Conflicts with Preference Values . . . . . . . . . . 32
10. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 31 9.1. Implicit Forking . . . . . . . . . . . . . . . . . . . . . 32
10.1. Naming at Socket Layer . . . . . . . . . . . . . . . . . . 31 10. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 33
10.2. Additional Requirements from Applications . . . . . . . . 31 10.1. Naming at Socket Layer . . . . . . . . . . . . . . . . . . 33
10.2. Additional Requirements from Applications . . . . . . . . 33
10.3. Issues of Header Conversion among Different Address 10.3. Issues of Header Conversion among Different Address
Family . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Family . . . . . . . . . . . . . . . . . . . . . . . . . . 33
10.4. Handling of Unknown Locator Provided by Application . . . 32 10.4. Handling of Unknown Locator Provided by Application . . . 34
11. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 11. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
11.1. Changes from version 00 to version 01 . . . . . . . . . . 32 11.1. Changes from version 00 to version 01 . . . . . . . . . . 34
11.2. Changes from version 01 to version 02 . . . . . . . . . . 33 11.2. Changes from version 01 to version 02 . . . . . . . . . . 34
11.3. Changes from version 02 to version 03 . . . . . . . . . . 33 11.3. Changes from version 02 to version 03 . . . . . . . . . . 35
11.4. Changes from version 03 to version 04 . . . . . . . . . . 33 11.4. Changes from version 03 to version 04 . . . . . . . . . . 35
11.5. Changes from version 04 to version 05 . . . . . . . . . . 33 11.5. Changes from version 04 to version 05 . . . . . . . . . . 35
11.6. Changes from version 05 to version 06 . . . . . . . . . . 33 11.6. Changes from version 05 to version 06 . . . . . . . . . . 35
11.7. Changes from version 06 to version 07 . . . . . . . . . . 33 11.7. Changes from version 06 to version 07 . . . . . . . . . . 35
11.8. Changes from version 07 to version 08 . . . . . . . . . . 33 11.8. Changes from version 07 to version 08 . . . . . . . . . . 35
12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33 11.9. Changes from version 08 to version 09 . . . . . . . . . . 35
13. Security Considerations . . . . . . . . . . . . . . . . . . . 34 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35
14. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . 34 13. Security Considerations . . . . . . . . . . . . . . . . . . . 36
15. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 34 14. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . 36
16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 34 15. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 36
16.1. Normative References . . . . . . . . . . . . . . . . . . . 34 16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 37
16.2. Informative References . . . . . . . . . . . . . . . . . . 35 16.1. Normative References . . . . . . . . . . . . . . . . . . . 37
Appendix A. Context Forking . . . . . . . . . . . . . . . . . . . 35 16.2. Informative References . . . . . . . . . . . . . . . . . . 37
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 38 Appendix A. Context Forking . . . . . . . . . . . . . . . . . . . 38
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 40
1. Introduction 1. Introduction
HIP and SHIM6 have a commonality in their protocol design in the HIP and SHIM6 have a commonality in their protocol design in the
sense that the roles of an IP address as an identifier and a locator sense that the semantic roles of an IP address, i.e., an identifier
are clearly distinguished. Hereafter this design principle is called and a locator, are distinguished. Separation of identifier and
"identifier/locator separation" in this document. Both protocols aim locator is done by introducing a "shim" inside the IP layer which
to solve problems that are specific to multihoming environment in an maintains mapping of the identifier and associated locators. This
endhost centric approach. In these protocols, a sub-layer within the design principle is called "identifier/locator separation" and the
IP layer maintains mappings of identifiers and locators. shim is referred to as a "shim sub-layer" in this document.
The shim layer is useful in a sense that the IP layer can maintain The shim sub-layer provides a nice property to present a stable
the mapping of an identifier to the corresponding locators. Under a communication endpoints (i.e., identifiers) to the upper layer
multihomed environment, typically, a host has more than one IP protocols. An on-going session can be maintained even when the
address at a time. During the transaction, the host may be required locator associated with the identifier is changed, for instance, upon
to switch the IP address in use to another IP address to preserve the a re-homing event under a multihomed environment. Therefore, upper
communication. Such an address update should be kept hidden from the layer protocols, especially connection-oriented applications are no
upper layer protocols to avoid communication disruption. The shim more annoyed by the locator change thanks to the identifier/locator
layer aims to make the address update transparent to the upper layer separation mechanism.
protocols.
In a system which is based on identifier/locator separation, upper While the identifier/locator separation removes negative impact of
layer protocols are expected to deal with identifiers for locator change, it does not necessarily mean that applications are
establishing and handling the communications. If an application always ignorant about locators. We rather think that applications
wants to have multihoming support from the shim layer, the IP may want to have a control of locators in some cases. For instance,
addresses specified as source and destination addresses must be an application may want to use a specific locator to send IP packets.
identifiers. However, this does not necessarily mean that Such a control of locators is referred to as "locator management" in
applications are prohibited to choose specific locators for its this document. Besides, applications may want to turn on or off the
communication. It may be useful for some applications to specify a identifier/locator separation mechanism. This document defines API
preferred locator for a given flow. that provides locator management and additional control of shim sub-
layer for applications.
This document recommends that the switching of identifier and locator This document recommends that the switching of identifier and locator
is done only once inside the TCP/IP stack of an endhost. That is, if is done only once inside the TCP/IP stack of an endhost. That is, if
multiple shim sub-layers exist at the IP layer, any one of them multiple shim sub-layers exist at the IP layer, any one of them
should be applied exclusively for a given flow. should be applied exclusively for a given flow.
As this document specifies sockets API extensions, it is written so As this document specifies sockets API extensions, it is written so
that the syntax and semantics are in line with the Posix standard that the syntax and semantics are in line with the Posix standard
[POSIX] as much as possible. The API specified in this document [POSIX] as much as possible. The API specified in this document
defines how to use ancillary data (aka cmsg) to access the locator defines how to use ancillary data (aka cmsg) to access the locator
skipping to change at page 6, line 6 skipping to change at page 6, line 6
used to send packets within a given context. As defined in used to send packets within a given context. As defined in
[I-D.ietf-shim6-proto], the preferred locator of a host 'A' is [I-D.ietf-shim6-proto], the preferred locator of a host 'A' is
denoted as Lp(A). denoted as Lp(A).
o Shim - The conceptual sub-layer inside the IP layer which o Shim - The conceptual sub-layer inside the IP layer which
maintains mappings between EIDs and locators. An EID can be maintains mappings between EIDs and locators. An EID can be
associated with more than one locator at a time when the host is associated with more than one locator at a time when the host is
multihomed. The term 'shim' does not refer to a specific protocol multihomed. The term 'shim' does not refer to a specific protocol
but refers to the conceptual sub-layer inside the IP layer. but refers to the conceptual sub-layer inside the IP layer.
o Identifier/locator adaptation - The adaptation performed at the o Identifier/locator adaptation - The adaptation performed at the
shim layer which may end up re-writing the source and/or shim sub-layer which may end up re-writing the source and/or
destination addresses of an IP packet. In the outbound packet destination addresses of an IP packet. In the outbound packet
processing, the EID pair is converted to the associated locator processing, the EID pair is converted to the associated locator
pair. In the inbound packet processing, the locator pair is pair. In the inbound packet processing, the locator pair is
converted to the EID pair. converted to the EID pair.
o Context - The state information shared by a given pair of peers, o Context - The state information shared by a given pair of peers,
which stores a binding between the EID and associated locators. which stores a binding between the EID and associated locators.
Contexts are maintained by the shim layer. Contexts are maintained by the shim sub-layer.
o Reachability detection - The procedure to check reachability o Reachability detection - The procedure to check reachability
between a given locator pair. between a given locator pair.
o Path - The sequence of routers that an IP packet goes through to o Path - The sequence of routers that an IP packet goes through to
reach the destination. reach the destination.
o Path exploration - The procedure to explore available paths for a o Path exploration - The procedure to explore available paths for a
given set of locator pairs. given set of locator pairs.
o Outage - The incident that prevents IP packets to flow from the o Outage - The incident that prevents IP packets to flow from the
source locator to the destination locator. When there is an source locator to the destination locator. When there is an
outage, it means that there is no reachability between a given outage, it means that there is no reachability between a given
locator pair. The outage may be caused by various reasons, such locator pair. The outage may be caused by various reasons, such
skipping to change at page 6, line 39 skipping to change at page 6, line 39
pair as the source address and the second address from the pair as pair as the source address and the second address from the pair as
the destination address. If reachability is confirmed in both the destination address. If reachability is confirmed in both
directions, the address pair is considered to be working bi- directions, the address pair is considered to be working bi-
directionally. directionally.
o Reachability protocol (REAP) - The protocol for detecting failure o Reachability protocol (REAP) - The protocol for detecting failure
and exploring reachability in a multihomed environment. REAP is and exploring reachability in a multihomed environment. REAP is
defined in [I-D.ietf-shim6-failure-detection]. defined in [I-D.ietf-shim6-failure-detection].
3. System Overview 3. System Overview
Figure 1 illustrates the system overview. The shim layer and REAP Figure 1 illustrates the system overview. The shim sub-layer and
component exist inside the IP layer. Applications use the sockets REAP component exist inside the IP layer. Applications use the
API defined in this document to interface with the shim layer and the sockets API defined in this document to interface with the shim sub-
transport layer for locator management, failure detection, and path layer and the transport layer for locator management, failure
exploration. detection, and path exploration.
It may also be possible that the shim layer interacts with the It may also be possible that the shim sub-layer interacts with the
transport layer, however, such an interaction is outside the scope of transport layer, however, such an interaction is outside the scope of
this document. this document.
+------------------------+ +------------------------+
| Application | | Application |
+------------------------+ +------------------------+
^ ^ ^ ^
~~~~~~~~~~~~~|~Socket Interface|~~~~~~~~~~~~~~ ~~~~~~~~~~~~~|~Socket Interface|~~~~~~~~~~~~~~
| v | v
+-----------|------------------------------+ +-----------|------------------------------+
skipping to change at page 7, line 32 skipping to change at page 7, line 32
v v v v
+------------------------------------------+ +------------------------------------------+
| Link Layer | | Link Layer |
+------------------------------------------+ +------------------------------------------+
Figure 1: System overview Figure 1: System overview
4. Requirements 4. Requirements
The following is a list of requirements from applications: The following is a list of requirements from applications:
o Locator management. The shim layer selects a pair of locators for o Locator management.
sending IP packets within a given context. The selection is made * It should be possible to set preferred source and/or
by taking miscellaneous conditions into account such as destination locator within a given context: Lp(local) and/or
reachability of the path, application's preference, and Lp(remote).
characteristics of path. From applications' perspective: * It should be possible to get preferred source and/or
* It should be possible to obtain the lists of locators of a destination locator within a given context: Lp(local) and/or
given context: Ls(local) and Ls(remote). Lp(remote).
* It should be possible to obtain the preferred locators of a * It should be possible to set a list of source and/or
given context: Lp(local) and Lp(remote). destination locators within a given context: Ls(local) and
o Notification from applications to the shim layer about the status Ls(remote).
of the communication. The notification occurs in an event-based * It should be possible to get a list of source and/or
manner. Applications and/or upper layer protocols may provide destination locators within a given context: Ls(local) and
positive feedbacks or negative feedbacks to the shim layer. Ls(remote).
[NOTE: These feedbacks are mentioned in o Notification from applications to the shim sub-layer about the
status of the communication. The notification occurs in an event-
based manner. Applications and/or upper layer protocols may
provide positive feedbacks or negative feedbacks to the shim sub-
layer. Note that these feedbacks are mentioned in
[I-D.ietf-shim6-failure-detection]]: [I-D.ietf-shim6-failure-detection]]:
* Applications and/or upper layer protocols (e.g., TCP) may
provide positive feedbacks to the shim layer informing that the
communication is going well.
* Applications and/or upper layer protocols (e.g., TCP) may * Applications and/or upper layer protocols (e.g., TCP) may
provide negative feedbacks to the shim layer informing that the provide positive feedbacks to the shim sub-layer informing that
communication status is not satisfactory. TCP may detect a the communication is going well.
* Applications and/or upper layer protocols (e.g., TCP) may
provide negative feedbacks to the shim sub-layer informing that
the communication status is not satisfactory. TCP may detect a
problem when it does not receive any expected ACK message from problem when it does not receive any expected ACK message from
the peer. Besides, a receipt of an ICMP error message could be the peer. Besides, a receipt of an ICMP error message could be
a clue for the application to detect problems. The REAP module a clue for the application to detect problems. The REAP module
may be triggered by these negative feedbacks and invoke the may be triggered by these negative feedbacks and invoke the
path exploration procedure. path exploration procedure.
o Feedback from applications to the shim layer. Applications should o Feedback from applications to the shim sub-layer. Applications
be able to inform the shim layer of the timeout values for should be able to inform the shim sub-layer of the timeout values
detecting failures, sending keepalives, and starting the for detecting failures, sending keepalives, and starting the
exploration procedure. In particular, applications should be able exploration procedure. In particular, applications should be able
to suppress keepalives. to suppress keepalives.
o Hot-standby. Applications may request the shim layer for the hot- o Hot-standby. Applications may request the shim sub-layer for the
standby capability. This means that, alternative paths are known hot-standby capability. This means that, alternative paths are
to be working in advance of a failure detection. In such a case, known to be working in advance of a failure detection. In such a
it is possible for the host to immediately replace the current case, it is possible for the host to immediately replace the
locator pair with an alternative locator pair. current locator pair with an alternative locator pair.
o Eagerness for locator exploration. An application should be able o Eagerness for locator exploration. An application should be able
to inform the shim layer of how aggressively it wants the REAP to inform the shim sub-layer of how aggressively it wants the REAP
mechanism to perform a path exploration (e.g., by specifying the mechanism to perform a path exploration (e.g., by specifying the
number of concurrent attempts of discovery of working locator number of concurrent attempts of discovery of working locator
pairs) when an outage occurs on the path between the locator pair pairs) when an outage occurs on the path between the locator pair
in use. in use.
o Providing locator information to applications. An application o Providing locator information to applications. An application
should be able to obtain information about the locator pair which should be able to obtain information about the locator pair which
was actually used to send or receive the packet. was actually used to send or receive the packet.
* For inbound traffic, the application may be interested in the * For inbound traffic, the application may be interested in the
locator pair which was actually used to receive the packet. locator pair which was actually used to receive the packet.
* For outbound traffic, the application may be interested in the * For outbound traffic, the application may be interested in the
skipping to change at page 8, line 48 skipping to change at page 9, line 4
verify if its preference for locator is actually applied to the verify if its preference for locator is actually applied to the
flow or not. flow or not.
o Applications should be able to specify if they want to defer the o Applications should be able to specify if they want to defer the
context setup, or if they want context establishment to be started context setup, or if they want context establishment to be started
immediately in the case where there is no available context. A immediately in the case where there is no available context. A
deferred context setup means that the initiation of communication deferred context setup means that the initiation of communication
should not be blocked to wait for completion of the context should not be blocked to wait for completion of the context
establishment. establishment.
o Turn on/off shim. An application should be able to request to o Turn on/off shim. An application should be able to request to
turn on or turn off the multihoming support by the shim layer: turn on or turn off the multihoming support by the shim layer:
* Apply shim. The application should be able to explicitly * Apply shim. The application should be able to explicitly
request the shim layer to apply multihoming support. request the shim sub-layer to apply multihoming support.
* Don't apply shim. The application should be able to request * Don't apply shim. The application should be able to request
the shim layer not to apply the multihoming support but to the shim sub-layer not to apply the multihoming support but to
apply normal IP processing at the IP layer. apply normal IP processing at the IP layer.
o An application should be able to know if the communication is now o An application should be able to know if the communication is now
being served by the shim layer or not. being served by the shim sub-layer or not.
o An application should be able to use a common interface to access o An application should be able to use a common interface to access
an IPv4 locator and an IPv6 locator. an IPv4 locator and an IPv6 locator.
5. Socket Options for Multihoming Shim Layer 5. Socket Options for Multihoming Shim Sub-Layer
In this section, socket options that are specific to multihomed shim In this section, socket options that are specific to the shim sub-
are defined. layer are defined.
Table 1 shows a list of the socket options that are specific to the Table 1 shows a list of the socket options that are specific to the
multihoming shim layer. An application may specify these socket multihoming shim sub-layer. An application may use these socket
options for a given socket either by the getsockopt() system call or options for a given socket either by the getsockopt() system call or
by the setsockopt() system call. All of these socket options are by the setsockopt() system call. All of these socket options are
defined at level SOL_SHIM. defined at level SOL_SHIM.
The first column of Table 1 gives the name of the option. The second The first column of Table 1 gives the name of the option. The second
and third columns indicate whether the option can be handled by the and third columns indicate whether the option can be handled by the
getsockopt() system call and/or by the setsockopt() system call. The getsockopt() system call and/or by the setsockopt() system call. The
fourth column provides a brief description of the socket option. The fourth column provides a brief description of the socket option. The
fifth column shows the type of data structure specified along with fifth column shows the type of data structure specified along with
the socket option. By default, the data structure type is an the socket option. By default, the data structure type is an
integer. integer.
+-----------------------------+-----+-----+-----------------+-------+ +-----------------------------+-----+-----+-----------------+-------+
| optname | get | set | description | dtype | | optname | get | set | description | dtype |
+-----------------------------+-----+-----+-----------------+-------+ +-----------------------------+-----+-----+-----------------+-------+
| SHIM_ASSOCIATED | o | | Check if the | int | | SHIM_ASSOCIATED | o | | Get the | int |
| | | | parameter which | |
| | | | indicates | |
| | | | whether if the | |
| | | | socket is | | | | | | socket is | |
| | | | associated with | | | | | | associated with | |
| | | | any shim | | | | | | any shim | |
| | | | context or not. | | | | | | context or not. | |
| SHIM_DONTSHIM | o | o | Request the | int | | SHIM_DONTSHIM | o | o | Get or set the | int |
| | | | shim layer not | | | | | | parameter which | |
| | | | to apply any | | | | | | indicates | |
| | | | whether to | |
| | | | employ the | |
| | | | multihoming | | | | | | multihoming | |
| | | | support for the | | | | | | support by the | |
| | | | communication. | | | | | | shim sub-layer | |
| SHIM_HOT_STANDBY | o | o | Request the | int | | | | | or not. | |
| | | | shim layer to | | | SHIM_HOT_STANDBY | o | o | Get or set the | int |
| | | | prepare a | | | | | | parameter to | |
| | | | request the | |
| | | | shim sub-layer | |
| | | | to prepare a | |
| | | | hot-standby | | | | | | hot-standby | |
| | | | connection (in | | | | | | connection. | |
| | | | addition to the | |
| | | | current path). | |
| SHIM_LOC_LOCAL_PREF | o | o | Get or set the | *1 | | SHIM_LOC_LOCAL_PREF | o | o | Get or set the | *1 |
| | | | preferred | | | | | | preferred | |
| | | | locator on the | | | | | | locator on the | |
| | | | local side for | | | | | | local side for | |
| | | | the context | | | | | | the context | |
| | | | associated with | | | | | | associated with | |
| | | | the socket. | | | | | | the socket. | |
| SHIM_LOC_PEER_PREF | o | o | Get or set the | *1 | | SHIM_LOC_PEER_PREF | o | o | Get or set the | *1 |
| | | | preferred | | | | | | preferred | |
| | | | locator on the | | | | | | locator on the | |
| | | | remote side for | | | | | | remote side for | |
| | | | the context | | | | | | the context | |
| | | | associated with | | | | | | associated with | |
| | | | the socket. | | | | | | the socket. | |
| SHIM_LOC_LOCAL_RECV | o | o | Request for the | int | | SHIM_LOC_LOCAL_RECV | o | o | Get or set the | int |
| | | | parameter which | |
| | | | is used to | |
| | | | request the | |
| | | | shim sub-layer | |
| | | | to store the | |
| | | | destination | | | | | | destination | |
| | | | locator of the | | | | | | locator of the | |
| | | | received IP | | | | | | received IP | |
| | | | packet. | | | | | | packet. | |
| SHIM_LOC_PEER_RECV | o | o | Request for the | int | | SHIM_LOC_PEER_RECV | o | o | Get or set the | int |
| | | | parameter which | |
| | | | is used to | |
| | | | request the | |
| | | | shim sub-layer | |
| | | | to store the | |
| | | | source locator | | | | | | source locator | |
| | | | of the received | | | | | | of the received | |
| | | | IP packet. | | | | | | IP packet. | |
| SHIM_LOC_LOCAL_SEND | o | o | Request the use | *2 | | SHIM_LOC_LOCAL_SEND | o | o | Get or set the | *2 |
| | | | of specific | |
| | | | locator as | |
| | | | source locator | | | | | | source locator | |
| | | | of outgoing IP | | | | | | of outgoing IP | |
| | | | packets. | | | | | | packets. | |
| SHIM_LOC_PEER_SEND | o | o | Request the use | *2 | | SHIM_LOC_PEER_SEND | o | o | Get or set the | *2 |
| | | | of specific | |
| | | | locator as | |
| | | | destination | | | | | | destination | |
| | | | locator of | | | | | | locator of | |
| | | | outgoing IP | | | | | | outgoing IP | |
| | | | packets. | | | | | | packets. | |
| SHIM_LOCLIST_LOCAL | o | o | Get or set the | *3 | | SHIM_LOCLIST_LOCAL | o | o | Get or set the | *3 |
| | | | list of | | | | | | list of | |
| | | | locators | | | | | | locators | |
| | | | associated with | | | | | | associated with | |
| | | | the local EID. | | | | | | the local EID. | |
| SHIM_LOCLIST_PEER | o | o | Get or set the | *3 | | SHIM_LOCLIST_PEER | o | o | Get or set the | *3 |
| | | | list of | | | | | | list of | |
| | | | locators | | | | | | locators | |
| | | | associated with | | | | | | associated with | |
| | | | the peer's EID. | | | | | | the peer's EID. | |
| SHIM_APP_TIMEOUT | o | o | Inform the shim | int | | SHIM_APP_TIMEOUT | o | o | Get or set the | int |
| | | | layer of the | |
| | | | timeout value | | | | | | timeout value | |
| | | | for detecting | | | | | | for detecting | |
| | | | failure. | | | | | | failure. | |
| SHIM_PATHEXPLORE | o | o | Specify | *4 | | SHIM_PATHEXPLORE | o | o | Get or set | *4 |
| | | | behavior of | | | | | | parameters for | |
| | | | path | | | | | | path | |
| | | | exploration and | | | | | | exploration and | |
| | | | failure | | | | | | failure | |
| | | | detection. | | | | | | detection. | |
| SHIM_CONTEXT_DEFERRED_SETUP | o | o | Specify if the | int | | SHIM_CONTEXT_DEFERRED_SETUP | o | o | Get or set the | int |
| | | | parameter which | |
| | | | indicates | |
| | | | whether | |
| | | | deferred | |
| | | | context setup | | | | | | context setup | |
| | | | can be deferred | | | | | | is supported or | |
| | | | or not. | | | | | | not. | |
+-----------------------------+-----+-----+-----------------+-------+ +-----------------------------+-----+-----+-----------------+-------+
Table 1: Socket options for multihoming shim Table 1: Socket options for multihoming shim
*1: Pointer to a shim_locator which is defined in Section 7. *1: Pointer to a shim_locator which is defined in Section 7.
*2: Pointer to shim_locator data structure. *2: Pointer to shim_locator data structure.
*3: Pointer to an array of shim_locator. *3: Pointer to an array of shim_locator.
*4: Pointer to a shim_pathexplore which is defined in Section 7. *4: Pointer to a shim_pathexplore which is defined in Section 7.
Figure 2 illustrates how the shim specific socket options fit into Figure 2 illustrates how the shim specific socket options fit into
the system model of socket API. The figure shows that the shim layer the system model of socket API. The figure shows that the shim sub-
and the additional protocol components (IPv4 and IPv6) below the shim layer and the additional protocol components (IPv4 and IPv6) below
layer are new to the system model. As previously mentioned, all the the shim sub-layer are new to the system model. As previously
shim specific socket options are defined at SOL_SHIM level. This mentioned, all the shim specific socket options are defined at the
design choice brings the following advantages: SOL_SHIM level. This design choice brings the following advantages:
1. The existing sockets API continue to work at the layer above the 1. The existing sockets API continue to work at the layer above the
shim layer. That is, those legacy API handle IP addresses as shim sub-layer. That is, those legacy API handle IP addresses as
identifiers. identifiers.
2. With newly defined socket options for the shim layer, the 2. With newly defined socket options for the shim sub-layer, the
application obtains additional control of locator management. application obtains additional control of locator management.
3. The shim specific socket options can be kept independent from 3. The shim specific socket options can be kept independent from
address family (IPPROTO_IP or IPPROTO_IPV6) and transport address family (IPPROTO_IP or IPPROTO_IPV6) and transport
protocol (IPPROTO_TCP or IPPROTO_UDP). protocol (IPPROTO_TCP or IPPROTO_UDP).
s1 s2 s3 s4 s1 s2 s3 s4
| | | | | | | |
+----------------|--|-------|--|----------------+ +----------------|--|-------|--|----------------+
| +-------+ +-------+ | | +-------+ +-------+ |
| IPPROTO_TCP | TCP | | UDP | | | IPPROTO_TCP | TCP | | UDP | |
skipping to change at page 12, line 31 skipping to change at page 13, line 31
| / \ | | / \ |
| +------+ +------+ | | +------+ +------+ |
| | IPv4 | | IPv6 | | | | IPv4 | | IPv6 | |
| +------+ +------+ | | +------+ +------+ |
| | | | | | | |
+------------------|----------|-----------------+ +------------------|----------|-----------------+
| | | |
IPv4 IPv6 IPv4 IPv6
Datagram Datagram Datagram Datagram
Figure 2: System model of sockets API with shim layer Figure 2: System model of sockets API with shim sub-layer
5.1. SHIM_ASSOCIATED 5.1. SHIM_ASSOCIATED
The SHIM_ASSOCIATED option can be used to check whether the socket is The SHIM_ASSOCIATED option is used to check whether the socket is
associated with any shim context or not. associated with any shim context or not.
This option is particularly meaningful in the case where the locator This option is meaningful when the locator information of the
information of the received IP packet does not tell whether the received IP packet does not tell whether the identifier/locator
identifier/locator adaptation is performed or not. Note that the EID adaptation is performed or not. Note that the EID pair and the
pair and locator pair may be identical in some case. locator pair may be identical in some cases.
This option can be specified by getsockopt(). Thus, the option is This option can be specified by getsockopt(). Thus, the option is
read-only and the result (0 or 1) is set in the option value (the read-only and the result (0 or 1) is set in the option value (the
fourth argument of getsockopt()). fourth argument of getsockopt()).
The data type of the option value is an integer. The option value The data type of the option value is an integer. The option value
indicates the presence of shim context. A returned value 1 means indicates the presence of shim context. A returned value 1 means
that the socket is associated with a shim context at the shim layer, that the socket is associated with a shim context at the shim sub-
while a return value 0 indicates that there is no shim context layer. A return value 0 indicates that there is no shim context
associated with the socket. associated with the socket.
For example, the option can be used by the application as follows: For example, the option can be used by the application as follows:
int optval; int optval;
int optlen = sizeof(optval); int optlen = sizeof(optval);
getsockopt(fd, SOL_SHIM, SHIM_ASSOCIATED, &optval, &optlen); getsockopt(fd, SOL_SHIM, SHIM_ASSOCIATED, &optval, &optlen);
5.2. SHIM_DONTSHIM 5.2. SHIM_DONTSHIM
The SHIM_DONTSHIM option can be used to request the shim layer to not The SHIM_DONTSHIM option is used to request the shim layer not to
apply the multihoming support for the communication established over provide the multihoming support for the communication established
the socket. over the socket.
The data type of the option value is an integer. The option value The data type of the option value is an integer, and it takes 0 or 1.
indicates whether the multihoming shim support is deprecated or not. An option value 0 means that the multihoming shim sub-layer is
The option value is binary (0 or 1). By default, the value is set to employed if available. An option value 1 means that the application
0, which means that the shim layer applies identifier/locator does not want the multihoming shim sub-layer to provide the
adaptation for the flow. In order to disable the socket option, the multihoming support for the communication established over the
application should call setsockopt() with optval set to 0. socket.
For example, the application may disable the socket option as Default value is set as 0, which means that the multihoming shim sub-
follows: layer performs identifier/locator adaptation if available.
Any attempt to disable the multihoming shim support MUST be made by
the application before the socket is connected. If an application
makes such an attempt for a connected-socket, an error code
EOPNOTSUPP MUST be returned.
For example, an application can request the system not to apply the
multihoming support as follows:
int optval; int optval;
optval = 0; optval = 1;
setsockopt(fd, SOL_SHIM, SHIM_DONTSHIM, &optval, sizeof(optval)); setsockopt(fd, SOL_SHIM, SHIM_DONTSHIM, &optval, sizeof(optval));
For example, the application may check the option value as follows: For example, the application can check the option value as follows:
int optval; int optval;
int len; int len;
len = sizeof(optval); len = sizeof(optval);
getsockopt(fd, SOL_SHIM, SHIM_DONTSHIM, &optval, &len); getsockopt(fd, SOL_SHIM, SHIM_DONTSHIM, &optval, &len);
5.3. SHIM_HOT_STANDBY 5.3. SHIM_HOT_STANDBY
The SHIM_HOT_STANDBY option can be used to check if the shim layer The SHIM_HOT_STANDBY option is used to control the shim sub-layer
uses hot-standby connection or not for the communication established whether to employ a hot-standby connection for the socket or not. A
over the socket. A hot-standby connection is based on an alternative hot-standby connection is an alternative working locator pair to the
working locator pair to the current locator pair. This option is current locator pair. This option is effective only when there is a
effective only when there is a shim context associated with the shim context associated with the socket.
socket.
The data type of the option value is an integer. The data type of the option value is an integer.
The option value can be set by setsockopt(). The option value can be set by setsockopt().
The option value can be read by getsockopt(). The option value can be read by getsockopt().
By default, the value is set to 0, meaning that hot-standby By default, the value is set to 0, meaning that hot-standby
connection is disabled. connection is disabled.
For example, the option can be activated by the application as For example, an application can request establishment of a hot-
follows. standby connection by using the socket option as follows:
int optval; int optval;
optval = 1; optval = 1;
setsockopt(fd, SOL_SHIM, SHIM_HOT_STANDBY, &optval, setsockopt(fd, SOL_SHIM, SHIM_HOT_STANDBY, &optval,
sizeof(optval)); sizeof(optval));
For example, the option value can be checked by the application as For example, an application can get the option value by using the
follows. socket option as follows:
int optval; int optval;
int len; int len;
len = sizeof(optval); len = sizeof(optval);
getsockopt(fd, SOL_SHIM, SHIM_HOT_STANDBY, &optval, &len); getsockopt(fd, SOL_SHIM, SHIM_HOT_STANDBY, &optval, &len);
5.4. SHIM_PATHEXPLORE 5.4. SHIM_PATHEXPLORE
The application may specify this socket option to specify specify The application may use this socket option to specify parameters
behavior of path exploration. Path exploration is a procedure to concerning path exploration. Path exploration is a procedure to find
find an alternative locator pair when the host finds any problem with an alternative locator pair to the current locator pair. As the REAP
the current locator pair. The message used for finding an specification defines, a peer may send Probe messages to find an
alternative locator pair is called the Probe message and it is sent alternative locator pair.
per locator pair. The REAP specification defines the default values
for Initial Probe Timeout and Initial Probe.
The option is effective only when there is a shim context associated The option is effective only when there is a shim context associated
with the socket. with the socket.
The data type of the option value is a pointer to the buffer where a The data type of the option value is a pointer to the buffer where a
set of information for path exploration is stored. The data set of information for path exploration is stored. The data
structure is defined in Section 7. structure is defined in Section 7.
By default, the option value is set to NULL, meaning that the option By default, the option value is set to NULL, meaning that the option
is disabled. is disabled.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
For example, the parameters for the path exploration can be set as For example, an application can set parameters for path exploration
follows. by using the socket option as follows.
struct shim6_pathexplore pe; struct shim6_pathexplore pe;
pe.pe_probenum = 4; /* times */ pe.pe_probenum = 4; /* times */
pe.pe_keepaliveto = 10; /* seconds */ pe.pe_keepaliveto = 10; /* seconds */
pe.pe_initprobeto = 500; /* milliseconds */ pe.pe_initprobeto = 500; /* milliseconds */
pe.pe_reserved = 0; pe.pe_reserved = 0;
setsockopt(fd, SOL_SHIM, SHIM_PATHEXPLORE, &pe, sizeof(pe)); setsockopt(fd, SOL_SHIM, SHIM_PATHEXPLORE, &pe, sizeof(pe));
For example, the parameters for the path exploration can be read as For example, an application can get parameters for path exploration
follows. by using the socket option as follows.
struct shim6_pathexplore pe; struct shim6_pathexplore pe;
int len; int len;
len = sizeof(pe); len = sizeof(pe);
getsockopt(fd, SOL_SHIM, SHIM_PATHEXPLORE, &pe, &len); getsockopt(fd, SOL_SHIM, SHIM_PATHEXPLORE, &pe, &len);
5.5. SHIM_LOC_LOCAL_PREF 5.5. SHIM_LOC_LOCAL_PREF
The SHIM_LOC_LOCAL_PREF option can be used to read or set preferred The SHIM_LOC_LOCAL_PREF option is used to get or set preferred
locator on local side within a given context. Hence this option is locator on local side within a given context. Hence this option is
effective only when there is a shim context associated with the effective only when there is a shim context associated with the
socket. socket.
The data type of the option value is a pointer to the specific data The data type of the option value is a pointer to a locator
structure which stores the locator information. The data structure information data structure which is defined in Section 7.
is defined in Section 7.
By default, the option value is set to NULL, meaning that the option By default, the option value is set to NULL, meaning that the option
is disabled. is disabled.
The preferred locator can be set by setsockopt(). Verification of The preferred locator can be set by setsockopt(). The shim sub-layer
the locator shall be done by the shim layer before updating the shall verify requested locator before it updating the preferred
preferred locator. locator.
The preferred locator can be read by getsockopt(). An application can get the preferred locator by getsockopt().
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
An error EINVALIDLOCATOR will be returned when the validation of the An error EINVALIDLOCATOR will be returned when the validation of the
specified locator failed. specified locator failed.
For example, a preferred locator can be set as follows. It should be For example, an application can set the preferred locator by using
noted that some members of the shim_locator (lc_ifidx and lc_flags) the socket option as follows. Note that some members of the
are ignored in the write operation. shim_locator (lc_ifidx and lc_flags) are ignored in the set
operation.
struct shim_locator lc; struct shim_locator lc;
struct in6_addr ip6; struct in6_addr ip6;
/* ...set the locator (ip6)... */ /* ...set the locator (ip6)... */
memset(&lc, 0, sizeof(shim_locator)); memset(&lc, 0, sizeof(shim_locator));
lc.lc_family = AF_INET6; /* IPv6 */ lc.lc_family = AF_INET6; /* IPv6 */
lc.lc_ifidx = 0; lc.lc_ifidx = 0;
lc.lc_flags = 0; lc.lc_flags = 0;
lc.lc_preference = 255; lc.lc_preference = 255;
memcpy(lc.lc_addr, &ip6, sizeof(in6_addr)); memcpy(lc.lc_addr, &ip6, sizeof(in6_addr));
setsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_PREF, &lc, setsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_PREF, &lc,
sizeof(optval)); sizeof(optval));
For example, the preferred locator of the context can be read by For example, an application can get the preferred locator by using
application as follows. the socket option as follows.
struct shim_locator lc; struct shim_locator lc;
int len; int len;
len = sizeof(lc); len = sizeof(lc);
getsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_PREF, &lc, &len); getsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_PREF, &lc, &len);
5.6. SHIM_LOC_PEER_PREF 5.6. SHIM_LOC_PEER_PREF
The SHIM_LOC_PEER_PREF option can be used to read or set preferred The SHIM_LOC_PEER_PREF option is used to get or set preferred locator
locator on peer side within a given context. Hence this option is on peer side within a given context. Hence this option is effective
effective only when there is a shim context associated with the only when there is a shim context associated with the socket.
socket.
The data type of the option value is a pointer to the specific data The data type of the option value is a pointer to the locator
structure which stores the locator information. The data structure information data structure which is defined in Section 7.
is defined in Section 7.
By default, the option value is set to NULL, meaning that the option By default, the option value is set to NULL, meaning that the option
is disabled. is disabled.
The preferred locator can be set by setsockopt(). The shim layer The preferred locator can be set by setsockopt(). The shim sub-layer
shall perform verification of the locator before updating the shall verify requested locator before it updating the preferred
preferred locator. locator.
The preferred locator can be read by getsockopt(). An application can get the preferred locator by getsockopt().
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
An error EINVALIDLOCATOR will be returned when the validation of the An error EINVALIDLOCATOR will be returned when the validation of the
specified locator failed. requested locator fails.
For example, a preferred locator can be set as follows. It should be
noted that some members of the shim_locator (lc_ifidx and lc_flags)
are ignored in the write operation.
The usage of the option is same as that of SHIM_LOC_LOCAL_PREF. The usage of the option is same as that of SHIM_LOC_LOCAL_PREF. Note
that some members of the shim_locator (lc_ifidx and lc_flags) are
ignored in the set operation.
5.7. SHIM_LOC_LOCAL_RECV 5.7. SHIM_LOC_LOCAL_RECV
The SHIM_LOC_LOCAL_RECV option can be used to request the shim layer The SHIM_LOC_LOCAL_RECV option can be used to request the shim sub-
to store the destination locator of the received IP packet in an layer to store the destination locator of the received IP packet in
ancillary data object which can be accessed by recvmsg(). Hence this an ancillary data object which can be accessed by recvmsg(). Hence
option is effective only when there is a shim context associated with this option is effective only when there is a shim context associated
the socket. with the socket.
The data type of the option value is integer. The option value The data type of the option value is integer. The option value
should be binary (0 or 1). By default, the option value is set to 0, should be binary (0 or 1). By default, the option value is set to 0,
meaning that the option is disabled. meaning that the option is disabled.
The option value can be set by setsockopt(). An application can set the option value by setsockopt().
The option value can be read by getsockopt(). An application can get the option value by getsockopt().
See Section 6 for the procedure to access locator information stored See Section 6 for the procedure to access locator information stored
in the ancillary data objects. in the ancillary data objects.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
For example, the option can be activated by the application as For example, an application can request the shim sub-layer to store
follows: destination locator by using the socket option as follows.
int optval; int optval;
optval = 1; optval = 1;
setsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_RECV, &optval, setsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_RECV, &optval,
sizeof(optval)); sizeof(optval));
For example, the option value can be checked by the application as For example, an application can get the option value as follows.
follows:
int optval; int optval;
int len; int len;
len = sizeof(optval); len = sizeof(optval);
getsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_RECV, &optval, &len); getsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_RECV, &optval, &len);
5.8. SHIM_LOC_PEER_RECV 5.8. SHIM_LOC_PEER_RECV
The SHIM_LOC_PEER_RECV option can be used to request the shim layer The SHIM_LOC_PEER_RECV option is used to request the shim sub-layer
to store the source locator of the received IP packet in an ancillary to store the source locator of the received IP packet in an ancillary
data object which can be accessed by recvmsg(). Hence this option is data object which can be accessed by recvmsg(). Hence this option is
effective only when there is a shim context associated with the effective only when there is a shim context associated with the
socket. socket.
The data type of the option value is integer. The option value The data type of the option value is integer. The option value
should be binary (0 or 1). By default, the option value is set to 0, should be binary (0 or 1). By default, the option value is set to 0,
meaning that the option is disabled. meaning that the option is disabled.
The option value can be set by setsockopt(). The option value can be set by setsockopt().
skipping to change at page 18, line 39 skipping to change at page 19, line 42
in the ancillary data objects. in the ancillary data objects.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
The usage of the option is same as that of SHIM_LOC_LOCAL_RECV The usage of the option is same as that of SHIM_LOC_LOCAL_RECV
option. option.
5.9. SHIM_LOC_LOCAL_SEND 5.9. SHIM_LOC_LOCAL_SEND
The SHIM_LOC_LOCAL_SEND option can be used to request the shim layer The SHIM_LOC_LOCAL_SEND option is used to request the shim sub-layer
to use specific locator for the source locator of IP packets to be to use a specific locator as the source locator for the IP packets to
sent from the socket. Hence this option is effective only when there be sent from the socket. Hence this option is effective only when
is a shim context associated with the socket. there is a shim context associated with the socket.
The data type of option value is pointer to shim_locator data The data type of option value is pointer to shim_locator data
structure. structure.
The local locator can be specified by setsockopt() providing a valid An application can set the local locator by setsockopt() providing a
locator which is stored in a shim_locator data structure. When a valid locator which is stored in a shim_locator data structure. When
zero-filled locator is specified, pre-existing setting of local a zero-filled locator is specified, pre-existing setting of local
locator is inactivated. locator is inactivated.
The local locator specified can be obtained by getsockopt(). The An application can get the local locator by getsockopt().
locator can be obtained from the option value.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
An error EINVALIDLOCATOR when invalid locator is specified. An error EINVALIDLOCATOR will be returned when invalid locator is
specified.
For example, a preferred local locator can be specified as follows. For example, an application can request the shim sub-layer to use a
specific local locator by using the socket option as follows.
struct shim_locator locator; struct shim_locator locator;
struct in6_addr ia6; struct in6_addr ia6;
/* an IPv6 address preferred for the source locator is copied /* an IPv6 address preferred for the source locator is copied
to the parameter ia6 */ to the parameter ia6 */
memset(&locator, 0, sizeof(locator)); memset(&locator, 0, sizeof(locator));
/* fill shim_locator data structure */ /* fill shim_locator data structure */
locator.lc_family = AF_INET6; locator.lc_family = AF_INET6;
locator.lc_ifidx = 1; locator.lc_ifidx = 1;
locator.lc_flags = 0; locator.lc_flags = 0;
locator.lc_preference = 0; locator.lc_preference = 0;
memcpy(&locator.lc_addr, &ia6, sizeof(ia6)); memcpy(&locator.lc_addr, &ia6, sizeof(ia6));
setsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_SEND, &locator, setsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_SEND, &locator,
sizeof(locator)); sizeof(locator));
For example, a preferred local locator can be read as follows. For example, an application can get the preferred local locator by
using the socket option as follows.
struct shim_locator locator; struct shim_locator locator;
memset(&locator, 0, sizeof(locator)); memset(&locator, 0, sizeof(locator));
getsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_SEND, &locator, getsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_SEND, &locator,
sizeof(locator)); sizeof(locator));
/* check locator */ /* check locator */
5.10. SHIM_LOC_PEER_SEND 5.10. SHIM_LOC_PEER_SEND
The SHIM_LOC_PEER_SEND option can be used to request the shim layer The SHIM_LOC_PEER_SEND option is used to request the shim sub-layer
to use specific locator for the destination locator of IP packets to to use a specific locator for the destination locator of IP packets
be sent from the socket. Hence this option is effective only when to be sent from the socket. Hence this option is effective only when
there is a shim context associated with the socket. there is a shim context associated with the socket.
The data type of the option value is a pointer to shim_locator data The data type of the option value is a pointer to shim_locator data
structure. structure.
The remote locator can be specified by setsockopt() providing a valid An application can set the remote locator by setsockopt() providing a
locator which is stored in a shim_locator data structure. When a valid locator which is stored in a shim_locator data structure. When
zero-filled locator is specified, pre-existing setting of remote a zero-filled locator is specified, pre-existing setting of remote
locator is inactivated. locator is inactivated.
The remote locator specified can be obtained by getsockopt(). The An application can get the specified remote locator by getsockopt().
locator can be obtained from the option value.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
An error EINVALIDLOCATOR when invalid locator is specified. An error EINVALIDLOCATOR when invalid locator is specified.
The usage of the option is as the same as that of SHIM_LOC_LOCAL_SEND The usage of the option is as the same as that of SHIM_LOC_LOCAL_SEND
option. option.
5.11. SHIM_LOCLIST_LOCAL 5.11. SHIM_LOCLIST_LOCAL
The SHIM_LOCLIST_LOCAL option can be used to read or set the locator The SHIM_LOCLIST_LOCAL option is used to get or set the locator list
list associated with the local EID of the shim context associated associated with the local EID of the shim context associated with the
with the socket. Hence this option is effective only when there is a socket. Hence this option is effective only when there is a shim
shim context associated with the socket. context associated with the socket.
The data type of the option value is a pointer to the buffer where a The data type of the option value is a pointer to the buffer in which
locator list is stored. See Section 7 for the data structure for a locator list is stored. See Section 7 for the data structure for
storing the locator information. By default, the option value is set storing the locator information. By default, the option value is set
to NULL, meaning that the option is disabled. to NULL, meaning that the option is disabled.
The locator list can be read by getsockopt(). Note that the size of An application can get the locator list by getsockopt(). Note that
the buffer pointed by optval argument should be large enough to store the size of the buffer pointed by optval argument should be large
an array of locator information. The number of the locator enough to store an array of locator information. The number of the
information is not known beforehand. locator information is not known beforehand.
The locator list can be set by setsockopt(). The buffer pointed by The local locator list can be set by setsockopt(). The buffer
optval argument should contain an array of locator list. pointed by optval argument should contain an array of locator list.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
An error EINVALIDLOCATOR will be returned when the validation of the An error EINVALIDLOCATOR will be returned when the validation of the
specified locator failed. specified locator failed.
For example, a list of locators to be associated with the local EID For example, an application can set a list of locators to be
can be specified as follows: associated with the local EID by using the socket option as follows:
struct shim_locator locators[SHIM_MAX_LOCATORS]; struct shim_locator locators[SHIM_MAX_LOCATORS];
struct sockaddr_in *sin; struct sockaddr_in *sin;
struct sockaddr_in6 *sin6; struct sockaddr_in6 *sin6;
memset(locators, 0, sizeof(locators)); memset(locators, 0, sizeof(locators));
... ...
/* obtain local IP addresses from local interfaces */ /* obtain local IP addresses from local interfaces */
skipping to change at page 21, line 32 skipping to change at page 22, line 38
memcpy(&locators[0].lc_addr, &sa6->sin6_addr, memcpy(&locators[0].lc_addr, &sa6->sin6_addr,
sizeof(sa6->sin6_addr)); sizeof(sa6->sin6_addr));
... ...
/* second locator (an IPv4 address) */ /* second locator (an IPv4 address) */
locators[1].lc_family = AF_INET; locators[1].lc_family = AF_INET;
locators[1].lc_ifidx = 0; locators[1].lc_ifidx = 0;
locators[1].lc_flags = 0; locators[1].lc_flags = 0;
locators[1].lc_preference = 0; locators[1].lc_preference = 0;
memcpy(&locators[1].lc_addr, &sa->sin_addr, sizeof(sa->sin_addr)); memcpy(&locators[1].lc_addr, &sa->sin_addr,
sizeof(sa->sin_addr));
setsockopt(fd, SOL_SHIM, SHIM_LOCLIST_LOCAL, locators, setsockopt(fd, SOL_SHIM, SHIM_LOCLIST_LOCAL, locators,
sizeof(locators)); sizeof(locators));
For example, a list of locators that are associated with the local For example, an application can get a list of locators that are
EID can be obtained as follows: associated with the local EID by using the socket option as follows.
struct shim_locator locators[SHIM_MAX_LOCATORS]; struct shim_locator locators[SHIM_MAX_LOCATORS];
memset(locators, 0, sizeof(locators)); memset(locators, 0, sizeof(locators));
getsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_RECV, locators, getsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_RECV, locators,
sizeof(locators)); sizeof(locators));
/* parse locators */ /* parse locators */
... ...
5.12. SHIM_LOCLIST_PEER 5.12. SHIM_LOCLIST_PEER
The SHIM_LOCLIST_PEER option can be used to read or set the locator The SHIM_LOCLIST_PEER option is used to get or set the locator list
list associated with the peer EID of the shim context associated with associated with the peer EID of the shim context associated with the
the socket. Hence this option is effective only when there is a shim socket. Hence this option is effective only when there is a shim
context associated with the socket. context associated with the socket.
The data type of the option value is a pointer to the buffer where a The data type of the option value is a pointer to the buffer where a
locator list is stored. See Section 7 for the data structure for locator list is stored. See Section 7 for the data structure for
storing the locator information. By default, the option value is set storing the locator information. By default, the option value is set
to NULL, meaning that the option is disabled. to NULL, meaning that the option is disabled.
The locator list can be read by getsockopt(). Note that the size of An application can get the locator list by getsockopt(). Note that
the buffer pointed by optval argument should be large enough to store the size of the buffer pointed by optval argument should be large
an array of locator information. The number of the locator enough to store an array of locator information. The number of the
information is not known beforehand. locator information is not known beforehand.
The locator list can be set by setsockopt(). The buffer pointed by An application can set the locator list by setsockopt(). The buffer
optval argument should contain an array of locator list. pointed by optval argument should contain an array of locator list.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
An error EINVALIDLOCATOR will be returned when the validation of the An error EINVALIDLOCATOR will be returned when the validation of the
specified locator failed. specified locator failed.
The usage of the option is same as that of SHIM_LOCLIST_LOCAL. The usage of the option is same as that of SHIM_LOCLIST_LOCAL.
5.13. SHIM_APP_TIMEOUT 5.13. SHIM_APP_TIMEOUT
The SHIM_APP_TIMEOUT option indicates timeout value for application The SHIM_APP_TIMEOUT option is used to get or set the timeout value
to detect failure. Hence this option is effective only when there is for application to detect failure. Hence this option is effective
a shim context associated with the socket. only when there is a shim context associated with the socket.
The data type of the option value is an integer. The value indicates The data type of the option value is an integer. The value indicates
the period of timeout in seconds to send a REAP Keepalive message the period of timeout in seconds to send a REAP Keepalive message
since the last outbound traffic. By default, the option value is set since the last outbound traffic. By default, the option value is set
to 0, meaning that the option is disabled. When the option is to 0, meaning that the option is disabled. When the option is
disabled, the REAP mechanism follows its default value of Send disabled, the REAP mechanism follows its default value of Send
Timeout value as specified in [I-D.ietf-shim6-failure-detection] Timeout value as specified in [I-D.ietf-shim6-failure-detection]
If the timeout value specified is longer than the Send Timeout If the timeout value specified is longer than the Send Timeout
configured in the REAP component, the REAP Keepalive message should configured in the REAP component, the REAP Keepalive message should
be suppressed. be suppressed.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
For example, a specific timeout value can be configured by the For example, an application can set the timeout value by using the
application as follows: socket option as follows.
int optval; int optval;
optval = 15; /* 15 seconds */ optval = 15; /* 15 seconds */
setsockopt(fd, SOL_SHIM, SHIM_APP_TIMEOUT, &optval, setsockopt(fd, SOL_SHIM, SHIM_APP_TIMEOUT, &optval,
sizeof(optval)); sizeof(optval));
For example, the option value namely the period of timeout can be For example, an application can get the timeout value by using the
checked by the application as follows: socket option as follows.
int optval; int optval;
int len; int len;
len = sizeof(optval); len = sizeof(optval);
getsockopt(fd, SOL_SHIM, SHIM_APP_TIMEOUT, &optval, &len); getsockopt(fd, SOL_SHIM, SHIM_APP_TIMEOUT, &optval, &len);
5.14. SHIM_DEFERRED_CONTEXT_SETUP 5.14. SHIM_DEFERRED_CONTEXT_SETUP
The SHIM_DEFERRED_CONTEXT_SETUP option indicates how initiation of The SHIM_DEFERRED_CONTEXT_SETUP option is used to specify whether to
context setup is made in terms of timing (before or after) the enable deferred context setup or not. Deferred context setup means
initial communication flow. Deferred context means that the that the context is established in parallel with the data
establishment of context does not put additional delay for an initial communication. Note that SHIM6 supports deferred context setup and
transaction. HIP does not because EIDs in HIP (i.e., Host Identifiers) are non-
routable.
The data type for the option value is an integer. The option value The data type for the option value is an integer. The option value
should binary (0 or 1). By default, the value is set to 1, meaning should be binary (0 or 1). By default, the value is set to 1,
that the context setup is deferred. In order to disable the option, meaning that the context setup is deferred. In order to disable the
the application should call setsockopt() with option value set to 0. option, the application should call setsockopt() with option value
set to 0.
However, it should be noted that deferred context setup may not be
possible in some cases. For instance, an EID may be non-routable
address (e.g., Host Identifier in HIP) and there is no way to
transmit any IP packet unless there is a context providing the
locators. In such a case, a context should be established prior to
the communication.
For example, the option can be disabled by the application as For example, an application can disable the deferred context setup by
follows: using the socket option as follows:
int optval; int optval;
optval = 0; optval = 0;
setsockopt(fd, SOL_SHIM, SHIM_DEFERRED_CONTEXT_SETUP, setsockopt(fd, SOL_SHIM, SHIM_DEFERRED_CONTEXT_SETUP,
&optval, sizeof(optval)); &optval, sizeof(optval));
For example, the option value can be checked by the application as For example, an application can get the option value as follows.
follows:
int optval; int optval;
int len; int len;
len = sizeof(optval); len = sizeof(optval);
getsockopt(fd, SOL_SHIM, SHIM_DEFERRED_CONTEXT_SETUP, getsockopt(fd, SOL_SHIM, SHIM_DEFERRED_CONTEXT_SETUP,
&optval, &len); &optval, &len);
5.15. Error Handling 5.15. Error Handling
If successful, getsockopt() and setsockopt() return 0; otherwise, the If successful, getsockopt() and setsockopt() return 0; otherwise, the
functions return -1 and set errno to indicate error. functions return -1 and set errno to indicate an error.
The following are new error values defined for some shim specific The following are new error values defined for some shim specific
socket options indicating that the getsockopt() or setsockopt() socket options indicating that the getsockopt() or setsockopt()
finished incompletely: finished incompletely:
EINVALIDLOCATOR EINVALIDLOCATOR
This indicates that at least one of the necessary validations This indicates that at least one of the necessary validations
inside the shim layer for the specified locator has failed. In inside the shim sub-layer for the specified locator has failed.
case of SHIM6, there are two kinds of verifications required for In case of SHIM6, there are two kinds of verifications required
security reasons prior to sending an IP packet to the peer's new for security reasons prior to sending an IP packet to the peer's
locator; one is the return routability (check if the peer is new locator; one is the return routability (check if the peer is
actually willing to receive data with the specified locator) and actually willing to receive data with the specified locator) and
the other one is the verification based on crypto identifier the other one is the verification based on crypto identifier
mechanisms [RFC3972], [I-D.ietf-shim6-hba]. mechanisms [RFC3972], [I-D.ietf-shim6-hba].
6. Ancillary Data for Multihoming Shim 6. Ancillary Data for Multihoming Shim
In this section, the definition and the usage of the ancillary data In this section, the definition and the usage of the ancillary data
specific to multihoming shim are provided. specific to multihoming shim are provided.
As defined in the Posix standard, sendmsg() and recvmsg() input a As defined in the Posix standard, sendmsg() and recvmsg() input a
skipping to change at page 26, line 29 skipping to change at page 27, line 29
locators to be used for the communication over the socket. locators to be used for the communication over the socket.
In addition, the application can specify the outgoing interface by In addition, the application can specify the outgoing interface by
SHIM_IF_SEND ancillary data. The ancillary data should contain the SHIM_IF_SEND ancillary data. The ancillary data should contain the
interface identifier of the physical interface over which the interface identifier of the physical interface over which the
application expects the packet to be transmitted. application expects the packet to be transmitted.
Note that the effect is limited to the datagram transmitted by the Note that the effect is limited to the datagram transmitted by the
sendmsg(). sendmsg().
If the specified locator pair is verified, the shim layer overrides If the specified locator pair is verified, the shim sub-layer
the locators of the IP packet. overrides the locators of the IP packet.
An error EINVALIDLOCATOR will be returned when validation of the An error EINVALIDLOCATOR will be returned when validation of the
specified locator failed. specified locator failed.
6.3. Notification from Application to Multihoming Shim 6.3. Notification from Application to Multihoming Shim
An application may provide feedbacks to the shim layer about the An application may provide feedbacks to the shim sub-layer about the
communication status. Such feedbacks are particularly useful for the communication status. Such feedbacks are particularly useful for the
shim layer in the absence of REAP mechanism to monitor the shim sub-layer in the absence of REAP mechanism to monitor the
reachability status of the currently used locator pair in a given reachability status of the currently used locator pair in a given
shim context. shim context.
The notification can be made by sendmsg() specifying a new ancillary The notification can be made by sendmsg() specifying a new ancillary
data called SHIM_FEEDBACK. The ancillary data can be handled by data called SHIM_FEEDBACK. The ancillary data can be handled by
specifying SHIM_FEEDBACK option in cmsg_type. specifying SHIM_FEEDBACK option in cmsg_type.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
See Section 7.3 for details of the data structure to be used. Note See Section 7.3 for details of the data structure to be used. Note
that this specification does not specify the exact behavior of the that this specification does not specify the exact behavior of the
shim layer when a feedback is given by an application. shim sub-layer when a feedback is given by an application.
7. Data Structures 7. Data Structures
In this section, data structures specifically defined for the In this section, data structures specifically defined for the
multihoming shim layer are introduced. These data structures are multihoming shim sub-layer are introduced. These data structures are
either used as a parameter for setsockopt()/getsockopt() (as either used as a parameter for setsockopt()/getsockopt() (as
mentioned in Section 5) or as a parameter for ancillary data to be mentioned in Section 5) or as a parameter for ancillary data to be
processed by sendmsg()/recvmsg() (as mentioned in Section 6). processed by sendmsg()/recvmsg() (as mentioned in Section 6).
7.1. Placeholder for Locator Information 7.1. Placeholder for Locator Information
As defined in Section 5, the SHIM_LOC_LOCAL_PREF, SHIM_LOC_PEER_PREF, As defined in Section 5, the SHIM_LOC_LOCAL_PREF, SHIM_LOC_PEER_PREF,
SHIM_LOCLIST_LOCAL, and SHIM_LOCLIST_PEER socket options need to SHIM_LOCLIST_LOCAL, and SHIM_LOCLIST_PEER socket options need to
handle one or more locator information. Locator information includes handle one or more locator information. Locator information includes
not only the locator itself but also additional information about the not only the locator itself but also additional information about the
locator which is useful for locator management. A new data structure locator which is useful for locator management. A new data structure
is defined to serve as a placeholder for the locator information. is defined to serve as a placeholder for the locator information.
Figure 4 illustrates the data structure called shim_locator which Figure 4 illustrates the data structure called shim_locator which
stores a locator information. stores a locator information.
struct shim_locator { struct shim_locator {
uint8_t lc_family; /* address family */ uint8_t lc_family; /* address family */
uint8_t lc_ifidx; /* interface index */ uint8_t lc_proto; /* protocol */
uint8_t lc_flags; /* flags */ uint16_t lc_port; /* port number */
uint8_t lc_preference; /* preference value */ uint16_t lc_flags; /* flags */
uint8_t lc_addr[16]; /* address data */ uint16_t lc_pref; /* preference value */
uint32_t lc_ifidx; /* interface index */
struct in6_addr lc_addr; /* address */
}; };
Figure 4: shim locator structure Figure 4: shim locator structure
lc_family lc_family
Address family of the locator (e.g. AF_INET, AF_INET6). It is Address family of the locator (e.g. AF_INET, AF_INET6). It is
required that the parameter contains non-zero value indicating the required that the parameter contains non-zero value indicating the
exact address family of the locator. exact address family of the locator.
lc_ifidx lc_proto
Interface index of the network interface to which the locator is Internet Protocol number for the protocol which is used to handle
assigned. This field should be valid only in a read locator behind NAT. Typically, this value is set as UDP (17) when
(getsockopt()) operation. the locator is a UDP encapsulation interface.
lc_port
Port number which is used for handling locator behind NAT.
lc_flags lc_flags
Each bit of the flags represents a specific characteristics of the Each bit of the flags represents a specific characteristics of the
locator. Hash Based Address (HBA) is defined as 0x01. locator. Hash Based Address (HBA) is defined as 0x01.
Cryptographically Generated Address (CGA) is defined as 0x02. Cryptographically Generated Address (CGA) is defined as 0x02.
lc_preference
Indicates a preference of the locator. The preference is
represented by an integer.
lc_pref
Preference of the locator. The preference is represented by an
integer.
lc_ifidx
Interface index of the network interface to which the locator is
assigned. This field should be valid only in a read
(getsockopt()) operation.
lc_addr lc_addr
Contains the locator. In the case where a locator whose size is Contains the locator. In the case where a locator whose size is
smaller than 16 bytes, an encoding rule should be provided for smaller than 16 bytes, an encoding rule should be provided for
each locator of a given address family. For instance, in case of each locator of a given address family. For instance, in case of
AF_INET (IPv4), the locator should be in the format of an IPv4- AF_INET (IPv4), the locator should be in the format of an IPv4-
mapped IPv6 address as defined in RFC 4291[RFC4291]. mapped IPv6 address as defined in [RFC4291].
7.1.1. Handling Locator behind NAT
Note that the locator information MAY contain a locator behind a
Network Address Translator (NAT). Such a situation may arise when
the host is behind the NAT and uses a local address as a source
locator to communicate with the peer. Note that a NAT traversal
mechanism for HIP is defined, which allows HIP host to tunnel control
and data traffic over UDP[I-D.ietf-hip-nat-traversal]. Note also
that the locator behind NAT is not necessarily an IPv4 address but it
can be an IPv6 address. Below is an example where the application
sets a UDP encapsulation interface as a source locator when sending
IP packets.
struct shim_locator locator;
struct in6_addr ia6;
/* copy the private IPv4 address to the ia6 as an IPv4-mapped
IPv6 address */
memset(&locator, 0, sizeof(locator));
/* fill shim_locator data structure */
locator.lc_family = AF_INET;
locator.lc_proto = IPPROTO_UDP;
locator.lc_port = 50500;
locator.lc_flags = 0;
locator.lc_pref = 0;
locator.lc_ifidx = 3;
memcpy(&locator.lc_addr, &ia6, sizeof(ia6));
setsockopt(fd, SOL_SHIM, SHIM_LOC_LOCAL_SEND, &locator,
sizeof(locator));
Figure 5: Handling locator behind NAT
7.2. Path Exploration Parameter 7.2. Path Exploration Parameter
As defined in Section 5, SHIM_PATHEXPLORE allows application to set As defined in Section 5, SHIM_PATHEXPLORE allows application to set
or read the parameters for path exploration and failure detection. A or read the parameters for path exploration and failure detection. A
new data structure called shim_pathexplore is defined to store the new data structure called shim_pathexplore is defined to store the
necessary parameters. Figure 5 illustrates the data structure. The necessary parameters. Figure 6 illustrates the data structure. The
data structure can be passed to getsockopt() or setsockopt() as an data structure can be passed to getsockopt() or setsockopt() as an
argument. argument.
struct shim_pathexplore { struct shim_pathexplore {
uint8_t pe_probenum; /* # of initial probe */ uint8_t pe_probenum; /* # of initial probe */
uint8_t pe_keepaliveto; /* Keepalive Timeout */ uint8_t pe_keepaliveto; /* Keepalive Timeout */
uint16_t pe_initprobeto; /* Initial Probe Timeout */ uint16_t pe_initprobeto; /* Initial Probe Timeout */
uint32_t pe_reserved; /* reserved */ uint32_t pe_reserved; /* reserved */
}; };
Figure 5: path explore structure Figure 6: path explore structure
pe_probenum pe_probenum
Indicates the number of initial probe messages to be sent. Indicates the number of initial probe messages to be sent.
Default value of this parameter should follow what is specified in Default value of this parameter should follow what is specified in
[I-D.ietf-shim6-failure-detection]. [I-D.ietf-shim6-failure-detection].
pe_keepaliveto pe_keepaliveto
Indicates timeout value for detecting a failure when the host does Indicates timeout value for detecting a failure when the host does
not receive any packets for a certain period of time while there not receive any packets for a certain period of time while there
is outbound traffic. When the timer expires, path exploration is outbound traffic. When the timer expires, path exploration
procedure will be carried out by sending a REAP Probe message. procedure will be carried out by sending a REAP Probe message.
skipping to change at page 29, line 7 skipping to change at page 30, line 47
milliseconds. Note that this timer is applied before exponential milliseconds. Note that this timer is applied before exponential
back-off is started. A REAP Probe message for the same locator back-off is started. A REAP Probe message for the same locator
pair may be retransmitted. Default value of this parameter should pair may be retransmitted. Default value of this parameter should
follow what is specified in [I-D.ietf-shim6-failure-detection]. follow what is specified in [I-D.ietf-shim6-failure-detection].
pe_reserved pe_reserved
A reserved field for future extension. By default, the field A reserved field for future extension. By default, the field
should be initialized to zero. should be initialized to zero.
7.3. Feedback Information 7.3. Feedback Information
As mentioned in Section 6.3, applications can inform the shim layer As mentioned in Section 6.3, applications can inform the shim sub-
about the status of unicast reachability of the locator pair layer about the status of unicast reachability of the locator pair
currently in use. The feedback information can be handled by using currently in use. The feedback information can be handled by using
ancillary data called SHIM_FEEDBACK. A new data structure named ancillary data called SHIM_FEEDBACK. A new data structure named
shim_feedback is illustrated in Figure 6. shim_feedback is illustrated in Figure 7.
struct shim_feedback { struct shim_feedback {
uint8_t fb_direction; /* direction of traffic */ uint8_t fb_direction; /* direction of traffic */
uint8_t fb_indicator; /* indicator (1-3) */ uint8_t fb_indicator; /* indicator (1-3) */
uint16_t fb_reserved; /* reserved */ uint16_t fb_reserved; /* reserved */
}; };
Figure 6: feedback information structure Figure 7: feedback information structure
direction direction
Indicates direction of reachability between a locator pair in Indicates direction of reachability between a locator pair in
question. A value 0 indicates outbound and a value 1 indicates question. A value 0 indicates outbound and a value 1 indicates
inbound direction. inbound direction.
indicator indicator
A value indicating the degree of satisfaction of a unidirectional A value indicating the degree of satisfaction of a unidirectional
reachability for a given locator pair. reachability for a given locator pair.
* 0: Default value. Whenever this value is specified the * 0: Default value. Whenever this value is specified the
feedback information must not be processed by the shim layer. feedback information must not be processed by the shim sub-
layer.
* 1: Unable to connect. There is no unidirectional reachability * 1: Unable to connect. There is no unidirectional reachability
between the locator pair in question. between the locator pair in question.
* 2: Unsatisfactory. The application is not satisfied with the * 2: Unsatisfactory. The application is not satisfied with the
unidirectional reachability between the locator pair in unidirectional reachability between the locator pair in
question. question.
* 3: Satisfactory. There is satisfactory unidirectional * 3: Satisfactory. There is satisfactory unidirectional
reachability between the locator pair in question. reachability between the locator pair in question.
reserved reserved
Reserved field. Must be ignored by the receiver. Reserved field. Must be ignored by the receiver.
skipping to change at page 30, line 7 skipping to change at page 31, line 48
The socket options for requesting specific locators to be used for a The socket options for requesting specific locators to be used for a
given transaction (SHIM_LOC_LOCAL_PREF and SHIM_LOC_PEER_PREF) are given transaction (SHIM_LOC_LOCAL_PREF and SHIM_LOC_PEER_PREF) are
semantically similar to the existing sockets API (IPV6_PKTINFO). The semantically similar to the existing sockets API (IPV6_PKTINFO). The
socket options for obtaining the locator information from the socket options for obtaining the locator information from the
received IP packet (SHIM_LOC_LOCAL_RECV and SHIM_LOC_PEER_RECV) are received IP packet (SHIM_LOC_LOCAL_RECV and SHIM_LOC_PEER_RECV) are
semantically similar to the existing sockets API (IP_RECVDSTADDR and semantically similar to the existing sockets API (IP_RECVDSTADDR and
IPV6_PKTINFO). IPV6_PKTINFO).
In IPv4, application can obtain the destination IP address of the In IPv4, application can obtain the destination IP address of the
received IP packet (IP_RECVDSTADDR). If the shim layer performs received IP packet (IP_RECVDSTADDR). If the shim sub-layer performs
identifier/locator adaptation for the received packet, the identifier/locator adaptation for the received packet, the
destination EID should be stored in the ancillary data destination EID should be stored in the ancillary data
(IP_RECVDSTADDR). (IP_RECVDSTADDR).
In IPv6, [RFC3542] defines that IPV6_PKTINFO can be used to specify In IPv6, [RFC3542] defines that IPV6_PKTINFO can be used to specify
source IPv6 address and the outgoing interface for outgoing packets, source IPv6 address and the outgoing interface for outgoing packets,
and retrieve destination IPv6 address and receiving interface for and retrieve destination IPv6 address and receiving interface for
incoming packets. This information is stored in ancillary data being incoming packets. This information is stored in ancillary data being
IPV6_PKTINFO specified as cmsg_type. Existing sockets API should IPV6_PKTINFO specified as cmsg_type. Existing sockets API should
continue to work above the shim layer, that is, the IP addresses continue to work above the shim sub-layer, that is, the IP addresses
handled in IPV6_PKTINFO should be EIDs, not the locators. handled in IPV6_PKTINFO should be EIDs, not the locators.
Baseline is that the above existing sockets API (IP_RECVDSTADDR and Baseline is that the above existing sockets API (IP_RECVDSTADDR and
IPV6_PKTINFO) is assumed to work above the multihoming shim layer. IPV6_PKTINFO) is assumed to work above the multihoming shim sub-
In other words, the IP addresses those socket options deal with are layer. In other words, the IP addresses those socket options deal
EIDs rather than locators. with are EIDs rather than locators.
9. Resolving Conflicts with Preference Values 9. Resolving Conflicts with Preference Values
Since the multihoming shim API allows application to specify Since the multihoming shim API allows application to specify
preference value for the context which is associated with the socket preference value for the context which is associated with the socket
instance, there may be a conflict with preference values specified by instance, there may be a conflict with preference values specified by
different applications. For instance, application A and B may different applications. For instance, application A and B may
establish communication over the same EID pair while both establish communication with the same EID pair while both
applications have different preference in their choice of local applications have different preference in their choice of local
locator. locator.
SHIM6 supports a notion of context forking in which a context is SHIM6 supports a notion of context forking in which a context is
split when there is a conflict with preference values specified by split when there is a conflict with preference values specified by
multiple applications. Thus, context forking can simply resolve the multiple applications. Thus, context forking can simply resolve the
conflicting situation which may be caused by the use of socket conflicting situation which may be caused by the use of socket
options for multihoming shim layer. options for multihoming shim sub-layer.
9.1. Implicit Forking 9.1. Implicit Forking
Socket options defined in Section 5 may cause conflicting situation Socket options defined in Section 5 may cause conflicting situation
when the target context is shared by multiple applications. In such when the target context is shared by multiple applications. In such
case, socket handler and the multihoming shim layer should react as case, socket handler should inform the shim sub-layer that context
follows; socket handler should inform the shim layer that context
forking is required. In SHIM6, when a context is forked, an unique forking is required. In SHIM6, when a context is forked, an unique
identifier called Forked Instance Identifier (FII) is assigned to the identifier called Forked Instance Identifier (FII) is assigned to the
newly forked context. The forked context is then exclusively newly forked context. The forked context is then exclusively
associated with the socket through which non-default preference value associated with the socket through which non-default preference value
was specified. The forked context is maintained by the multihoming was specified. The forked context is maintained by the multihoming
shim layer during the lifetime of associated socket instance. When shim sub-layer during the lifetime of associated socket instance.
the socket is closed, the multihoming shim layer SHOULD delete When the socket is closed, the multihoming shim sub-layer SHOULD
associated context. In this way, garbage collection can be carried delete associated context. In this way, garbage collection can be
out to cleanup unused forked contexts. Upon garbage collection, carried out to cleanup unused forked contexts. Upon garbage
every forked context SHOULD be checked if there is no socket collection, every forked context SHOULD be checked if there is no
(process) associated with the context. If there is none, the forked socket (process) associated with the context. If there is none, the
context should be deleted. When a forked context is torn down, SHIM6 forked context should be deleted. When a forked context is torn
should notify the peer about the deletion of forked context. down, SHIM6 should notify the peer about the deletion of forked
context.
As opposed to socket options, context forking MUST NOT be triggered As opposed to socket options, context forking MUST NOT be triggered
by any use of ancillary data that is specific to multihoming shim as by any use of ancillary data that is specific to multihoming shim as
defined in Section 6. defined in Section 6.
10. Discussion 10. Discussion
In this section, open issues are introduced. In this section, open issues are introduced.
10.1. Naming at Socket Layer 10.1. Naming at Socket Layer
skipping to change at page 31, line 35 skipping to change at page 33, line 27
the 'name' of an endpoint which is actually a pair of IP address and the 'name' of an endpoint which is actually a pair of IP address and
port number assigned to a given socket. getsockname() is used when an port number assigned to a given socket. getsockname() is used when an
application wants to obtain the local IP address and port number application wants to obtain the local IP address and port number
assigned for a given socket instance. getpeername() is used when an assigned for a given socket instance. getpeername() is used when an
application obtains the remote IP address and port number. application obtains the remote IP address and port number.
The above is based on a traditional system model of the sockets API The above is based on a traditional system model of the sockets API
where an IP address is expected to play both the role of identifier where an IP address is expected to play both the role of identifier
and the role of locator. and the role of locator.
In a system model where a shim layer exists inside the IP layer, both In a system model where a shim sub-layer exists inside the IP layer,
getsockname() and getpeername() deal with identifiers, namely EIDs. both getsockname() and getpeername() deal with identifiers, namely
In this sense, the shim layer serves to (1) hide locators and (2) EIDs. In this sense, the shim sub-layer serves to (1) hide locators
provide access to the identifier for the application over the legacy and (2) provide access to the identifier for the application over the
socket APIs. legacy socket APIs.
10.2. Additional Requirements from Applications 10.2. Additional Requirements from Applications
At the moment, it is not certain if following requirements are common At the moment, it is not certain if following requirements are common
in all the multihomed environments (SHIM6 and HIP). These are mainly in all the multihomed environments (SHIM6 and HIP). These are mainly
identified during discussions made on SHIM6 WG mailing list. identified during discussions made on SHIM6 WG mailing list.
o The application should be able to set preferences for the o The application should be able to set preferences for the
locators, local and remote ones, and also to the preferences of locators, local and remote ones, and also to the preferences of
the local locators that will be passed to the peer. the local locators that will be passed to the peer.
10.3. Issues of Header Conversion among Different Address Family 10.3. Issues of Header Conversion among Different Address Family
The shim layer performs identifier/locator adaptation. Therefore, in The shim sub-layer performs identifier/locator adaptation.
some case, the whole IP header can be replaced with new IP header of Therefore, in some cases, the whole IP header can be replaced with
a different address family (e.g. conversion from IPv4 to IPv6 or vice new IP header of a different address family (e.g. conversion from
versa). Hence, there is an issue how to make the conversion with IPv4 to IPv6 or vice versa). Hence, there is an issue how to make
minimum impact. Note that this issue is common in other protocol the conversion with minimum impact. Note that this issue is common
conversion such as SIIT[RFC2765]. in other protocol conversion such as SIIT[RFC2765].
As addressed in SIIT specification, some of the features (IPv6 As addressed in SIIT specification, some of the features (IPv6
routing headers, hop-by-hop extension headers, or destination routing headers, hop-by-hop extension headers, or destination
headers) from IPv6 are not convertible to IPv4. In addition, notion headers) from IPv6 are not convertible to IPv4. In addition, notion
of source routing is not exactly the same in IPv4 and IPv6. Hence, of source routing is not exactly the same in IPv4 and IPv6. Hence,
there is certain limitation in protocol conversion between IPv4 and there is a certain limitation in protocol conversion between IPv4 and
IPv6. IPv6.
The question is how should the shim layer behave when it is face with The question is how should the shim sub-layer behave when it faces
limitation problem of protocol conversion. Should we introduce new with limitation problem of protocol conversion. Should we introduce
error something like ENOSUITABLELOCATOR ? new error something like ENOSUITABLELOCATOR ?
10.4. Handling of Unknown Locator Provided by Application 10.4. Handling of Unknown Locator Provided by Application
There might be a case where application provides the shim layer new There might be a case where application provides the shim layer new
locator with the SHIM_LOC_*_PREF socket options or SHIM_LOC_*_SEND locator with the SHIM_LOC_*_PREF socket options or SHIM_LOC_*_SEND
ancillary data. Then there is a question how should the shim layer ancillary data. Then there is a question how should the shim sub-
treat the new locator informed by the application. layer treat the new locator informed by the application.
In principle, locator information are exchanged by the shim protocol. In principle, locator information are exchanged by the shim protocol.
However, there might be a case where application acquires information However, there might be a case where application acquires information
about the locator and prefers to use it for its communication. about the locator and prefers to use it for its communication.
11. Changes 11. Changes
11.1. Changes from version 00 to version 01 11.1. Changes from version 00 to version 01
The followings are changes from version 00 to version 01: The followings are changes from version 00 to version 01:
skipping to change at page 33, line 47 skipping to change at page 35, line 37
11.7. Changes from version 06 to version 07 11.7. Changes from version 06 to version 07
The followings are changes from version 06 to version 07: The followings are changes from version 06 to version 07:
o Resolved editorial issues. o Resolved editorial issues.
11.8. Changes from version 07 to version 08 11.8. Changes from version 07 to version 08
No changes are made except for updates of the references. No changes are made except for updates of the references.
11.9. Changes from version 08 to version 09
The followings are changes from version 08 to version 09:
o Updated texts for Section 1 and Section 5 according to the
comments provided by Samu Varjonen.
o Made it clear that downgrading the multihome shim support (i.e.,
specifying value 1 with the SHIM_DONTSHIM socket option) is only
allowed before the socket is connected.
o Updated locator information (shim_locator{}) so that it can
contain a locator behind NAT.
12. IANA Considerations 12. IANA Considerations
This document contains no IANA consideration. This document contains no IANA consideration.
13. Security Considerations 13. Security Considerations
This document does not specify any security mechanism for the shim This document does not specify any security mechanism for the shim
layer. Fundamentally, the shim layer has a potential to impose sub-layer. Fundamentally, the shim sub-layer has a potential to
security threats, as it changes the source and/or destination IP impose security threats, as it changes the source and/or destination
addresses of the IP packet being sent or received. Therefore, the IP addresses of the IP packet being sent or received. Therefore, the
basic assumption is that the security mechanism defined in each basic assumption is that the security mechanism defined in each
protocol of the shim layer is strictly applied. protocol of the shim sub-layer is strictly applied.
14. Conclusion 14. Conclusion
In this document, the Application Program Interface (API) for In this document, the Application Program Interface (API) for
multihoming shim layer is specified. The sockets API allows multihoming shim sub-layer is specified. The sockets API allows
applications to have additional control of the locator management and applications to have additional control of the locator management and
interface to the REAP mechanism inside the multihoming shim layer. interface to the REAP mechanism inside the multihoming shim sub-
layer.
Socket options for multihoming shim layer can be used by getsockopt() Socket options for multihoming shim sub-layer can be used by
and/or setsockopt() system calls. Besides, applications can use some getsockopt() and/or setsockopt() system calls. Besides, applications
ancillary data that are specific to multihoming shim layer to get can use some ancillary data that are specific to multihoming shim
locator from received packet or to set locator for outgoing packet. sub-layer to get locator from received packet or to set locator for
outgoing packet.
From an architectural point of view, the sockets API provides extends From an architectural point of view, the sockets API provides extends
the existing sockets API framework in the face of ID/Locator the existing sockets API framework in the face of ID/Locator
separation. With regard to API that relate to IP address management, separation. With regard to API that relate to IP address management,
it is assured that existing sockets API continue to work above the it is assured that existing sockets API continue to work above the
shim layer dealing with identifiers, while multihoming shim API deals shim sub-layer dealing with identifiers, while multihoming shim API
with locators. deals with locators.
15. Acknowledgments 15. Acknowledgments
Authors would like to thank Jari Arkko who participated in the Authors would like to thank Jari Arkko who participated in the
discussion that lead to the first version of this document, and discussion that lead to the first version of this document, and
Tatuya Jinmei who thoroughly reviewed the early version of this draft Tatuya Jinmei who thoroughly reviewed the early version of this draft
and provided detailed comments on sockets API related issues. Thomas and provided detailed comments on sockets API related issues. Thomas
Henderson provided valuable comments especially from HIP Henderson provided valuable comments especially from HIP
perspectives. perspectives.
Authors sincerely thank to the following people for their help to
improve this document: Samu Varjonen and Dmitriy Kuptsov.
16. References 16. References
16.1. Normative References 16.1. Normative References
[I-D.ietf-shim6-failure-detection] [I-D.ietf-shim6-failure-detection]
Arkko, J. and I. Beijnum, "Failure Detection and Locator Arkko, J. and I. Beijnum, "Failure Detection and Locator
Pair Exploration Protocol for IPv6 Multihoming", Pair Exploration Protocol for IPv6 Multihoming",
draft-ietf-shim6-failure-detection-13 (work in progress), draft-ietf-shim6-failure-detection-13 (work in progress),
June 2008. June 2008.
skipping to change at page 35, line 25 skipping to change at page 37, line 32
[RFC3542] Stevens, W., Thomas, M., Nordmark, E., and T. Jinmei, [RFC3542] Stevens, W., Thomas, M., Nordmark, E., and T. Jinmei,
"Advanced Sockets Application Program Interface (API) for "Advanced Sockets Application Program Interface (API) for
IPv6", RFC 3542, May 2003. IPv6", RFC 3542, May 2003.
[RFC4423] Moskowitz, R. and P. Nikander, "Host Identity Protocol [RFC4423] Moskowitz, R. and P. Nikander, "Host Identity Protocol
(HIP) Architecture", RFC 4423, May 2006. (HIP) Architecture", RFC 4423, May 2006.
16.2. Informative References 16.2. Informative References
[I-D.ietf-hip-nat-traversal]
Komu, M., Henderson, T., Tschofenig, H., Melen, J., and A.
Keranen, "Basic HIP Extensions for Traversal of Network
Address Translators", Internet
Draft draft-ietf-hip-nat-traversal-08, June 2009.
[I-D.ietf-shim6-app-refer] [I-D.ietf-shim6-app-refer]
Nordmark, E., "Shim6 Application Referral Issues", Nordmark, E., "Shim6 Application Referral Issues",
draft-ietf-shim6-app-refer-00 (work in progress), draft-ietf-shim6-app-refer-00 (work in progress),
July 2005. July 2005.
[I-D.ietf-shim6-hba] [I-D.ietf-shim6-hba]
Bagnulo, M., "Hash Based Addresses (HBA)", Bagnulo, M., "Hash Based Addresses (HBA)",
draft-ietf-shim6-hba-05 (work in progress), December 2007. draft-ietf-shim6-hba-05 (work in progress), December 2007.
[RFC2765] Nordmark, E., "Stateless IP/ICMP Translation Algorithm [RFC2765] Nordmark, E., "Stateless IP/ICMP Translation Algorithm
skipping to change at page 36, line 16 skipping to change at page 38, line 28
A peer who has decided to fork a context initiates the context A peer who has decided to fork a context initiates the context
establishment. Hereafter, we call this peer initiator. establishment. Hereafter, we call this peer initiator.
Once the forked context is established between the peers, on the Once the forked context is established between the peers, on the
initiator side, it is possible to apply forked context to the packet initiator side, it is possible to apply forked context to the packet
flow since the system maintains an association between the forked flow since the system maintains an association between the forked
context and the socket owned by the application that has requested context and the socket owned by the application that has requested
the context forking. How this association is maintained is the context forking. How this association is maintained is
implementation specific issue. However, on the responder side, there implementation specific issue. However, on the responder side, there
is a question on how the outbound packet can be multiplexed by the is a question on how the outbound packet can be multiplexed by the
shim layer. Since there are more than one SHIM6 contexts that match shim sub-layer. Since there are more than one SHIM6 contexts that
with the ULID pair of the packet flow. There is a need to match with the ULID pair of the packet flow. There is a need to
differentiate packet flows not only by the ULID pairs but some other differentiate packet flows not only by the ULID pairs but some other
information and associate a given packet flow with specific context. information and associate a given packet flow with specific context.
Figure 7 gives an example of a scenario where two communicating peers Figure 8 gives an example of a scenario where two communicating peers
fork a context. Initially, there has been a single transaction fork a context. Initially, there has been a single transaction
between the peers, by the application 1 (App1). Accordingly, another between the peers, by the application 1 (App1). Accordingly, another
transaction is started, by application 2 (App2). Both of the transaction is started, by application 2 (App2). Both of the
transactions are made based the same ULID pair. The first context transactions are made based the same ULID pair. The first context
pair (Ctx1) is established for the transaction of App1. Given the pair (Ctx1) is established for the transaction of App1. Given the
requests from App2, the shim layer on Peer 1 decides to fork a requests from App2, the shim sub-layer on Peer 1 decides to fork a
context. Accordingly, a forked context (Ctx2) is established between context. Accordingly, a forked context (Ctx2) is established between
the peers, which should be exclusively applied to the transaction of the peers, which should be exclusively applied to the transaction of
App2. Ideally, multiplexing and demultiplexing of packet flows that App2. Ideally, multiplexing and demultiplexing of packet flows that
relate to App1 and App2 should be done as illustrated in Figure 7. relate to App1 and App2 should be done as illustrated in Figure 8.
However, as mentioned earlier, the responder needs to multiplex However, as mentioned earlier, the responder needs to multiplex
outbound flows of App1 and App2 somehow. Note that if a context outbound flows of App1 and App2 somehow. Note that if a context
forking occurs on the initiator side, a context forking needs to forking occurs on the initiator side, a context forking needs to
occur also on the responder side. occur also on the responder side.
Peer 1 Peer 2 Peer 1 Peer 2
(initiator) (responder) (initiator) (responder)
+----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+
|App1| |App2| |App1| |App2| |App1| |App2| |App1| |App2|
skipping to change at page 37, line 25 skipping to change at page 39, line 25
|| || || || || || || ||
Ctx1 Ctx2 Ctx1 Ctx2 Ctx1 Ctx2 Ctx1 Ctx2
ULID:<A1,B1> ULID:<A1,B1> ULID:<B1,A1> ULID:<B1,A1> ULID:<A1,B1> ULID:<A1,B1> ULID:<B1,A1> ULID:<B1,A1>
Loc: <A1,B2> Loc: <A1,B3> Loc: <B2,A1> Loc: <B3,A1> Loc: <A1,B2> Loc: <A1,B3> Loc: <B2,A1> Loc: <B3,A1>
FII: 0 FII: 100 FII: 0 FII: 100 FII: 0 FII: 100 FII: 0 FII: 100
|^ |^ ^| ^| |^ |^ ^| ^|
|| || || || || || || ||
|| || || || || || || ||
\..............||........................../| || \..............||....................../| ||
\.............||.........................../ || \.............||......................./ ||
|| || || ||
\|........................................./| \|...................................../|
\........................................../ \....................................../
Figure 7: context forking Figure 8: context forking
To overcome the problem mentioned above, there are some solutions. To overcome the problem mentioned above, there are some solutions.
One viable approach is to let the system implicitly maintain an One viable approach is to let the system implicitly maintain an
association between the socket and the associated context by keeping association between the socket and the associated context by keeping
the record of inbound packet processing. That is, the system stores the record of inbound packet processing. That is, the system stores
the information about the context on which the inbound packet flow the information about the context on which the inbound packet flow
was demultiplexed. The information comprises the ULID pair and FII was demultiplexed. The information comprises the ULID pair and FII
of the context and is stored in the socket instance. Later, the of the context and is stored in the socket instance. Later, the
system can use the information to identify the associated context in system can use the information to identify the associated context in
skipping to change at page 38, line 4 skipping to change at page 40, line 4
as there is bi-directional user traffic. as there is bi-directional user traffic.
Another viable approach is to extend SHIM6 protocol by adding Another viable approach is to extend SHIM6 protocol by adding
capability of exchanging additional information to identify the capability of exchanging additional information to identify the
packet flow from others which needs to be handled by a newly forked packet flow from others which needs to be handled by a newly forked
context. The information exchange can be done during the context context. The information exchange can be done during the context
establishment. The initiator appends 5 tuple of the packet flow to establishment. The initiator appends 5 tuple of the packet flow to
be handled by the newly forked context. Note that the additional be handled by the newly forked context. Note that the additional
information provided by the 5 tuple are source and destination port information provided by the 5 tuple are source and destination port
numbers and upper layer protocol. The information is later used by numbers and upper layer protocol. The information is later used by
the shim layer to multiplex the outbound packet flow on the responder the shim sub-layer to multiplex the outbound packet flow on the
side. responder side.
The socket options for multihoming shim can be used by the The socket options for multihoming shim can be used by the
application to trigger the context forking in implicit manner. The application to trigger the context forking in implicit manner. The
peer becomes an initiator in the establishment of the forked context. peer becomes an initiator in the establishment of the forked context.
Once the forked context is established between the peers, application Once the forked context is established between the peers, application
on each end can influence the preference on context by utilizing the on each end can influence the preference on context by utilizing the
multihoming shim API. multihoming shim API.
Authors' Addresses Authors' Addresses
 End of changes. 148 change blocks. 
400 lines changed or deleted 483 lines changed or added

This html diff was produced by rfcdiff 1.35. The latest version is available from http://tools.ietf.org/tools/rfcdiff/