10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*3431Scarlsonj * Common Development and Distribution License (the "License"). 6*3431Scarlsonj * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*3431Scarlsonj * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _DHCP_HOSTCONF_H 270Sstevel@tonic-gate #define _DHCP_HOSTCONF_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 300Sstevel@tonic-gate 310Sstevel@tonic-gate #include <sys/types.h> 320Sstevel@tonic-gate #include <time.h> 330Sstevel@tonic-gate #include <netinet/in.h> 340Sstevel@tonic-gate #include <netinet/dhcp.h> 35*3431Scarlsonj #include <netinet/dhcp6.h> 360Sstevel@tonic-gate #include <dhcp_impl.h> 370Sstevel@tonic-gate 380Sstevel@tonic-gate /* 390Sstevel@tonic-gate * dhcp_hostconf.[ch] provide an API to the /etc/dhcp/<if>.dhc files. 400Sstevel@tonic-gate * see dhcp_hostconf.c for documentation on how to use the exported 410Sstevel@tonic-gate * functions. 420Sstevel@tonic-gate */ 430Sstevel@tonic-gate 440Sstevel@tonic-gate #ifdef __cplusplus 450Sstevel@tonic-gate extern "C" { 460Sstevel@tonic-gate #endif 470Sstevel@tonic-gate 48*3431Scarlsonj #define DHCP_HOSTCONF_MAGIC 0x44484301 /* hex "DHC\1" */ 49*3431Scarlsonj #define DHCP_HOSTCONF_MAGIC6 0x44484302 /* hex "DHC\2" */ 500Sstevel@tonic-gate #define DHCP_HOSTCONF_PREFIX "/etc/dhcp/" 510Sstevel@tonic-gate #define DHCP_HOSTCONF_SUFFIX ".dhc" 52*3431Scarlsonj #define DHCP_HOSTCONF_SUFFIX6 ".dh6" 530Sstevel@tonic-gate #define DHCP_HOSTCONF_TMPL DHCP_HOSTCONF_PREFIX DHCP_HOSTCONF_SUFFIX 54*3431Scarlsonj #define DHCP_HOSTCONF_TMPL6 DHCP_HOSTCONF_PREFIX DHCP_HOSTCONF_SUFFIX6 550Sstevel@tonic-gate 56*3431Scarlsonj extern char *ifname_to_hostconf(const char *, boolean_t); 57*3431Scarlsonj extern int remove_hostconf(const char *, boolean_t); 58*3431Scarlsonj extern int read_hostconf(const char *, PKT_LIST **, uint_t, boolean_t); 59*3431Scarlsonj extern int write_hostconf(const char *, PKT_LIST **, uint_t, time_t, 60*3431Scarlsonj boolean_t); 610Sstevel@tonic-gate 620Sstevel@tonic-gate #ifdef __cplusplus 630Sstevel@tonic-gate } 640Sstevel@tonic-gate #endif 650Sstevel@tonic-gate 660Sstevel@tonic-gate #endif /* _DHCP_HOSTCONF_H */ 67