utsname.h revision 127976
11057Salm/*- 21057Salm * Copyright (c) 1994 31057Salm * The Regents of the University of California. All rights reserved. 41057Salm * 51057Salm * This code is derived from software contributed to Berkeley by 61057Salm * Chuck Karish of Mindcraft, Inc. 71057Salm * 81057Salm * Redistribution and use in source and binary forms, with or without 91057Salm * modification, are permitted provided that the following conditions 101057Salm * are met: 111057Salm * 1. Redistributions of source code must retain the above copyright 121057Salm * notice, this list of conditions and the following disclaimer. 131057Salm * 2. Redistributions in binary form must reproduce the above copyright 141057Salm * notice, this list of conditions and the following disclaimer in the 151057Salm * documentation and/or other materials provided with the distribution. 161057Salm * 4. Neither the name of the University nor the names of its contributors 171057Salm * may be used to endorse or promote products derived from this software 181057Salm * without specific prior written permission. 191057Salm * 201057Salm * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 211057Salm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 221057Salm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 231057Salm * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 241057Salm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 251057Salm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 261057Salm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 271057Salm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2899109Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2999109Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 301057Salm * SUCH DAMAGE. 311057Salm * 321057Salm * @(#)utsname.h 8.1 (Berkeley) 1/4/94 331057Salm * $FreeBSD: head/sys/sys/utsname.h 127976 2004-04-07 04:19:52Z imp $ 341057Salm */ 3590109Simp 361057Salm#ifndef _SYS_UTSNAME_H 371057Salm#define _SYS_UTSNAME_H 381057Salm 39301155Struckman#ifdef _KERNEL 401057Salm#define SYS_NMLN 32 /* uname(2) for the FreeBSD 1.1 ABI. */ 411057Salm#endif 421057Salm 431057Salm#ifndef SYS_NMLN 4481220Smike#define SYS_NMLN 256 /* User can override. */ 451057Salm#endif 46301155Struckman 47301155Struckmanstruct utsname { 481057Salm char sysname[SYS_NMLN]; /* Name of this OS. */ 49301155Struckman char nodename[SYS_NMLN]; /* Name of this network node. */ 50301155Struckman char release[SYS_NMLN]; /* Release level. */ 51301155Struckman char version[SYS_NMLN]; /* Version level. */ 52301155Struckman char machine[SYS_NMLN]; /* Hardware type. */ 5381220Smike}; 54301155Struckman 55301155Struckman#include <sys/cdefs.h> 561057Salm 57228595Sdim#ifndef _KERNEL 58228595Sdim__BEGIN_DECLS 591057Salmint __xuname(int, void *); /* Variable record size. */ 601057Salm__END_DECLS 611057Salm 62241720Sedstatic __inline int 63241720Seduname(struct utsname *name) 641057Salm{ 651057Salm return __xuname(SYS_NMLN, (void *)name); 661057Salm} 671057Salm#endif /* _KERNEL */ 6890109Simp 691057Salm#endif /* !_SYS_UTSNAME_H */ 701057Salm