3 <TITLE>FS::SessionClient - Freeside session client API</TITLE>
4 <LINK REV="made" HREF="mailto:perl@packages.debian.org">
9 <A NAME="__index__"></A>
14 <LI><A HREF="#name">NAME</A></LI>
15 <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
16 <LI><A HREF="#description">DESCRIPTION</A></LI>
17 <LI><A HREF="#subroutines">SUBROUTINES</A></LI>
18 <LI><A HREF="#version">VERSION</A></LI>
19 <LI><A HREF="#bugs">BUGS</A></LI>
20 <LI><A HREF="#see also">SEE ALSO</A></LI>
26 <H1><A NAME="name">NAME</A></H1>
27 <P>FS::SessionClient - Freeside session client API</P>
30 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
32 use FS::SessionClient qw( login portnum logout );</PRE>
35 'username' => $username,
36 'password' => $password,
37 'login' => $timestamp,
38 'portnum' => $portnum,
41 $portnum = portnum( { 'ip' => $ip } ) or die "unknown ip!"
42 $portnum = portnum( { 'nasnum' => $nasnum, 'nasport' => $nasport } )
43 or die "unknown nasnum/nasport";</PRE>
46 'username' => $username,
47 'password' => $password,
48 'logout' => $timestamp,
49 'portnum' => $portnum,
53 <H1><A NAME="description">DESCRIPTION</A></H1>
54 <P>This modules provides an API for a remote session application.</P>
55 <P>It needs to be run as the freeside user. Because of this, the program which
56 calls these subroutines should be written very carefully.</P>
59 <H1><A NAME="subroutines">SUBROUTINES</A></H1>
61 <DT><STRONG><A NAME="item_login">login HASHREF</A></STRONG><BR>
63 HASHREF should have the following keys: username, password, login and portnum.
64 login is a UNIX timestamp; if not specified, will default to the current time.
65 Starts a new session for the specified user and portnum. The password is
66 optional, but must be correct if specified.
67 <P>Returns a scalar error message, or the empty string for success.</P>
69 <DT><STRONG><A NAME="item_portnum">portnum</A></STRONG><BR>
71 HASHREF should contain a single key: ip, or the two keys: nasnum and nasport.
72 Returns a portnum suitable for the login and logout subroutines, or false
75 <DT><STRONG><A NAME="item_logout">logout HASHREF</A></STRONG><BR>
77 HASHREF should have the following keys: usrename, password, logout and portnum.
78 logout is a UNIX timestamp; if not specified, will default to the current time.
79 Starts a new session for the specified user and portnum. The password is
80 optional, but must be correct if specified.
81 <P>Returns a scalar error message, or the empty string for success.</P>
85 <H1><A NAME="version">VERSION</A></H1>
86 <P>$Id: SessionClient.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P>
89 <H1><A NAME="bugs">BUGS</A></H1>
92 <H1><A NAME="see also">SEE ALSO</A></H1>
93 <P><EM>fs_sessiond</EM></P>