4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 #include <sys/types.h>
32 #include <netinet/in.h>
33 #include <netinet/dhcp.h>
34 #include <dhcpagent_ipc.h>
35 #include <libinetutil.h>
40 * ipc_action.[ch] make up the interface used to control the current
41 * pending interprocess communication transaction taking place. see
42 * ipc_action.c for documentation on how to use the exported functions.
49 typedef struct ipc_action
{
50 dhcp_ipc_type_t ia_cmd
; /* command/action requested */
51 int ia_fd
; /* ipc channel descriptor */
52 iu_timer_id_t ia_tid
; /* ipc timer id */
53 iu_event_id_t ia_eid
; /* ipc event ID */
54 dhcp_ipc_request_t
*ia_request
; /* ipc request pointer */
57 void ipc_action_init(ipc_action_t
*);
58 boolean_t
ipc_action_start(dhcp_smach_t
*, ipc_action_t
*);
59 void ipc_action_finish(dhcp_smach_t
*, int);
60 void send_error_reply(ipc_action_t
*, int);
61 void send_ok_reply(ipc_action_t
*);
62 void send_data_reply(ipc_action_t
*, int, dhcp_data_type_t
,
63 const void *, size_t);
69 #endif /* IPC_ACTION_H */