.\" @(#)isc_openfile.3x 1.0 92/02/03 Lysator .\" ISC - networking library .\" Copyright (C) 1992, 1999 by Peter Eriksson and Per Cederqvist of the .\" Lysator Academic Computer Association. .\" .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software .\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. .\" .TH ISC_OPENFILE 3X "3 February 1992" "Release 1.0" "ISC LIBRARY" .SH NAME isc_openfile \- open a file and associate an ISC session with it .SH SYNOPSIS .nf .ft B #include #include .ft .fi .LP .nf .ft B IscSession *isc_openfile(IscMaster *mcb, const char *file, int mode) .ft R .fi .SH DESCRIPTION .IX "isc_openfile()" "" "\fLisc_openfile()\fP function" .LP .B isc_openfile(\|) opens a file using the specified modes and inserts the session into the master control structure. .LP The .I mcb argument must point to a previously allocated master structure as returned by the .BR isc_initialize(\|) function call. .LP The .I file argument is a null terminated string pointing at a file to be opened. .LP The .I mode argument contains the flags used for opening the file. The flags are the sames as those used by the .BR open (2v) system call. .SH RETURN VALUES .B isc_openfile(\|) returns a non-\s-1NULL\s0 pointer to a session value suitable for use with subsequent .SM ISC functions calls. On failure, it returns .SM NULL and no memory is allocated and no connection is initiated. .SH "SEE ALSO" .BR open (2v) .BR isc (3x) .BR isc_initialize (3x) .BR isc_shutdown (3x) .BR isc_listentcp (3x) .BR isc_unlisten (3x) .BR isc_opentcp (3x) .BR isc_openfd (3x) .BR isc_close (3x) .BR isc_enable (3x) .BR isc_disable (3x) .BR isc_sessions (3x) .BR isc_getnextevent (3x) .BR isc_dispose (3x) .BR isc_flush (3x) .BR isc_write (3x) .BR isc_putc (3x) .BR isc_printf (3x)