From 35227000d6222f35ec49bc4226e94200b77abc4f Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 23 Apr 2001 12:41:57 +0000 Subject: new API documentation --- htdocs/docs/man/FS/port.html | 120 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 htdocs/docs/man/FS/port.html (limited to 'htdocs/docs/man/FS/port.html') diff --git a/htdocs/docs/man/FS/port.html b/htdocs/docs/man/FS/port.html new file mode 100644 index 000000000..b747f0ca3 --- /dev/null +++ b/htdocs/docs/man/FS/port.html @@ -0,0 +1,120 @@ + + +FS::port - Object methods for port records + + + + + + + + + + + +
+

+

NAME

+

FS::port - Object methods for port records

+

+


+

SYNOPSIS

+
+  use FS::port;
+
+  $record = new FS::port \%hash;
+  $record = new FS::port { 'column' => 'value' };
+
+  $error = $record->insert;
+
+  $error = $new_record->replace($old_record);
+
+  $error = $record->delete;
+
+  $error = $record->check;
+
+  $session = $port->session;
+

+


+

DESCRIPTION

+

An FS::port object represents an individual port on a NAS. FS::port inherits +from FS::Record. The following fields are currently supported:

+
+
portnum - primary key
+
+
ip - IP address of this port
+
+
nasport - port number on the NAS
+
+
nasnum - NAS this port is on - see the FS::nas manpage
+
+
+

+


+

METHODS

+
+
new HASHREF
+
+Creates a new port. To add the example to the database, see insert. +

Note that this stores the hash reference, not a distinct copy of the hash it +points to. You can ask the object for a copy with the hash method.

+

+
insert
+
+Adds this record to the database. If there is an error, returns the error, +otherwise returns false. +

+
delete
+
+Delete this record from the database. +

+
replace OLD_RECORD
+
+Replaces the OLD_RECORD with this one in the database. If there is an error, +returns the error, otherwise returns false. +

+
check
+
+Checks all fields to make sure this is a valid example. If there is +an error, returns the error, otherwise returns false. Called by the insert +and replace methods. +

+
session
+
+Returns the currently open session on this port, or if no session is currently +open, the most recent session. See the FS::session manpage. +

+

+


+

VERSION

+

$Id: port.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

+

+


+

BUGS

+

The author forgot to customize this manpage.

+

The session method won't deal well if you have multiple open sessions on a +port, for example if your RADIUS server drops stop records. Suggestions for +how to deal with this sort of lossage welcome; should we close the session +when we get a new session on that port? Tag it as invalid somehow? Close it +one second after it was opened? *sigh* Maybe FS::session shouldn't let you +create overlapping sessions, at least folks will find out their logging is +dropping records.

+

If you think the above refers multiple user logins you need to read the +manpages again.

+

+


+

SEE ALSO

+

the FS::Record manpage, schema.html from the base documentation.

+ + + + -- cgit v1.2.1