summaryrefslogtreecommitdiffstats
path: root/private/inc/sys/snet/snmp.h
blob: b903daea79e6bcd17d1dac756da34a14ed13fac3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/*++

Copyright (c) 1991  Microsoft Corporation

Module Name:

    snmp.h

Abstract:

    This module contains SNMP definitions for STREAMS TCP/IP drivers.

Author:

    Eric Chin (ericc)           July 18, 1991

Revision History:

--*/

/*************************************************************************
 *
 *  SpiderSNMP
 *
 *  Copyright 1990  Spider Systems Limited
 *
 *  SNMP.H
 *
 *  Daemon/kernel interface
 *
 *
 *************************************************************************/

/*
 *	 /usr/projects/spare/PBRAIN/SCCS/pbrainG/dev/src/include/sys/snet/0/s.snmp.h
 *	@(#)snmp.h	1.1
 *
 *	Last delta created	10:15:32 3/1/90
 *	This file extracted	08:53:47 7/10/91
 *
 *	Modifications:
 *
 *	GSS 01/03/90	put in Pbrain
 */

#ifndef _SYS_SNET_SNMP_
#define _SYS_SNET_SNMP_


/*
 * Values for the 'ic_cmd' field of I_STR ioctls.
 * These indicate the request to be performed.
 * These should be ored with the constants below, which specify
 * the variables on which the request should be performed.
 */

#define SNMPIOC			('M' << 8)

#define SNMP_GET_REQ		(SNMPIOC | (0 << 5))
#define SNMP_GETNEXT_REQ	(SNMPIOC | (1 << 5))
#define SNMP_SET_REQ		(SNMPIOC | (3 << 5))

#define SNMP_REQ_MASK		(SNMPIOC | (7 << 5))

/*
 * Values for the 'ic_cmd' field of I_STR ioctls.
 * These indicate the variables to be affected.
 * These should be ored with the constants above, which specify
 * the type of request.
 */

#define	SNMP_IF			0
#define	SNMP_IFENTRY		1
#define	SNMP_ATENTRY		2
#define	SNMP_IP			3
#define	SNMP_IPADDRENTRY	4
#define	SNMP_IPROUTEENTRY	5
#define	SNMP_ICMP		6
#define	SNMP_TCP		7
#define	SNMP_TCPCONNENTRY	8
#define	SNMP_UDP		9
#define	SNMP_UDPENTRY	10

#define SNMP_VAR_MASK		31

/*
 * Values for the 'ic_cmd' field of I_STR ioctls.
 * This indicates that an SNMP control message
 * is being sent.
 */

#define SNMP_CONTROL		(SNMPIOC | (7 << 5) | 0)

/*
 * init structure for SNMP
 */

struct snmp_init
{
        uint8 prim_type;
	u_long since;
};

#define SNMP_INIT		1

/*
 * trap structure for SNMP;
 * currently this is only used between drivers
 */

struct snmp_trap
{
	int prim_type;
	long generic_trap;
	long specific_trap;
	int info_len;			/* length of info in bytes */
	char info[1];			/* "interesting" information */
};

/*
 * values for "generic_trap"
 */

#define SNMP_TRAP_ENTSPEC	6

/*
 * values for "specific_trap" are the same as the interface status field
 * i.e. up(1), down(2), testing(3).
 */

#endif /* _SYS_SNET_SNMP_ */