/*
* 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
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* bridged - bridging control daemon. This module provides the door-based
* interface used by user applications to gather bridge status information.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <syslog.h>
#include <door.h>
#include <errno.h>
#include <alloca.h>
#include <libdlpi.h>
#include <libdlbridge.h>
#include <stp_in.h>
#include "global.h"
/*ARGSUSED*/
static void
{
/* LINTED: alignment */
return;
}
case bdcBridgeGetConfig:
break;
return;
case bdcBridgeGetState:
break;
return;
case bdcBridgeGetPorts: {
int *rbuf;
int i, nports;
if (nextport == 0) {
twoints[0] = 0;
} else {
if (allports[i]->kern_added)
}
}
return;
}
case bdcBridgeGetRefreshCount:
twoints[0] = refresh_count;
twoints[1] = 0;
return;
case bdcPortGetConfig:
break;
if (retv != 0)
break;
return;
case bdcPortGetState:
break;
break;
if (pdp->sdu_failed)
else if (protect != DLADM_BRIDGE_PROT_STP)
NULL, 0);
return;
case bdcPortGetForwarding:
break;
twoints[1] = 0;
return;
}
}
static void
cleanup_door(void)
{
if (door_fd != -1) {
(void) door_revoke(door_fd);
door_fd = -1;
}
if (doorname[0] != '\0') {
doorname[0] = '\0';
}
}
void
init_door(void)
{
int fd;
/* Make sure that the control directory exists */
/* Each instance gets a separate door. */
/* Do a low-overhead "touch" on the file that will be the door node. */
if (fd != -1) {
}
(void) atexit(cleanup_door);
/* Create the door. */
if (door_fd == -1) {
}
/* Attach the door to the file. */
}
}