dhcp6.h revision d04ccbb3f3163ae5962a8b7465d9796bff6ca434
/*
* 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
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _DHCP6_H
#define _DHCP6_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This header file describes constants and on-the-wire data structures used
* with DHCPv6.
*
* Note that the data structures contained here must be used with caution. The
* DHCPv6 protocol generally does not maintain alignment.
*
* definitions, if the DHCPV6_{GET,SET} macros are used.)
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* Message Types
*/
/*
* Status Codes
*/
#define DHCPV6_STAT_SUCCESS 0
/*
* DHCP Unique Identifier (DUID) Types
*/
/*
* DHCPv6 Option Codes
* Note: options 10 and 35 are not assigned.
*/
/*
* Reconfiguration types; used with DHCPV6_OPT_RECONF_MSG option.
*/
/*
* FQDN Flags; used with DHCPV6_OPT_CLIENT_FQDN option.
*/
/*
* Miscellany
*/
/*
* options follow this header.
*/
struct dhcpv6_message {
};
#define DHCPV6_GET_TRANSID(msg) \
/*
* options follow this header, and the client message is encapsulated as an
* option. Note that the IPv6 addresses are not on natural word boundaries.
*/
struct dhcpv6_relay {
};
/*
* DHCPv6 generic option header. Note that options are not aligned on any
* convenient boundary.
*/
struct dhcpv6_option {
};
/*
* Option header for IA_NA (Non-temporary addresses) and IA_PD (Prefix
* delegation). Contains IA Address options for IA_NA, IA_PD Prefixes for
* IA_PD.
*/
struct dhcpv6_ia_na {
};
/*
* Option header for IA_TA (Temporary addresses). Contains IA Address options.
*/
struct dhcpv6_ia_ta {
};
/*
* Option header for IA Address. Must be used inside of an IA_NA or IA_TA
* option. May contain a Status Code option.
*/
struct dhcpv6_iaaddr {
};
/*
* Option header for Authentication. Followed by variable-length
* authentication information field. Warning: padding may be present. Use
* defined size.
*/
struct dhcpv6_auth {
};
#define DHCPV6_AUTH_SIZE 15
/* dhpv6_auth.d6a_proto values */
/* dhpv6_auth.d6a_alg values */
/* dhpv6_auth.d6a_rdm values */
#define DHCPV6_RDM_MONOCNT 0 /* Monotonic counter */
/*
* Option header for IA_PD Prefix. Must be used inside of an IA_PD option.
* May contain a Status Code option. Warning: padding may be present; use
* defined size.
*/
struct dhcpv6_iaprefix {
};
#define DHCPV6_IAPREFIX_SIZE 29
/*
* Option header for Civic Address information. Followed by single octet TLV
* encoded address elements, using CIVICADDR_* values for type. Warning:
* padding may be present; use defined size.
*/
struct dhcpv6_civic {
};
#define DHCPV6_CIVIC_SIZE 7
#define DHCPV6_CWHAT_SERVER 0 /* Location of server */
#define CIVICADDR_LANG 0 /* Language; RFC 2277 */
/*
* DHCP Unique Identifier structures. These represent the fixed portion of the
* unique identifier object, and are followed by the variable-length link layer
* address or identifier.
*/
struct duid_llt {
};
/* DUID time stamps start on January 1st, 2000 UTC */
#define DUID_TIME_BASE 946684800ul
struct duid_en {
};
#define DHCPV6_GET_ENTNUM(den) \
struct duid_ll {
};
/*
* Data types
*/
typedef struct dhcpv6_message dhcpv6_message_t;
typedef struct dhcpv6_relay dhcpv6_relay_t;
typedef struct dhcpv6_option dhcpv6_option_t;
typedef struct dhcpv6_ia_na dhcpv6_ia_na_t;
typedef struct dhcpv6_ia_ta dhcpv6_ia_ta_t;
typedef struct dhcpv6_iaaddr dhcpv6_iaaddr_t;
typedef struct dhcpv6_auth dhcpv6_auth_t;
typedef struct dhcpv6_iaprefix dhcpv6_iaprefix_t;
typedef struct dhcpv6_civic dhcpv6_civic_t;
typedef struct duid_llt duid_llt_t;
#ifdef __cplusplus
}
#endif
#endif /* _DHCP6_H */