utmp.h

Go to the documentation of this file.
00001 // utmp.h
00002 //
00003 // © Portions copyright (c) 2006 Symbian Software Ltd. All rights reserved.
00004 //
00005 /*
00006  * Copyright (c) 1988, 1993
00007  *      The Regents of the University of California.  All rights reserved.
00008  * (c) UNIX System Laboratories, Inc.
00009  * All or some portions of this file are derived from material licensed
00010  * to the University of California by American Telephone and Telegraph
00011  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
00012  * the permission of UNIX System Laboratories, Inc.
00013  *
00014  * Redistribution and use in source and binary forms, with or without
00015  * modification, are permitted provided that the following conditions
00016  * are met:
00017  * 1. Redistributions of source code must retain the above copyright
00018  *    notice, this list of conditions and the following disclaimer.
00019  * 2. Redistributions in binary form must reproduce the above copyright
00020  *    notice, this list of conditions and the following disclaimer in the
00021  *    documentation and/or other materials provided with the distribution.
00022  * 3. All advertising materials mentioning features or use of this software
00023  *    must display the following acknowledgement:
00024  *      This product includes software developed by the University of
00025  *      California, Berkeley and its contributors.
00026  * 4. Neither the name of the University nor the names of its contributors
00027  *    may be used to endorse or promote products derived from this software
00028  *    without specific prior written permission.
00029  *
00030  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00031  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00032  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00033  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00034  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00035  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00036  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00037  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00038  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00039  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00040  * SUCH DAMAGE.
00041  *
00042  *      @(#)utmp.h      8.2 (Berkeley) 1/21/94
00043  * $FreeBSD: src/include/utmp.h,v 1.10 2001/10/27 20:40:54 peter Exp $
00044  */
00045 
00046 #ifndef _UTMP_H_ 
00047 #define _UTMP_H_
00048 
00049 #define _PATH_UTMP      "/var/run/utmp"
00050 #define _PATH_WTMP      "/var/log/wtmp"
00051 #define _PATH_LASTLOG   "/var/log/lastlog"
00052 
00053 #define UT_NAMESIZE     16      /* see MAXLOGNAME in <sys/param.h> */
00054 #define UT_LINESIZE     8
00055 #define UT_HOSTSIZE     16
00056 
00057 struct lastlog {
00058         int32_t ll_time;
00059         char    ll_line[UT_LINESIZE];
00060         char    ll_host[UT_HOSTSIZE];
00061 };
00062 
00063 struct utmp {
00064         char    ut_line[UT_LINESIZE];
00065         char    ut_name[UT_NAMESIZE];
00066         char    ut_host[UT_HOSTSIZE];
00067         int32_t ut_time;
00068 };
00069 
00070 #endif /* !_UTMP_H_ */

Copyright © Nokia Corporation 2001-2008
Back to top