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 ASYNC_H 270Sstevel@tonic-gate #define ASYNC_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 <libinetutil.h> 330Sstevel@tonic-gate #include <dhcpagent_ipc.h> 340Sstevel@tonic-gate 35*3431Scarlsonj #include "common.h" 36*3431Scarlsonj 370Sstevel@tonic-gate /* 380Sstevel@tonic-gate * async.[ch] comprise the interface used to handle asynchronous DHCP 390Sstevel@tonic-gate * commands. see ipc_event() in agent.c for more documentation on 400Sstevel@tonic-gate * the treatment of asynchronous DHCP commands. see async.c for 410Sstevel@tonic-gate * documentation on how to use the exported 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 typedef struct async_action { 49*3431Scarlsonj dhcp_ipc_type_t as_cmd; /* command/action in progress */ 50*3431Scarlsonj boolean_t as_user; /* user-generated async cmd */ 51*3431Scarlsonj boolean_t as_present; /* async operation present */ 52*3431Scarlsonj } async_action_t; 530Sstevel@tonic-gate 54*3431Scarlsonj boolean_t async_start(dhcp_smach_t *, dhcp_ipc_type_t, boolean_t); 55*3431Scarlsonj void async_finish(dhcp_smach_t *); 56*3431Scarlsonj boolean_t async_cancel(dhcp_smach_t *); 570Sstevel@tonic-gate 580Sstevel@tonic-gate #ifdef __cplusplus 590Sstevel@tonic-gate } 600Sstevel@tonic-gate #endif 610Sstevel@tonic-gate 620Sstevel@tonic-gate #endif /* ASYNC_H */ 63