/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1990-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
*
* obsolete generic server state machine
* <css.h> provides a discipline interface with multiple servers
*/
#include "csslib.h"
struct Server_s
{
void* handle;
int (*done)(void*, int);
int (*rd)(void*, int);
int (*wr)(void*, int);
int (*to)(void*);
};
static int
{
}
static int
{
{
case CS_POLL_READ:
break;
case CS_POLL_WRITE:
break;
}
return 0;
}
static int
{
switch (op)
{
case CSS_CLOSE:
return 0;
case CSS_INTERRUPT:
return 1;
return -1;
case CSS_DORMANT:
case CSS_TIMEOUT:
case CSS_WAKEUP:
}
return -1;
}
int
{
}
/*
* csserve() wakeup and timeout are mutually exclusive
*/
unsigned long
{
unsigned long rv;
return CS_NEVER;
return rv;
}
/*
* csserve() wakeup and timeout are mutually exclusive
*/
unsigned long
{
unsigned long rv;
return CS_NEVER;
return rv;
}
/*
* server state machine
*/
void
csserve(Cs_t* state, void* handle, const char* path, void* (*init)(void*, int), int (*done)(void*, int), int (*con)(void*, int, Csid_t*, int, char**), int (*rd)(void*, int), int (*wr)(void*, int), int (*to)(void*))
{
close(0);
exit(1);
#ifdef SIGCHLD
if (!done)
#endif
/*
* we the
* are
* ser
* ver
*
* in background
* no controlling tty
* pwd is the service data directory
* stdin is the connect stream
* stderr is CS_MNT_LOG in the service data directory
* umask matches service mode
*/
if (init)
}
int
{
}
void
_cs_serve(void* handle, const char* path, void* (*init)(void*, int), int (*done)(void*, int), int (*con)(void*, int, Csid_t*, int, char**), int (*rd)(void*, int), int (*wr)(void*, int), int (*to)(void*))
{
}
unsigned long
{
}
unsigned long
{
}