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 IPC_ACTION_H 270Sstevel@tonic-gate #define IPC_ACTION_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 <netinet/in.h> 330Sstevel@tonic-gate #include <netinet/dhcp.h> 340Sstevel@tonic-gate #include <dhcpagent_ipc.h> 350Sstevel@tonic-gate #include <libinetutil.h> 360Sstevel@tonic-gate 37*3431Scarlsonj #include "common.h" 380Sstevel@tonic-gate 390Sstevel@tonic-gate /* 400Sstevel@tonic-gate * ipc_action.[ch] make up the interface used to control the current 410Sstevel@tonic-gate * pending interprocess communication transaction taking place. see 420Sstevel@tonic-gate * ipc_action.c for documentation on how to use the exported functions. 430Sstevel@tonic-gate */ 440Sstevel@tonic-gate 450Sstevel@tonic-gate #ifdef __cplusplus 460Sstevel@tonic-gate extern "C" { 470Sstevel@tonic-gate #endif 480Sstevel@tonic-gate 49*3431Scarlsonj typedef struct ipc_action { 500Sstevel@tonic-gate dhcp_ipc_type_t ia_cmd; /* command/action requested */ 510Sstevel@tonic-gate int ia_fd; /* ipc channel descriptor */ 520Sstevel@tonic-gate iu_timer_id_t ia_tid; /* ipc timer id */ 53*3431Scarlsonj iu_event_id_t ia_eid; /* ipc event ID */ 540Sstevel@tonic-gate dhcp_ipc_request_t *ia_request; /* ipc request pointer */ 55*3431Scarlsonj } ipc_action_t; 56*3431Scarlsonj 57*3431Scarlsonj void ipc_action_init(ipc_action_t *); 58*3431Scarlsonj boolean_t ipc_action_start(dhcp_smach_t *, ipc_action_t *); 59*3431Scarlsonj void ipc_action_finish(dhcp_smach_t *, int); 60*3431Scarlsonj void send_error_reply(ipc_action_t *, int); 61*3431Scarlsonj void send_ok_reply(ipc_action_t *); 62*3431Scarlsonj void send_data_reply(ipc_action_t *, int, dhcp_data_type_t, 63*3431Scarlsonj const void *, size_t); 640Sstevel@tonic-gate 650Sstevel@tonic-gate #ifdef __cplusplus 660Sstevel@tonic-gate } 670Sstevel@tonic-gate #endif 680Sstevel@tonic-gate 690Sstevel@tonic-gate #endif /* IPC_ACTION_H */ 70