sock_conf.c revision 0f1702c5201310f0529cd5abb77652e5e9b241b6
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <sys/sysmacros.h>
#include <sys/socketvar.h>
static smod_info_t *smod_create(const char *);
static void smod_destroy(smod_info_t *);
extern void smod_add(smod_info_t *);
void
smod_init(void)
{
}
static smod_info_t *
{
return (smodp);
return (NULL);
}
/*
* Register the socket module.
*/
int
{
/*
* Make sure the socket module does not depend on capabilities
* not available on the system.
*/
"Failed to register socket module %s: version mismatch",
return (EINVAL);
}
#ifdef DEBUG
return (EEXIST);
}
#endif
} else {
#ifdef DEBUG
#endif
return (EINVAL);
}
}
}
return (0);
}
/*
* Unregister the socket module
*/
int
smod_unregister(const char *mod_name)
{
if (smodp->smod_refcnt != 0) {
return (EBUSY);
} else {
/*
* Delete the entry from the socket module list.
*/
return (0);
}
}
return (ENXIO);
}
/*
* Initialize the socket module entry.
*/
static smod_info_t *
smod_create(const char *modname)
{
int len;
return (smodp);
}
/*
* Clean up the socket module part of the sockparams entry.
*/
static void
{
}
/*
* Add an entry at the front of the socket module list.
*/
void
{
}
/*
* Lookup the socket module table by the socket module name.
* If there is an existing entry, then increase the reference count.
* Otherwise we load the module and in the module register function create
* a new entry and add it to the end of the socket module table.
*/
smod_lookup_byname(const char *modname)
{
int error;
/*
* If find an entry, increase the reference count and
* return the entry pointer.
*/
return (smodp);
}
/*
* We have a sockmod, and it is not loaded.
* Load the module into the kernel, modload() will
* take care of the multiple threads.
*/
if (error == -1) {
return (NULL);
}
goto again;
}