rwhod.h revision 203965
11539Srgrimes/* 21539Srgrimes * Copyright (c) 1983, 1993 31539Srgrimes * The Regents of the University of California. All rights reserved. 41539Srgrimes * 51539Srgrimes * Redistribution and use in source and binary forms, with or without 61539Srgrimes * modification, are permitted provided that the following conditions 71539Srgrimes * are met: 81539Srgrimes * 1. Redistributions of source code must retain the above copyright 91539Srgrimes * notice, this list of conditions and the following disclaimer. 101539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111539Srgrimes * notice, this list of conditions and the following disclaimer in the 121539Srgrimes * documentation and/or other materials provided with the distribution. 13203965Simp * 3. Neither the name of the University nor the names of its contributors 141539Srgrimes * may be used to endorse or promote products derived from this software 151539Srgrimes * without specific prior written permission. 161539Srgrimes * 171539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 181539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 191539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 201539Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 211539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 221539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 231539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 241539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 251539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 261539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 271539Srgrimes * SUCH DAMAGE. 281539Srgrimes * 291539Srgrimes * @(#)rwhod.h 8.1 (Berkeley) 6/2/93 30203965Simp * 31203965Simp * $FreeBSD: head/include/protocols/rwhod.h 203965 2010-02-16 19:46:46Z imp $ 321539Srgrimes */ 331539Srgrimes 342163Spaul#ifndef _PROTOCOLS_RWHOD_H_ 352163Spaul#define _PROTOCOLS_RWHOD_H_ 361539Srgrimes 371539Srgrimes/* 381539Srgrimes * rwho protocol packet format. 391539Srgrimes */ 401539Srgrimesstruct outmp { 411539Srgrimes char out_line[8]; /* tty name */ 421539Srgrimes char out_name[8]; /* user id */ 4340999Sdima int32_t out_time; /* time on */ 441539Srgrimes}; 451539Srgrimes 461539Srgrimesstruct whod { 471539Srgrimes char wd_vers; /* protocol version # */ 481539Srgrimes char wd_type; /* packet type, see below */ 491539Srgrimes char wd_pad[2]; 501539Srgrimes int wd_sendtime; /* time stamp by sender */ 511539Srgrimes int wd_recvtime; /* time stamp applied by receiver */ 521539Srgrimes char wd_hostname[32]; /* hosts's name */ 531539Srgrimes int wd_loadav[3]; /* load average as in uptime */ 541539Srgrimes int wd_boottime; /* time system booted */ 551539Srgrimes struct whoent { 561539Srgrimes struct outmp we_utmp; /* active tty info */ 571539Srgrimes int we_idle; /* tty idle time */ 581539Srgrimes } wd_we[1024 / sizeof (struct whoent)]; 591539Srgrimes}; 601539Srgrimes 611539Srgrimes#define WHODVERSION 1 621539Srgrimes#define WHODTYPE_STATUS 1 /* host status */ 631539Srgrimes 641539Srgrimes#define _PATH_RWHODIR "/var/rwho" 651539Srgrimes 661539Srgrimes#endif /* !_RWHOD_H_ */ 67