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