1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the
| 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the
|
5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License.
| 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License.
|
8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22/*
| 7 * 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. 12 * 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] 18 * 19 * CDDL HEADER END 20 */ 21/*
|
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
| 22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
|
24 * Use is subject to license terms. 25 */ 26 27#ifndef IPC_ACTION_H 28#define IPC_ACTION_H 29 30#pragma ident "%Z%%M% %I% %E% SMI" 31 32#include <sys/types.h> 33#include <netinet/in.h> 34#include <netinet/dhcp.h> 35#include <dhcpagent_ipc.h> 36#include <libinetutil.h> 37
| 23 * Use is subject to license terms. 24 */ 25 26#ifndef IPC_ACTION_H 27#define IPC_ACTION_H 28 29#pragma ident "%Z%%M% %I% %E% SMI" 30 31#include <sys/types.h> 32#include <netinet/in.h> 33#include <netinet/dhcp.h> 34#include <dhcpagent_ipc.h> 35#include <libinetutil.h> 36
|
38#include "agent.h"
| 37#include "common.h"
|
39 40/* 41 * ipc_action.[ch] make up the interface used to control the current 42 * pending interprocess communication transaction taking place. see 43 * ipc_action.c for documentation on how to use the exported functions. 44 */ 45 46#ifdef __cplusplus 47extern "C" { 48#endif 49
| 38 39/* 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. 43 */ 44 45#ifdef __cplusplus 46extern "C" { 47#endif 48
|
50struct ifslist; /* forward declaration */ 51 52void ipc_action_init(struct ifslist *); 53int ipc_action_start(struct ifslist *, dhcp_ipc_request_t *, int); 54void ipc_action_finish(struct ifslist *, int); 55boolean_t ipc_action_pending(struct ifslist *); 56void ipc_action_cancel_timer(struct ifslist *); 57 58 59struct ipc_action { 60
| 49typedef struct ipc_action {
|
61 dhcp_ipc_type_t ia_cmd; /* command/action requested */ 62 int ia_fd; /* ipc channel descriptor */ 63 iu_timer_id_t ia_tid; /* ipc timer id */
| 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 */
|
64 dhcp_ipc_request_t *ia_request; /* ipc request pointer */
| 54 dhcp_ipc_request_t *ia_request; /* ipc request pointer */
|
65};
| 55} ipc_action_t;
|
66
| 56
|
| 57void ipc_action_init(ipc_action_t *); 58boolean_t ipc_action_start(dhcp_smach_t *, ipc_action_t *); 59void ipc_action_finish(dhcp_smach_t *, int); 60void send_error_reply(ipc_action_t *, int); 61void send_ok_reply(ipc_action_t *); 62void send_data_reply(ipc_action_t *, int, dhcp_data_type_t, 63 const void *, size_t); 64
|
67#ifdef __cplusplus 68} 69#endif 70 71#endif /* IPC_ACTION_H */
| 65#ifdef __cplusplus 66} 67#endif 68 69#endif /* IPC_ACTION_H */
|