588 Chapter 5—Mobile IPv6
the opts variable. A user needs to specify required information using the socket API if the
user wants to use packet information in the program. The ip6_savecontrol() function
is discussed in Chapter 7 of IPv6 Core Protocols Implementation, “Socket API Extensions.”
Before putting the Mobility Header message in the socket with the sbappendaddr()
function, the IPv6 header and other extension headers have to be removed by the
m_adj() function if it exists. The sbappendaddr() function appends the Mobility
Header message to the tail of the socket buffer which is bound to this PCB entry. To give a
user program the source address of a packet, the value of the fromsa variable is passed.
In addition, the saved packet information,