utsname.h revision 74740
1228753Smm/*-
2228753Smm * Copyright (c) 1994
3228753Smm *	The Regents of the University of California.  All rights reserved.
4228753Smm *
5228753Smm * This code is derived from software contributed to Berkeley by
6228753Smm * Chuck Karish of Mindcraft, Inc.
7228753Smm *
8228753Smm * Redistribution and use in source and binary forms, with or without
9228753Smm * modification, are permitted provided that the following conditions
10228753Smm * are met:
11228753Smm * 1. Redistributions of source code must retain the above copyright
12228753Smm *    notice, this list of conditions and the following disclaimer.
13228753Smm * 2. Redistributions in binary form must reproduce the above copyright
14228753Smm *    notice, this list of conditions and the following disclaimer in the
15228753Smm *    documentation and/or other materials provided with the distribution.
16228753Smm * 3. All advertising materials mentioning features or use of this software
17228753Smm *    must display the following acknowledgement:
18232153Smm *	This product includes software developed by the University of
19299529Smm *	California, Berkeley and its contributors.
20228753Smm * 4. Neither the name of the University nor the names of its contributors
21228753Smm *    may be used to endorse or promote products derived from this software
22228753Smm *    without specific prior written permission.
23299529Smm *
24228753Smm * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25342360Smm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26342360Smm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27342360Smm * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28342360Smm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29342360Smm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30342360Smm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31342360Smm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32228753Smm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33228753Smm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34228753Smm * SUCH DAMAGE.
35228753Smm *
36228753Smm *	@(#)utsname.h	8.1 (Berkeley) 1/4/94
37228753Smm * $FreeBSD: head/sys/sys/utsname.h 74740 2001-03-24 08:37:56Z peter $
38228753Smm */
39228753Smm
40228753Smm#ifndef	_SYS_UTSNAME_H
41228753Smm#define	_SYS_UTSNAME_H
42228753Smm
43342360Smm#ifdef _KERNEL
44228753Smm#define	SYS_NMLN	32		/* uname(2) for the FreeBSD 1.1 ABI. */
45228753Smm#endif
46228753Smm
47228753Smm#ifndef SYS_NMLN
48228753Smm#define	SYS_NMLN	256		/* User can override. */
49228753Smm#endif
50228753Smm
51228753Smmstruct utsname {
52228753Smm	char	sysname[SYS_NMLN];	/* Name of this OS. */
53228753Smm	char	nodename[SYS_NMLN];	/* Name of this network node. */
54228753Smm	char	release[SYS_NMLN];	/* Release level. */
55228753Smm	char	version[SYS_NMLN];	/* Version level. */
56228753Smm	char	machine[SYS_NMLN];	/* Hardware type. */
57228753Smm};
58228753Smm
59228753Smm#include <sys/cdefs.h>
60228753Smm
61228753Smm#ifndef _KERNEL
62228753Smm__BEGIN_DECLS
63228753Smmint	__xuname(int, void *);		/* Variable record size. */
64228753Smm__END_DECLS
65228753Smm
66static __inline int
67uname(struct utsname *name)
68{
69	return __xuname(SYS_NMLN, (void *)name);
70}
71#endif	/* _KERNEL */
72
73#endif	/* !_SYS_UTSNAME_H */
74