pss.h revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1989-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
*
* process status stream interface definitions
*/
#ifndef _PSS_H
#define _PSS_H 1
#include <ast.h>
#define PSS_VERSION 20101201L
#define PSS_FLAGS 0xff
#define PSS_SCAN 0
#define PSS_ZOMBIE 'Z'
#define PSS_addr (1<<0)
typedef long Pss_dev_t;
typedef long Pss_id_t;
typedef struct Pssent_s
{
int pss;
void* addr;
void* wchan;
char* args;
char* command;
char* sched;
char* ttyname;
unsigned long time;
long nice;
long pri;
int cpu;
int flags;
int proc;
int refcount;
int state;
} Pssent_t;
typedef struct Pssdata_s
{
unsigned long data;
} Pssdata_t;
typedef struct Pssmatch_s
{
struct Pssmatch_s* next;
unsigned long field;
} Pssmatch_t;
typedef struct Pssdisc_s
{
unsigned long version; /* interface version */
unsigned long fields; /* PSS_[a-z]* field requests */
unsigned long flags; /* PSS_[A-Z]* flags */
char* command; /* caller command path */
} Pssdisc_t;
typedef struct Pssmeth_s
{
const char* name; /* method name */
const char* usage; /* method usage */
unsigned long fields; /* supported fields */
} Pssmeth_t;
struct Pss_s
{
const char* id; /* library id string */
#ifdef _PSS_PRIVATE_
#endif
};
#define pssinit(d,c,e) (memset(d,0,sizeof(*(d))),(d)->version=PSS_VERSION,(d)->command=(char*)(c),(d)->errorf=(Error_f)(e))
#endif