11541Srgrimes/*-
21541Srgrimes * Copyright (c) 1994
31541Srgrimes *	The Regents of the University of California.  All rights reserved.
41541Srgrimes *
51541Srgrimes * This code is derived from software contributed to Berkeley by
61541Srgrimes * Chuck Karish of Mindcraft, Inc.
71541Srgrimes *
81541Srgrimes * Redistribution and use in source and binary forms, with or without
91541Srgrimes * modification, are permitted provided that the following conditions
101541Srgrimes * are met:
111541Srgrimes * 1. Redistributions of source code must retain the above copyright
121541Srgrimes *    notice, this list of conditions and the following disclaimer.
131541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
141541Srgrimes *    notice, this list of conditions and the following disclaimer in the
151541Srgrimes *    documentation and/or other materials provided with the distribution.
161541Srgrimes * 4. Neither the name of the University nor the names of its contributors
171541Srgrimes *    may be used to endorse or promote products derived from this software
181541Srgrimes *    without specific prior written permission.
191541Srgrimes *
201541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
211541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
221541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
231541Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
241541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
251541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
261541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
271541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
281541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
291541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
301541Srgrimes * SUCH DAMAGE.
311541Srgrimes *
321541Srgrimes *	@(#)utsname.h	8.1 (Berkeley) 1/4/94
3350477Speter * $FreeBSD$
341541Srgrimes */
351541Srgrimes
361541Srgrimes#ifndef	_SYS_UTSNAME_H
371541Srgrimes#define	_SYS_UTSNAME_H
381541Srgrimes
3974729Speter#ifdef _KERNEL
4074740Speter#define	SYS_NMLN	32		/* uname(2) for the FreeBSD 1.1 ABI. */
4174729Speter#endif
421549Srgrimes
4374729Speter#ifndef SYS_NMLN
4474740Speter#define	SYS_NMLN	256		/* User can override. */
4574729Speter#endif
4674729Speter
471541Srgrimesstruct utsname {
481549Srgrimes	char	sysname[SYS_NMLN];	/* Name of this OS. */
491549Srgrimes	char	nodename[SYS_NMLN];	/* Name of this network node. */
501549Srgrimes	char	release[SYS_NMLN];	/* Release level. */
511549Srgrimes	char	version[SYS_NMLN];	/* Version level. */
521549Srgrimes	char	machine[SYS_NMLN];	/* Hardware type. */
531541Srgrimes};
541541Srgrimes
551541Srgrimes#include <sys/cdefs.h>
561541Srgrimes
5755205Speter#ifndef _KERNEL
581541Srgrimes__BEGIN_DECLS
5974740Speterint	__xuname(int, void *);		/* Variable record size. */
601541Srgrimes__END_DECLS
6174729Speter
6274729Speterstatic __inline int
6374729Speteruname(struct utsname *name)
6474729Speter{
6574729Speter	return __xuname(SYS_NMLN, (void *)name);
6674729Speter}
6755205Speter#endif	/* _KERNEL */
681541Srgrimes
691541Srgrimes#endif	/* !_SYS_UTSNAME_H */
70