ipc_action.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <dhcpmsg.h>
#include "interface.h"
#include "ipc_action.h"
#include "util.h"
static iu_tq_callback_t ipc_action_timeout;
/*
* ipc_action_init(): initializes the ipc_action structure
*
* input: struct ifslist *: the interface to initialize it for
* output: void
*/
void
{
}
/*
* ipc_action_start(): starts an ipc_action request on an interface
*
* input: struct ifslist *: the interface to start the action on
* dhcp_ipc_request_t *: the type of request
* int: the descriptor to contact the action requestor
* output: int: 1 if the request is started successfully, 0 otherwise
*/
int
{
else {
return (0);
}
return (1);
}
/*
* ipc_action_pending(): checks if there is a pending ipc_action request on
* an interface
*
* input: struct ifslist *: the interface to check for a pending ipc_action on
* output: boolean_t: B_TRUE if there is a pending ipc_action request
*/
{
return (B_TRUE);
}
return (B_FALSE);
}
/*
* ipc_action_finish(): completes an ipc_action request on an interface
*
* input: struct ifslist *: the interface to complete the action on
* int: the reason why the action finished (nonzero on error)
* output: void
*/
void
{
return;
if (reason == 0)
else
}
/*
* ipc_action_timeout(): times out an ipc_action on an interface (the request
* continues asynchronously, however)
*
* input: iu_tq_t *: unused
* void *: the struct ifslist * the ipc_action was pending on
* output: void
*/
/* ARGSUSED */
static void
{
(void) release_ifs(ifsp);
return;
}
}
/*
* ipc_action_cancel_timer(): cancels the pending ipc_action timer for this
* request
*
* input: struct ifslist *: the interface with a pending request to cancel
* output: void
*/
void
{
return;
/*
* if we can't cancel this timer, we're really in the
* twilight zone. however, as long as we don't drop the
* reference to the ifsp, it shouldn't hurt us
*/
(void) release_ifs(ifsp);
}
}