DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T s

⟦667a95cff⟧ TextFile

    Length: 4646 (0x1226)
    Types: TextFile
    Names: »smi.h«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦e83f91978⟧ »EurOpenD22/isode/osimis-2.0.tar.Z« 
        └─⟦d846658bd⟧ 
            └─⟦this⟧ »osimis/h/smi.h« 

TextFile

/*
 * Copyright (c) 1988 University College London
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms are permitted
 * provided that the above copyright notice and this paragraph are
 * duplicated in all such forms and that any documentation,
 * advertising materials, and other materials related to such
 * distribution and use acknowledge that the software was developed
 * by the Department of Computer Science, University College London.
 * The name of the University may not be used to
 * endorse or promote products derived from this software without
 * specific prior written permission.
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

/* Data structures for managed object attributes (defined in SMI doc) */

/* managed object attributes first */

typedef struct Counter
    {
    int     Value;
    struct C_Threshold * Threshold;	/* threshold applied to this
				           counter */
    } Counter;

typedef struct Gauge
    {
    int     Value;
    struct G_Threshold * Threshold;     /* threshold applied */
    } Gauge;

typedef struct DefinedEvent
    {
    OIDentifier eventype;
    struct MO_ID * rcis[3];     /* IDs of associated report controls */
    } DefinedEvent;

typedef int State;	/* takes only a limited number of states */
			/* can this be related to a defined event? */

typedef enum T_ProtocolState
    {
    undefined,
    tp0,
    tp1,
    tp2,
    tp3,
    tp4
    } T_ProtocolState;

typedef struct ComparisonLevels	/* this attribute is needed by thresholds */
    {
    int levels[10];    		/* upto 10 comparison levels */
#   define COMP_LEVEL_FREE -1   /* indicates level is not used */
    } ComparisonLevels;

typedef char Onoff;     	/* 0 = off, else on */

typedef int Hysteresis;         /* hysteresis value for thresholds */

typedef int Offset;     	/* offset value for thresholds */

typedef struct destinations     /* list of destinations for report control */
    {
    struct destinations * Next; /* linked list */
    int type;       		/* form of destination */
#   define RCI_DEST_PSAP 0
#   define RCI_DEST_AEI  1
#   define RCI_DEST_FD   2
    union
	{
	struct PSAPaddr psap;
	AEI aei;
	int fd;
	} un;
#   define Psap_dest un.psap
#   define Aei_dest un.aei
#   define Fd_dest un.fd
    } destinations;


/* managed object structures */

struct ManagedObject    	/* this contains generic stuff and will be
		       		   used for all managed objects */
    {
    struct ManagedObject * sibling;     /* linked list for same level */
    OIDentifier     rdntype;    /* distinguishing name type */
    short   rdnlen;         	/* length of value */
    char    rdnval[10];     	/* the name value - is this long enough? */
    struct ManagedObject * subordinate; /* first MO in lower level */
    struct ManagedObject * parent;	/* immediate ancestor */
    OIDentifier     Class;  	/* isode OBJECT IDENTIFIER for class */
    caddr_t     attributes; 	/* pointer to structure containing
			    	   specific attributes for this MO.
			    	   Should be a huge union of pointers */
    int (*do_get)();        	/* routine to perform CMIS GET */
    int (*do_set)();        	/* routine to perform CMIS SET */
    int (*do_add)();
    int (*do_remove)();
    int (*do_action)();     	/* routine to perform CMIS ACTION */
    };

/* Counter Threshold */
/* mibtypes OID ::= {uclmanagement mib(3)}
/* {mibtypes cThreshold(1)},  Type ID {mibtypes 1 Id(1)} */
typedef struct C_Threshold 	/* threshold on counter */
    {
    ComparisonLevels     Levels;	/* 2 */
#   define comparisonlevel Levels.levels
    Offset   offset; 			/* 3 */
    Onoff    OnOff; 			/* 4 */
    DefinedEvent * triggers[4];     	/* associated with defined events */
    } C_Threshold;
/* this structure would be pointed to by `attributes' in the ManagedObject
 * struct above, for managed objects which are Counter Thresholds.
 */

/* Gauge Threshold */
/* {mibtypes gThreshold(2)},  Type ID {mibtypes 2 Id(1)} */
typedef struct G_Threshold /* threshold on gauge */
    {
    ComparisonLevels     Levels; 	/* 2 */
    Hysteresis   hysteresis; 		/* 3 */
    Onoff    OnOff; 			/* 4 */
    DefinedEvent * triggers[4];     /* associated with defined events */
    } G_Threshold;

/* Report Control Information */
/* {mibtypes reportControl(3)},  Type ID {mibtypes 3 Id(1)} */
typedef struct ReportControl
    {
/* one attribute, a list of destinations */
    destinations * listofdests; 	/* 2 */
    int (*MakeEventReport)();
    } ReportControl;