radius.h revision 43313
143313Sbrian/*
243313Sbrian * Copyright 1999 Internet Business Solutions Ltd., Switzerland
343313Sbrian * All rights reserved.
443313Sbrian *
543313Sbrian * Redistribution and use in source and binary forms, with or without
643313Sbrian * modification, are permitted provided that the following conditions
743313Sbrian * are met:
843313Sbrian * 1. Redistributions of source code must retain the above copyright
943313Sbrian *    notice, this list of conditions and the following disclaimer.
1043313Sbrian * 2. Redistributions in binary form must reproduce the above copyright
1143313Sbrian *    notice, this list of conditions and the following disclaimer in the
1243313Sbrian *    documentation and/or other materials provided with the distribution.
1343313Sbrian *
1443313Sbrian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1543313Sbrian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1643313Sbrian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1743313Sbrian * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1843313Sbrian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1943313Sbrian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2043313Sbrian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2143313Sbrian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2243313Sbrian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2343313Sbrian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2443313Sbrian * SUCH DAMAGE.
2543313Sbrian *
2643313Sbrian *	$Id:$
2743313Sbrian */
2843313Sbrian
2943313Sbrianstruct radius {
3043313Sbrian  unsigned valid : 1;           /* Is this structure valid ? */
3143313Sbrian  unsigned vj : 1;              /* FRAMED Compression */
3243313Sbrian  struct in_addr ip;            /* FRAMED IP */
3343313Sbrian  struct in_addr mask;          /* FRAMED Netmask */
3443313Sbrian  unsigned long mtu;            /* FRAMED MTU */
3543313Sbrian  struct sticky_route *routes;  /* FRAMED Routes */
3643313Sbrian  struct {
3743313Sbrian    char file[MAXPATHLEN];	/* Radius config file */
3843313Sbrian  } cfg;
3943313Sbrian};
4043313Sbrian
4143313Sbrianstruct bundle;
4243313Sbrian
4343313Sbrianextern void radius_Init(struct radius *);
4443313Sbrianextern void radius_Destroy(struct radius *);
4543313Sbrian
4643313Sbrianextern void radius_Show(struct radius *, struct prompt *);
4743313Sbrianextern int radius_Authenticate(struct radius *, struct bundle *, const char *,
4843313Sbrian                               const char *, const char *);
49