xref: /freebsd/usr.sbin/ppp/server.h (revision b6217683dc0269a53b799399522dbdfb5a4919cc)
11ae349f5Scvs2svn /*-
21ae349f5Scvs2svn  * Copyright (c) 1997 Brian Somers <brian@Awfulhak.org>
31ae349f5Scvs2svn  * All rights reserved.
41ae349f5Scvs2svn  *
51ae349f5Scvs2svn  * Redistribution and use in source and binary forms, with or without
61ae349f5Scvs2svn  * modification, are permitted provided that the following conditions
71ae349f5Scvs2svn  * are met:
81ae349f5Scvs2svn  * 1. Redistributions of source code must retain the above copyright
91ae349f5Scvs2svn  *    notice, this list of conditions and the following disclaimer.
101ae349f5Scvs2svn  * 2. Redistributions in binary form must reproduce the above copyright
111ae349f5Scvs2svn  *    notice, this list of conditions and the following disclaimer in the
121ae349f5Scvs2svn  *    documentation and/or other materials provided with the distribution.
131ae349f5Scvs2svn  *
141ae349f5Scvs2svn  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
151ae349f5Scvs2svn  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
161ae349f5Scvs2svn  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
171ae349f5Scvs2svn  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
181ae349f5Scvs2svn  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
191ae349f5Scvs2svn  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
201ae349f5Scvs2svn  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
211ae349f5Scvs2svn  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
221ae349f5Scvs2svn  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
231ae349f5Scvs2svn  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
241ae349f5Scvs2svn  * SUCH DAMAGE.
251ae349f5Scvs2svn  *
26b6217683SBrian Somers  *	$Id: server.h,v 1.4.2.1 1998/02/09 19:24:02 brian Exp $
271ae349f5Scvs2svn  */
281ae349f5Scvs2svn 
2977ff88adSBrian Somers struct server {
3077ff88adSBrian Somers   struct descriptor desc;
3177ff88adSBrian Somers   int fd;
32b6217683SBrian Somers   char passwd[50];
3377ff88adSBrian Somers };
3477ff88adSBrian Somers 
3577ff88adSBrian Somers #define server2descriptor(s) (&(s)->desc)
3677ff88adSBrian Somers #define descriptor2server(d) \
3777ff88adSBrian Somers   ((d)->type == SERVER_DESCRIPTOR ? (struct server *)(d) : NULL)
3877ff88adSBrian Somers 
3977ff88adSBrian Somers extern struct server server;
401ae349f5Scvs2svn 
41b6217683SBrian Somers extern int ServerLocalOpen(struct bundle *, const char *, mode_t);
42b6217683SBrian Somers extern int ServerTcpOpen(struct bundle *, int);
43b6217683SBrian Somers extern int ServerClose(struct bundle *);
44