mlrpc_svc.c revision da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <string.h>
#include <strings.h>
#define NDL_MAX_SERVICES 32
struct mlrpc_stub_table *
{
struct mlrpc_stub_table *ste;
return (ste);
}
return (NULL);
}
struct mlrpc_service *
mlrpc_find_service_by_name(const char *name)
{
struct mlrpc_service *msvc;
int i;
for (i = 0; i < NDL_MAX_SERVICES; i++) {
continue;
continue;
return (msvc);
}
return (NULL);
}
struct mlrpc_service *
{
struct mlrpc_service *msvc;
char abstract_syntax[128];
char transfer_syntax[128];
int i;
if (as_uuid)
if (ts_uuid)
for (i = 0; i < NDL_MAX_SERVICES; i++) {
continue;
if (as_uuid) {
if (msvc->abstract_syntax_uuid == 0)
continue;
continue;
continue;
}
if (ts_uuid) {
if (msvc->transfer_syntax_uuid == 0)
continue;
continue;
continue;
}
return (msvc);
}
return (NULL);
}
/*
* Register a service.
*
* Returns:
* 0 Success
* -1 Duplicate service
* -2 Duplicate name
* -3 Table overflow
*/
int
{
struct mlrpc_service *p;
int free_slot = -1;
int i;
for (i = 0; i < NDL_MAX_SERVICES; i++) {
if ((p = mlrpc_services[i]) == NULL) {
if (free_slot < 0)
free_slot = i;
continue;
}
if (p == msvc)
return (-1);
return (-2);
}
if (free_slot < 0)
return (-3);
return (0);
}
void
{
int i;
for (i = 0; i < NDL_MAX_SERVICES; i++) {
if (mlrpc_services[i] == msvc)
mlrpc_services[i] = NULL;
}
}
int
{
struct mlrpc_service *msvc;
int i;
for (i = 0; i < NDL_MAX_SERVICES; i++) {
if ((msvc = mlrpc_services[i]) != 0) {
}
}
return (smb_ctxbuf_len(&ctx));
}
void
{
}
int
{
char *p = str;
char *q;
char buf[4];
int i;
if (*p != '-')
return (0);
p++;
if (*p != '-')
return (0);
p++;
if (*p != '-')
return (0);
p++;
for (i = 0; i < 8; i++) {
if (p[0] == 0 || p[1] == 0)
return (0);
buf[0] = *p++;
buf[1] = *p++;
buf[2] = 0;
if (*q != 0)
return (0);
}
if (*p != 0)
return (0);
return (1);
}
void
{
int ix;
}
}
struct mlrpc_binding *
{
struct mlrpc_binding *mbind;
break;
}
return (mbind);
}
struct mlrpc_binding *
{
struct mlrpc_binding *mbind;
break;
}
return (mbind);
}