1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1998 by Sun Microsystems, Inc.
24*7c478bd9Sstevel@tonic-gate  * All rights reserved.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #ifndef _SNOOP_SLP_H
28*7c478bd9Sstevel@tonic-gate #define	_SNOOP_SLP_H
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate /*
31*7c478bd9Sstevel@tonic-gate  * Structs and definitions for the snoop SLP interpreter only
32*7c478bd9Sstevel@tonic-gate  * (This code is not used by the SLP library).
33*7c478bd9Sstevel@tonic-gate  */
34*7c478bd9Sstevel@tonic-gate 
35*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
36*7c478bd9Sstevel@tonic-gate extern "C" {
37*7c478bd9Sstevel@tonic-gate #endif
38*7c478bd9Sstevel@tonic-gate 
39*7c478bd9Sstevel@tonic-gate struct slpv1_hdr {
40*7c478bd9Sstevel@tonic-gate 	unsigned char	vers;
41*7c478bd9Sstevel@tonic-gate 	unsigned char	function;
42*7c478bd9Sstevel@tonic-gate 	unsigned short	length;
43*7c478bd9Sstevel@tonic-gate 	unsigned char	flags;
44*7c478bd9Sstevel@tonic-gate 	unsigned char	dialect;
45*7c478bd9Sstevel@tonic-gate 	unsigned char	language[2];
46*7c478bd9Sstevel@tonic-gate 	unsigned short	charset;
47*7c478bd9Sstevel@tonic-gate 	unsigned short	xid;
48*7c478bd9Sstevel@tonic-gate };
49*7c478bd9Sstevel@tonic-gate 
50*7c478bd9Sstevel@tonic-gate struct slpv2_hdr {
51*7c478bd9Sstevel@tonic-gate 	unsigned char	vers;
52*7c478bd9Sstevel@tonic-gate 	unsigned char	function;
53*7c478bd9Sstevel@tonic-gate 	unsigned char	l1, l2, l3;
54*7c478bd9Sstevel@tonic-gate 	unsigned char	flags;
55*7c478bd9Sstevel@tonic-gate 	unsigned char	reserved;
56*7c478bd9Sstevel@tonic-gate 	unsigned char	o1, o2, o3;
57*7c478bd9Sstevel@tonic-gate 	unsigned short	xid;
58*7c478bd9Sstevel@tonic-gate };
59*7c478bd9Sstevel@tonic-gate 
60*7c478bd9Sstevel@tonic-gate /*
61*7c478bd9Sstevel@tonic-gate  *  flags
62*7c478bd9Sstevel@tonic-gate  */
63*7c478bd9Sstevel@tonic-gate #define	V1_OVERFLOW	0x80
64*7c478bd9Sstevel@tonic-gate #define	V1_MONOLINGUAL	0x40
65*7c478bd9Sstevel@tonic-gate #define	V1_URL_AUTH	0x20
66*7c478bd9Sstevel@tonic-gate #define	V1_ATTR_AUTH	0x10
67*7c478bd9Sstevel@tonic-gate #define	V1_FRESH_REG	0x08
68*7c478bd9Sstevel@tonic-gate 
69*7c478bd9Sstevel@tonic-gate #define	V2_OVERFLOW	0x80
70*7c478bd9Sstevel@tonic-gate #define	V2_FRESH	0x40
71*7c478bd9Sstevel@tonic-gate #define	V2_MCAST	0x20
72*7c478bd9Sstevel@tonic-gate 
73*7c478bd9Sstevel@tonic-gate /*
74*7c478bd9Sstevel@tonic-gate  * packet types
75*7c478bd9Sstevel@tonic-gate  */
76*7c478bd9Sstevel@tonic-gate 
77*7c478bd9Sstevel@tonic-gate #define	V1_SRVREQ 1
78*7c478bd9Sstevel@tonic-gate #define	V1_SRVRPLY 2
79*7c478bd9Sstevel@tonic-gate #define	V1_SRVREG 3
80*7c478bd9Sstevel@tonic-gate #define	V1_SRVDEREG 4
81*7c478bd9Sstevel@tonic-gate #define	V1_SRVACK 5
82*7c478bd9Sstevel@tonic-gate #define	V1_ATTRRQST 6
83*7c478bd9Sstevel@tonic-gate #define	V1_ATTRRPLY 7
84*7c478bd9Sstevel@tonic-gate #define	V1_DAADVERT 8
85*7c478bd9Sstevel@tonic-gate #define	V1_SRVTYPERQST 9
86*7c478bd9Sstevel@tonic-gate #define	V1_SRVTYPERPLY 10
87*7c478bd9Sstevel@tonic-gate 
88*7c478bd9Sstevel@tonic-gate #define	V2_SRVRQST	1
89*7c478bd9Sstevel@tonic-gate #define	V2_SRVRPLY	2
90*7c478bd9Sstevel@tonic-gate #define	V2_SRVREG	3
91*7c478bd9Sstevel@tonic-gate #define	V2_SRVDEREG	4
92*7c478bd9Sstevel@tonic-gate #define	V2_SRVACK	5
93*7c478bd9Sstevel@tonic-gate #define	V2_ATTRRQST	6
94*7c478bd9Sstevel@tonic-gate #define	V2_ATTRRPLY	7
95*7c478bd9Sstevel@tonic-gate #define	V2_DAADVERT	8
96*7c478bd9Sstevel@tonic-gate #define	V2_SRVTYPERQST	9
97*7c478bd9Sstevel@tonic-gate #define	V2_SRVTYPERPLY	10
98*7c478bd9Sstevel@tonic-gate #define	V2_SAADVERT	11
99*7c478bd9Sstevel@tonic-gate 
100*7c478bd9Sstevel@tonic-gate /*
101*7c478bd9Sstevel@tonic-gate  * extended packet types
102*7c478bd9Sstevel@tonic-gate  */
103*7c478bd9Sstevel@tonic-gate #define	SCOPERQST 65
104*7c478bd9Sstevel@tonic-gate #define	SCOPERPLY 66
105*7c478bd9Sstevel@tonic-gate #define	DARQST	  67
106*7c478bd9Sstevel@tonic-gate #define	DARPLY	  68
107*7c478bd9Sstevel@tonic-gate #define	DASTRIKE  69
108*7c478bd9Sstevel@tonic-gate 
109*7c478bd9Sstevel@tonic-gate 
110*7c478bd9Sstevel@tonic-gate /*
111*7c478bd9Sstevel@tonic-gate  * error codes
112*7c478bd9Sstevel@tonic-gate  */
113*7c478bd9Sstevel@tonic-gate 
114*7c478bd9Sstevel@tonic-gate #define	OK				0x0000
115*7c478bd9Sstevel@tonic-gate #define	LANG_NOT_SUPPORTED		0x0001
116*7c478bd9Sstevel@tonic-gate #define	PROTOCOL_PARSE_ERR		0x0002
117*7c478bd9Sstevel@tonic-gate #define	INVALID_REGISTRATION		0x0003
118*7c478bd9Sstevel@tonic-gate #define	SCOPE_NOT_SUPPORTED		0x0004
119*7c478bd9Sstevel@tonic-gate #define	CHARSET_NOT_UNDERSTOOD		0x0005
120*7c478bd9Sstevel@tonic-gate #define	AUTHENTICATION_UNKNOWN		0x0005
121*7c478bd9Sstevel@tonic-gate #define	AUTHENTICATION_INVALID		0x0006
122*7c478bd9Sstevel@tonic-gate #define	V2_AUTHENTICATION_ABSENT	0x0006
123*7c478bd9Sstevel@tonic-gate #define	V2_AUTHENTICATION_FAILED	0x0007
124*7c478bd9Sstevel@tonic-gate #define	V2_VER_NOT_SUPPORTED		0x0009
125*7c478bd9Sstevel@tonic-gate #define	NOT_SUPPORTED_YET		0x000a
126*7c478bd9Sstevel@tonic-gate #define	V2_INTERNAL_ERROR		0x000a
127*7c478bd9Sstevel@tonic-gate #define	REQUEST_TIMED_OUT		0x000b
128*7c478bd9Sstevel@tonic-gate #define	V2_DA_BUSY_NOW			0x000b
129*7c478bd9Sstevel@tonic-gate #define	COULD_NOT_INIT_NET_RESOURCES	0x000c
130*7c478bd9Sstevel@tonic-gate #define	V2_OPTION_NOT_UNDERSTOOD	0x000c
131*7c478bd9Sstevel@tonic-gate #define	COULD_NOT_ALLOCATE_MEMORY	0x000d
132*7c478bd9Sstevel@tonic-gate #define	V2_INVALID_UPDATE		0x000d
133*7c478bd9Sstevel@tonic-gate #define	PARAMETER_BAD			0x000e
134*7c478bd9Sstevel@tonic-gate #define	V2_RQST_NOT_SUPPORTED		0x000e
135*7c478bd9Sstevel@tonic-gate #define	INVALID_LIFETIME		0x000f
136*7c478bd9Sstevel@tonic-gate 
137*7c478bd9Sstevel@tonic-gate #define	INTERNAL_NET_ERROR		0x000f
138*7c478bd9Sstevel@tonic-gate #define	INTERNAL_SYSTEM_ERROR		0x0010
139*7c478bd9Sstevel@tonic-gate 
140*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
141*7c478bd9Sstevel@tonic-gate }
142*7c478bd9Sstevel@tonic-gate #endif
143*7c478bd9Sstevel@tonic-gate 
144*7c478bd9Sstevel@tonic-gate #endif	/* _SNOOP_SLP_H */
145