Init
This commit is contained in:
22
diagnostics/lib/include/Makefile
Normal file
22
diagnostics/lib/include/Makefile
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# @(#)Makefile 1.1 92/07/30 SMI;
|
||||
# Include files for libonline.a.
|
||||
#
|
||||
.DEFAULT:
|
||||
sccs get -G$@ $@
|
||||
|
||||
LIBUTIL = libonline.h probe_sundiag.h
|
||||
LIBXDR = dtm_tcm.h tcm_dtm.h
|
||||
|
||||
all: $(LIBUTIL) $(LIBXDR)
|
||||
|
||||
install: all
|
||||
|
||||
clean:
|
||||
|
||||
lint:
|
||||
|
||||
info: FRC
|
||||
sccs info
|
||||
|
||||
FRC:
|
||||
27
diagnostics/lib/include/dtm_tcm.h
Normal file
27
diagnostics/lib/include/dtm_tcm.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
@(#)ATS dtm_tcm.h 1.1 92/07/30 Copyright Sun Microsystems Inc.
|
||||
*/
|
||||
/*
|
||||
* dtm_tcm.h
|
||||
*
|
||||
* This file lists the rpc proc nums for messages from dtm to tcm.
|
||||
*
|
||||
*/
|
||||
|
||||
struct failure { /* when SUNDIAG_ATS_FAILURE/SUNDIAG_ATS_ERROR */
|
||||
long hostid; /* old: int tcm_index */
|
||||
int run_status; /* old: int teststatus */
|
||||
char testname[80]; /* old: char *testname */
|
||||
char devname[80]; /* old: char *devname */
|
||||
char message[600]; /* 600 = MESSAGE_SIZE + time stamp */
|
||||
};
|
||||
|
||||
struct test { /* when SUNDIAG_ATS_STOP, SUNDIAG_ATS_START */
|
||||
long hostid; /* old: int tcm_index */
|
||||
char testname[80]; /* testname is started/stopped */
|
||||
char devname[80]; /* devname */
|
||||
int pass_count; /* pass count */
|
||||
};
|
||||
|
||||
extern xdr_test();
|
||||
extern xdr_failure();
|
||||
19
diagnostics/lib/include/header
Normal file
19
diagnostics/lib/include/header
Normal file
@@ -0,0 +1,19 @@
|
||||
/****************************************************************************
|
||||
NAME:
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
ARGUMENTS:
|
||||
Input:
|
||||
Output:
|
||||
|
||||
DESCRIPTION:
|
||||
|
||||
RETURN VALUE:
|
||||
|
||||
MACROS:
|
||||
|
||||
GLOBAL:
|
||||
|
||||
@(#)header 1.1 7/30/92 SMI
|
||||
*****************************************************************************/
|
||||
72
diagnostics/lib/include/libonline.h
Normal file
72
diagnostics/lib/include/libonline.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/* @(#)libonline.h 1.1 92/07/30 SMI */
|
||||
|
||||
/********************************************************************
|
||||
libonline.h
|
||||
This include file is used for general libonline.a library.
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE ~FALSE
|
||||
#endif
|
||||
|
||||
#define MSG_INDENT 2
|
||||
#define MSG_LINELEN 76
|
||||
/* architecture code */
|
||||
#define ARCH2 0
|
||||
#define ARCH3 1
|
||||
#define ARCH4 2
|
||||
#define ARCH386 3
|
||||
#define ARCH3X 4
|
||||
#define ARCH4C 5
|
||||
#define ARCH4M 7
|
||||
|
||||
#ifndef IDM_ARCH_SUN4C
|
||||
#define IDM_ARCH_SUN4C 0x50
|
||||
#endif
|
||||
|
||||
#ifndef IDM_ARCH_SUN386
|
||||
#define IDM_ARCH_SUN386 0x30
|
||||
#endif
|
||||
|
||||
#ifndef IDM_ARCH_SUN4
|
||||
#define IDM_ARCH_SUN4 0x20 /* arch value for Sun-4 */
|
||||
#endif
|
||||
|
||||
#ifndef IDM_ARCH_SUN3X
|
||||
#define IDM_ARCH_SUN3X 0x40 /* arch value for Sun-3x */
|
||||
#endif
|
||||
|
||||
#ifndef IDM_ARCH_SUN4M
|
||||
#define IDM_ARCH_SUN4M 0x70 /* arch value for Sun-4m */
|
||||
#endif
|
||||
|
||||
/* common diagnostics error message header for log files */
|
||||
extern char *versionid;
|
||||
extern int test_id; /* test id for test_name */
|
||||
extern int version_id; /* test version number (SCCS)*/
|
||||
extern int subtest_id;
|
||||
extern int error_code;
|
||||
extern int error_base; /* priority of error severity */
|
||||
|
||||
/* macro to test sun architecture and unix level, see sdutil.c */
|
||||
#define is_arch(a) ((sun_arch()==(a))? TRUE : FALSE)
|
||||
#define is_unix(a) ((strcmp(sun_unix(),(a)))? FALSE : TRUE)
|
||||
|
||||
#ifndef MIOCSPAM
|
||||
#define MIOCSPAM _IOWR(M, 2, unsigned int) /* set processor affinity mask */
|
||||
#define MIOCGPAM _IOWR(M, 3, unsigned int) /* set processor affinity mask */
|
||||
#endif
|
||||
|
||||
extern int sun_arch(); /* functions defined in sdutil.c */
|
||||
extern char *sun_unix();
|
||||
extern void check_superuser();
|
||||
extern void format_line();
|
||||
extern char *errmsg();
|
||||
extern int get_test_id();
|
||||
extern int get_version_id();
|
||||
extern int get_processors_mask();
|
||||
extern int get_number_processors();
|
||||
61
diagnostics/lib/include/libversion
Normal file
61
diagnostics/lib/include/libversion
Normal file
@@ -0,0 +1,61 @@
|
||||
static sccsid[] = "@(#)libversion 1.1 7/30/92 Sun Microsystems Inc."
|
||||
# libversion
|
||||
# This file is used to control the release of libonline library. Only the
|
||||
# authorized persion can touch this library log. To get the log file updated,
|
||||
# please go to its parent directory and type 'Make library'. It will first
|
||||
# make all the online related libraries and then log the following message:
|
||||
# New Version Log on 'date mark'
|
||||
# Modified from last libversion:
|
||||
# 'libversion version'
|
||||
# Reasons for this new version:
|
||||
# 'Please give reasons'
|
||||
#
|
||||
# GOLDEN RULES for dealing with online library:
|
||||
# 1) If you have new routines which you think useful or helpful to
|
||||
# the development of unix online packages, please let the person
|
||||
# in charge know and send a copy of the routines to him/her for
|
||||
# integration.
|
||||
# 2) You can check the library source out for read, but never check
|
||||
# them back to SCCS after any type of code modification.
|
||||
# 3) You can go to online library directory and type 'make' or
|
||||
# 'make install', but never type 'make library' unless you are
|
||||
# assigned and authorized to do so.
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
New Version Log on Tue Oct 10 12:03:07 PDT 1989
|
||||
Modified from last libversion:
|
||||
libversion 1.1 10/10/89 Sun Microsystems Inc.
|
||||
Reasons for this new version:
|
||||
Created the first verson of libonline. It has the following routines:
|
||||
directory libxdr:
|
||||
dtm_tcm.c: xdr_failure, xdr_test
|
||||
tcm_dtm.c: xdr_option, xdr_strings
|
||||
xdr_probe.c: xdr_devinfo, xdr_meminfo, xdr_tapeinfo, xdr_diskinfo,
|
||||
xdr_u_tag, xdr_found_dev, xdr_f_devs
|
||||
directory libutil:
|
||||
online_util.c: sun_arch, sun_unix, check_superuser, format_line,
|
||||
errmsg, get_test_id, get_version_id, get_sccs_version.
|
||||
|
||||
New Version Log on Mon Nov 6 18:37:57 PST 1989
|
||||
Modified from last libversion:
|
||||
libversion 1.2 10/13/89 Sun Microsystems Inc.
|
||||
Reasons for this new version:
|
||||
Added useful routines from suninfo to online_info.c in
|
||||
directory libutil:
|
||||
online_info.c:
|
||||
search - search a pattern from a file.
|
||||
sort_file - sort a file by alphabetical order.
|
||||
get_date - get a date stamp.
|
||||
mail - send an email.
|
||||
print - print a file.
|
||||
remove_dir_or_file - remove a directory or a file.
|
||||
remove_line - delete a line.
|
||||
remove_lines - remove line/lines.
|
||||
copy_file - copy file or directory.
|
||||
move_file - move an old file to a new file.
|
||||
spawn_sh - spawn off a shell for executing specified command.
|
||||
get_line - get a line.
|
||||
|
||||
|
||||
98
diagnostics/lib/include/probe_sundiag.h
Normal file
98
diagnostics/lib/include/probe_sundiag.h
Normal file
@@ -0,0 +1,98 @@
|
||||
/* @(#)probe_sundiag.h 1.1 92/07/30 SMI */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 by Sun Microsystems, Inc.
|
||||
*/
|
||||
|
||||
/* maximum number of found_dev structs that xdr_found_dev will handle */
|
||||
#define MAXDEVS 100
|
||||
|
||||
/* status for disk */
|
||||
#define NOLABEL -1
|
||||
#define DISKPROB 0
|
||||
#define DISKOK 1
|
||||
/* status for net */
|
||||
#define NETDOWN -1
|
||||
#define NETPROB 0
|
||||
#define NETUP 1
|
||||
/* status for tape */
|
||||
#define OFFLINE -1
|
||||
#define TAPEPROB 0
|
||||
#define ONLINE 1
|
||||
#define FLT_COMP 2 /* supports compression mode */
|
||||
/* status for mcp/alm2 */
|
||||
#define IFDDEVONLY -1
|
||||
#define NOMCPTTYDEV 0
|
||||
#define MCPOK 1
|
||||
/* status for fpa3x */
|
||||
#define FPA3X_EXIST 2
|
||||
/* status for fpu2 */
|
||||
#define FPU2_EXIST 2
|
||||
|
||||
/* enumerated types for discriminated union, as per XDR */
|
||||
enum utype { GENERAL_DEV=1,
|
||||
MEM_DEV=2,
|
||||
TAPE_DEV=3,
|
||||
DISK_DEV=4 };
|
||||
|
||||
/* generalized device info */
|
||||
struct gendev_info {
|
||||
int status;
|
||||
};
|
||||
|
||||
/* memory device info */
|
||||
struct mem_info {
|
||||
int amt;
|
||||
};
|
||||
|
||||
/* tape device info */
|
||||
struct tape_info {
|
||||
int status;
|
||||
char *ctlr;
|
||||
int ctlr_num;
|
||||
short t_type;
|
||||
};
|
||||
|
||||
/* disk device info */
|
||||
struct disk_info {
|
||||
int amt;
|
||||
int status;
|
||||
char *ctlr;
|
||||
int ctlr_num;
|
||||
int ctlr_type; /* index to the controller name array */
|
||||
};
|
||||
|
||||
/* discriminated union, as per XDR */
|
||||
struct u_tag {
|
||||
enum utype utype;
|
||||
union {
|
||||
struct gendev_info devinfo;
|
||||
struct disk_info diskinfo;
|
||||
struct mem_info meminfo;
|
||||
struct tape_info tapeinfo;
|
||||
} uval;
|
||||
};
|
||||
|
||||
/*
|
||||
* found_dev struct contains device_name, as per the above abbreviations, unit
|
||||
* number (0 if not strictly applicable), and u_tag of device-specific info
|
||||
*/
|
||||
struct found_dev {
|
||||
char *device_name;
|
||||
int unit;
|
||||
struct u_tag u_tag;
|
||||
};
|
||||
|
||||
/*
|
||||
* f_devs struct contains the cpuname, number (num) of found_dev structs
|
||||
* (indicating the number of devices found), and then the found_dev struct(s)
|
||||
*/
|
||||
struct f_devs {
|
||||
int cputype;
|
||||
char *cpuname;
|
||||
u_int num;
|
||||
struct found_dev *found_dev;
|
||||
};
|
||||
|
||||
/* XDR function to encode/decode the f_devs struct */
|
||||
int xdr_f_devs();
|
||||
22
diagnostics/lib/include/tcm_dtm.h
Normal file
22
diagnostics/lib/include/tcm_dtm.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
@(#)ATS tcm_dtm.h 1.1 92/07/30 Copyright Sun Microsystems Inc.
|
||||
*/
|
||||
/*
|
||||
* tcm_dtm.h
|
||||
*
|
||||
* This files lists the rpc proc nums for messages from tcm to dtm.
|
||||
*
|
||||
*/
|
||||
|
||||
struct strings {
|
||||
int num;
|
||||
char op[5][80];
|
||||
};
|
||||
|
||||
struct option_file {
|
||||
char fname[80];
|
||||
int action;
|
||||
};
|
||||
|
||||
extern xdr_strings();
|
||||
extern xdr_option();
|
||||
Reference in New Issue
Block a user