// -*-c++-*- /* $Id: sfssd.h,v 1.9 2001/06/28 04:47:24 dm Exp $ */ /* * * Copyright (C) 1999 David Mazieres (dm@uun.org) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * */ #include "arpc.h" #include "sfsmisc.h" #include "list.h" #include "qhash.h" #include "itree.h" struct sfssrv { /* How to invoke this server */ const vec argv; rpc_ptr uid; rpc_ptr gid; /* Copy of the server we are running */ ptr x; ihash_entry link; private: void setprivs (); void getpkt (const char *, ssize_t, const sockaddr *); public: sfssrv (const vec &argv); ~sfssrv (); void launch (); }; extern ihash, sfssrv, &sfssrv::argv, &sfssrv::link> srvtab; struct extension { vec names; qhash srvtab; list_entry link; bool covered (const bhash &eh); bool covered (const vec &ev); }; struct release { const u_int32_t rel; list extlist; itree_entry link; release (u_int32_t rel); ~release (); extension *getext (const vec &ev); }; struct server { const str host; rpc_ptr hostid; itree reltab; list_entry link; server (const str &host, sfs_hash *hostid); ~server (); release *getrel (u_int32_t r); bool clone (ref x, svccb *sbp, u_int32_t rel, sfs_service service, const bhash &eh); }; extern list serverlist;