/*
 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
 *
 * U.S. Government Rights - Commercial software. Government users are subject
 * to the Sun Microsystems, Inc. standard license agreement and applicable
 * provisions of the FAR and its supplements.
 *
 *
 * This distribution may include materials developed by third parties. Sun,
 * Sun Microsystems, the Sun logo and Solaris are trademarks or registered
 * trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
 *
 */
/*
 * Note: this file originally auto-generated by mib2c using
 *         : mib2c.iterate.conf,v 5.5 2002/12/16 22:50:18 hardaker Exp $
 */
#ifndef SUNPROCESSES_H
#define SUNPROCESSES_H


/* function declarations */
void init_sunProcesses(void);
void initialize_table_sunProcessTable(void);
Netsnmp_Node_Handler sunProcessTable_handler;

Netsnmp_First_Data_Point  sunProcessTable_get_first_data_point;
Netsnmp_Next_Data_Point   sunProcessTable_get_next_data_point;

/* column number definitions for table sunProcessTable */
#define COLUMN_PSPROCESSID          1
#define COLUMN_PSPARENTPROCESSID    2
#define COLUMN_PSPROCESSSIZE        3
#define COLUMN_PSPROCESSCPUTIME     4
#define COLUMN_PSPROCESSSTATE       5
#define COLUMN_PSPROCESSWAITCHANNEL 6
#define COLUMN_PSPROCESSTTY         7
#define COLUMN_PSPROCESSUSERNAME    8
#define COLUMN_PSPROCESSUSERID      9
#define COLUMN_PSPROCESSNAME       10
#define COLUMN_PSPROCESSSTATUS     11

#define USRNM_SZ 16
#define WCHAN_SZ 16
#define TTYNM_SZ 16
#define STAT_SZ 4
#define CMD_SZ 64

typedef struct ps_data_s
    {
    uid_t   uid;
    pid_t   pid;
    pid_t   ppid;
    int     sz;
    time_t  cpu;
    char    stat[STAT_SZ+1];
    char    wchan[WCHAN_SZ+1];
    char    tty[TTYNM_SZ+1];
    char    usrname[USRNM_SZ+1];
    char    cmd[CMD_SZ+1];
    } ps_data_t;
#define PS_NULL (ps_data_t *)0

typedef struct ps_ldata_s
    {
    struct ps_ldata_s        *link;
    ps_data_t                pdata;
    } ps_ldata_t;
#define PS_LNULL (ps_ldata_t *)0

extern time_t cache_now;
extern ps_data_t *pstable;
extern int pstable_lines;

#endif /* SUNPROCESSES_H */
