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