diff options
author | brian <brian@FreeBSD.org> | 2000-08-28 22:44:54 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-08-28 22:44:54 +0000 |
commit | cb1cdc90fa757e0475f2fa90070cd79541400475 (patch) | |
tree | 1920267811fb05c150fd456a8121562e12dc48c9 /usr.sbin/ppp/radius.h | |
parent | f47bf1f4e6a3f541e2923ccc99ff4e21f9b60094 (diff) | |
download | FreeBSD-src-cb1cdc90fa757e0475f2fa90070cd79541400475.zip FreeBSD-src-cb1cdc90fa757e0475f2fa90070cd79541400475.tar.gz |
Support radius accounting, and add a packet count to throughput
statistics as a side effect.
Submitted by: Marcin Cieslak <saper@system.pl>
with some tweaks to RAD_ACCT_SESSION_ID and
RAD_ACCT_MULTI_SESSION_ID generation by me.
Diffstat (limited to 'usr.sbin/ppp/radius.h')
-rw-r--r-- | usr.sbin/ppp/radius.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/usr.sbin/ppp/radius.h b/usr.sbin/ppp/radius.h index f9fdf3b..393b1d2 100644 --- a/usr.sbin/ppp/radius.h +++ b/usr.sbin/ppp/radius.h @@ -45,6 +45,16 @@ struct radius { } cfg; }; +struct radacct { + struct radius *rad_parent; /* "Parent" struct radius stored in bundle */ + char user_name[AUTHLEN]; /* Session User-Name */ + char session_id[256]; /* Unique session ID */ + char multi_session_id[51]; /* Unique MP session ID */ + int authentic; /* How the session has been authenticated */ + struct in_addr ip; + struct in_addr mask; +}; + #define descriptor2radius(d) \ ((d)->type == RADIUS_DESCRIPTOR ? (struct radius *)(d) : NULL) @@ -56,3 +66,12 @@ extern void radius_Destroy(struct radius *); extern void radius_Show(struct radius *, struct prompt *); extern void radius_Authenticate(struct radius *, struct authinfo *, const char *, const char *, const char *); +extern void radius_Account(struct radius *, struct radacct *, + struct datalink *, int, struct in_addr *, + struct in_addr *, struct pppThroughput *); + +/* An (int) parameter to radius_Account, from radlib.h */ +#if !defined(RAD_START) +#define RAD_START 1 +#define RAD_STOP 2 +#endif |