summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/ipcp.h
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-01-28 01:56:34 +0000
committerbrian <brian@FreeBSD.org>1999-01-28 01:56:34 +0000
commitc970e06ccf646c8d420b2216f605eefeef3cdc0d (patch)
treebb4ef8e30fe918a76dda062613ff6dce7f4acf28 /usr.sbin/ppp/ipcp.h
parentbada4b37ff3f7d5effb75895357b4276798f82de (diff)
downloadFreeBSD-src-c970e06ccf646c8d420b2216f605eefeef3cdc0d.zip
FreeBSD-src-c970e06ccf646c8d420b2216f605eefeef3cdc0d.tar.gz
Initial RADIUS support (using libradius). See the man page for
details. Compiling with -DNORADIUS (the default for `release') removes support. TODO: The functionality in libradius::rad_send_request() needs to be supplied as a set of routines so that ppp doesn't have to wait indefinitely for the radius server(s). Instead, we need to get a descriptor back, select() on the descriptor, and ask libradius to service it when necessary. For now, ppp blocks SIGALRM while in rad_send_request(), so it misses PAP/CHAP retries & timeouts if they occur. Only PAP is functional. When CHAP is attempted, libradius complains that no User-Password has been specified... rfc2138 says that it *mustn't* be used for CHAP :-( Sponsored by: Internet Business Solutions Ltd., Switzerland
Diffstat (limited to 'usr.sbin/ppp/ipcp.h')
-rw-r--r--usr.sbin/ppp/ipcp.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/usr.sbin/ppp/ipcp.h b/usr.sbin/ppp/ipcp.h
index 5b5fc9b..2c6b5e1 100644
--- a/usr.sbin/ppp/ipcp.h
+++ b/usr.sbin/ppp/ipcp.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ipcp.h,v 1.21 1998/10/22 02:32:49 brian Exp $
+ * $Id: ipcp.h,v 1.22 1998/10/26 19:07:39 brian Exp $
*
* TODO:
*/
@@ -34,6 +34,14 @@
#define TY_SECONDARY_NBNS 132
#define TY_ADJUST_NS 119 /* subtract from NS val for REJECT bit */
+#define addr2mask(addr) ( \
+ IN_CLASSA(addr) ? \
+ htonl(IN_CLASSA_NET) : \
+ IN_CLASSB(addr) ? \
+ htonl(IN_CLASSB_NET) : htonl(IN_CLASSC_NET) \
+)
+
+
struct sticky_route;
struct in_range {
@@ -53,7 +61,7 @@ struct ipcp {
} vj;
struct in_range my_range; /* MYADDR spec */
- struct in_addr netmask; /* netmask (unused by most OSs) */
+ struct in_addr netmask; /* Iface netmask (unused by most OSs) */
struct in_range peer_range; /* HISADDR spec */
struct iplist peer_list; /* Ranges of HISADDR values */
@@ -84,6 +92,8 @@ struct ipcp {
struct in_addr peer_ip; /* IP address he's willing to use */
u_int32_t peer_compproto; /* VJ params he's willing to use */
+ struct in_addr ifmask; /* Interface netmask */
+
struct in_addr my_ip; /* IP address I'm willing to use */
u_int32_t my_compproto; /* VJ params I'm willing to use */
@@ -102,13 +112,14 @@ struct cmdargs;
extern void ipcp_Init(struct ipcp *, struct bundle *, struct link *,
const struct fsm_parent *);
-extern void ipcp_Setup(struct ipcp *);
+extern void ipcp_Setup(struct ipcp *, u_int32_t);
extern void ipcp_SetLink(struct ipcp *, struct link *);
extern int ipcp_Show(struct cmdargs const *);
extern void ipcp_Input(struct ipcp *, struct bundle *, struct mbuf *);
extern void ipcp_AddInOctets(struct ipcp *, int);
extern void ipcp_AddOutOctets(struct ipcp *, int);
+extern int ipcp_UseHisIPaddr(struct bundle *, struct in_addr);
extern int ipcp_UseHisaddr(struct bundle *, const char *, int);
extern int ipcp_vjset(struct cmdargs const *);
extern void ipcp_CleanInterface(struct ipcp *);
OpenPOWER on IntegriCloud