2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _DHCP_HOSTCONF_H
2N/A#define _DHCP_HOSTCONF_H
2N/A
2N/A#include <sys/types.h>
2N/A#include <time.h>
2N/A#include <netinet/in.h>
2N/A#include <netinet/dhcp.h>
2N/A#include <netinet/dhcp6.h>
2N/A#include <dhcp_impl.h>
2N/A
2N/A/*
2N/A * dhcp_hostconf.[ch] provide an API to the /var/dhcp/<if>.dhc files.
2N/A * see dhcp_hostconf.c for documentation on how to use the exported
2N/A * functions.
2N/A */
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#define DHCP_HOSTCONF_MAGIC 0x44484301 /* hex "DHC\1" */
2N/A#define DHCP_HOSTCONF_MAGIC6 0x44484302 /* hex "DHC\2" */
2N/A#define DHCP_HOSTCONF_PREFIX "/var/dhcp/"
2N/A#define DHCP_HOSTCONF_OLD_PREFIX "/etc/dhcp/"
2N/A#define DHCP_HOSTCONF_SUFFIX ".dhc"
2N/A#define DHCP_HOSTCONF_SUFFIX6 ".dh6"
2N/A#define DHCP_HOSTCONF_TMPL DHCP_HOSTCONF_PREFIX DHCP_HOSTCONF_SUFFIX
2N/A#define DHCP_HOSTCONF_TMPL6 DHCP_HOSTCONF_PREFIX DHCP_HOSTCONF_SUFFIX6
2N/A
2N/Aextern char *ifname_to_hostconf(const char *, boolean_t);
2N/Aextern int remove_hostconf(const char *, boolean_t);
2N/Aextern int read_hostconf(const char *, PKT_LIST **, uint_t, boolean_t);
2N/Aextern int write_hostconf(const char *, PKT_LIST **, uint_t, time_t,
2N/A boolean_t);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _DHCP_HOSTCONF_H */