/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/*
* This code is conformant to revision 7 of 2292bis. Some of these functions
* were provided (named inet6_rthdr_) in a very similar form in RFC 2292.
* The RFC 2292 variants are not supported.
*/
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
/*
* Return amount of space needed to hold N segments for the specified
* routing type. Does NOT include space for cmsghdr.
*/
{
return (0);
return (sizeof (struct ip6_rthdr0) +
}
/*
* Initializes rthdr structure. Verifies the segments against the length of
* the buffer.
* Note that a routing header can only hold 127 segments since the length field
* in the header is just a byte.
*/
void *
{
return (NULL);
if (bp_len < sizeof (struct ip6_rthdr0) +
return (NULL);
return (bp);
}
/*
* Add one more address to the routing header. Fails when there is no more
* room.
*/
int
{
/* Not room for one more */
return (-1);
}
/* LINTED alignment */
return (0);
}
/*
* Reverse a source route. Both arguments can point to the same buffer.
*/
int
{
int i, segments;
return (-1);
/* LINTED alignment */
/* LINTED alignment */
tmp = rtin_addrs[i];
}
return (0);
}
/*
* Return the number of segments in the routing header.
*/
int
{
if (rthdr->ip6r0_type == 0) {
return (-1);
} else {
}
} else {
return (-1);
}
}
/*
* Return a pointer to an element in the source route.
* This uses the C convention for index [0, size-1].
*/
struct in6_addr *
{
return (NULL);
/* LINTED alignment */
}