zoneproxy-adm.c revision 2338
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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
*/
/*
*/
/*
* Notify zoneproxyd when a zone is added or removed. If zoneproxyd is not
* running, this does nothing.
*/
#include <door.h>
#include <errno.h>
#include <fcntl.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <zone.h>
#include <zoneproxy_impl.h>
static void
usage(void)
{
"\tNote: zoneproxy-adm should not be run directly.\n");
exit(2);
}
static void
{
int cmd[2];
int fd;
if (fd < 0)
return;
if (remove) {
cmd[0] = ZP_CMD_ZONE_REMOVED;
} else {
cmd[0] = ZP_CMD_ZONE_ADDED;
}
}
int
{
int opt;
switch (opt) {
case 'R':
break;
default:
usage();
}
}
usage();
}
if (zoneid == -1) {
exit(1);
}
exit(0);
return 0;
}