summaryrefslogtreecommitdiff
path: root/httemplate/docs/man/FS/SessionClient.html
blob: 0abb2a6a1ba3b0a3e9b87b42e144d86f3e610077 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<HTML>
<HEAD>
<TITLE>FS::SessionClient - Freeside session client API</TITLE>
<LINK REV="made" HREF="mailto:perl@packages.debian.org">
</HEAD>

<BODY>

<A NAME="__index__"></A>
<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#name">NAME</A></LI>
	<LI><A HREF="#synopsis">SYNOPSIS</A></LI>
	<LI><A HREF="#description">DESCRIPTION</A></LI>
	<LI><A HREF="#subroutines">SUBROUTINES</A></LI>
	<LI><A HREF="#version">VERSION</A></LI>
	<LI><A HREF="#bugs">BUGS</A></LI>
	<LI><A HREF="#see also">SEE ALSO</A></LI>
</UL>
<!-- INDEX END -->

<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>FS::SessionClient - Freeside session client API</P>
<P>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<PRE>
  use FS::SessionClient qw( login portnum logout );</PRE>
<PRE>
  $error = login ( {
    'username' =&gt; $username,
    'password' =&gt; $password,
    'login'    =&gt; $timestamp,
    'portnum'  =&gt; $portnum,
  } );</PRE>
<PRE>
  $portnum = portnum( { 'ip' =&gt; $ip } ) or die &quot;unknown ip!&quot;
  $portnum = portnum( { 'nasnum' =&gt; $nasnum, 'nasport' =&gt; $nasport } )
    or die &quot;unknown nasnum/nasport&quot;;</PRE>
<PRE>
  $error = logout ( {
    'username' =&gt; $username,
    'password' =&gt; $password,
    'logout'   =&gt; $timestamp,
    'portnum'  =&gt; $portnum,
  } );</PRE>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>This modules provides an API for a remote session application.</P>
<P>It needs to be run as the freeside user.  Because of this, the program which
calls these subroutines should be written very carefully.</P>
<P>
<HR>
<H1><A NAME="subroutines">SUBROUTINES</A></H1>
<DL>
<DT><STRONG><A NAME="item_login">login HASHREF</A></STRONG><BR>
<DD>
HASHREF should have the following keys: username, password, login and portnum.
login is a UNIX timestamp; if not specified, will default to the current time.
Starts a new session for the specified user and portnum.  The password is
optional, but must be correct if specified.
<P>Returns a scalar error message, or the empty string for success.</P>
<P></P>
<DT><STRONG><A NAME="item_portnum">portnum</A></STRONG><BR>
<DD>
HASHREF should contain a single key: ip, or the two keys: nasnum and nasport.
Returns a portnum suitable for the login and logout subroutines, or false
on error.
<P></P>
<DT><STRONG><A NAME="item_logout">logout HASHREF</A></STRONG><BR>
<DD>
HASHREF should have the following keys: usrename, password, logout and portnum.
logout is a UNIX timestamp; if not specified, will default to the current time.
Starts a new session for the specified user and portnum.  The password is
optional, but must be correct if specified.
<P>Returns a scalar error message, or the empty string for success.</P>
<P></P></DL>
<P>
<HR>
<H1><A NAME="version">VERSION</A></H1>
<P>$Id: SessionClient.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P>
<P>
<HR>
<H1><A NAME="bugs">BUGS</A></H1>
<P>
<HR>
<H1><A NAME="see also">SEE ALSO</A></H1>
<P><EM>fs_sessiond</EM></P>

</BODY>

</HTML>