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) 2001, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _DHCP_SVC_CONFOPT_H
2N/A#define _DHCP_SVC_CONFOPT_H
2N/A
2N/A/*
2N/A * Contains SMI-private interfaces to /etc/inet/dhcpsvc.conf file. DO NOT SHIP!
2N/A */
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <sys/types.h>
2N/A
2N/A#define DHCP_CONFOPT_FILE "/etc/inet/dhcpsvc.conf"
2N/A
2N/Aenum dhcp_confopt {
2N/A DHCP_END, /* final entry, must be 0 */
2N/A DHCP_KEY, /* key / value form */
2N/A DHCP_COMMENT /* comment form */
2N/A};
2N/A
2N/A/*
2N/A * Records in the /etc/inet/dhcpsvc.conf file are of key=value form. Comments
2N/A * begin a line with '#', and end with newline (\n). See dhcpsvc(4) for more
2N/A * details. This structure is used to represent them within a program.
2N/A */
2N/A
2N/Atypedef struct {
2N/A enum dhcp_confopt co_type;
2N/A char *co_key; /* identifier */
2N/A char *co_value; /* data */
2N/A} dhcp_confopt_t;
2N/A#define co_comment co_key /* key doubles as comment */
2N/A
2N/Aextern int add_dsvc_conf(dhcp_confopt_t **, const char *, const char *);
2N/Aextern int read_dsvc_conf(dhcp_confopt_t **);
2N/Aextern int replace_dsvc_conf(dhcp_confopt_t **, const char *,
2N/A const char *);
2N/Aextern int write_dsvc_conf(dhcp_confopt_t *, mode_t);
2N/Aextern void free_dsvc_conf(dhcp_confopt_t *);
2N/Aextern int delete_dsvc_conf(void);
2N/Aextern int query_dsvc_conf(dhcp_confopt_t *, const char *, char **);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* !_DHCP_SVC_CONFOPT_H */