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 #pragma ident "%Z%%M% %I% %E% SMI" 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate /* 33*7c478bd9Sstevel@tonic-gate * Structs and definitions for the snoop SLP interpreter only 34*7c478bd9Sstevel@tonic-gate * (This code is not used by the SLP library). 35*7c478bd9Sstevel@tonic-gate */ 36*7c478bd9Sstevel@tonic-gate 37*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 38*7c478bd9Sstevel@tonic-gate extern "C" { 39*7c478bd9Sstevel@tonic-gate #endif 40*7c478bd9Sstevel@tonic-gate 41*7c478bd9Sstevel@tonic-gate struct slpv1_hdr { 42*7c478bd9Sstevel@tonic-gate unsigned char vers; 43*7c478bd9Sstevel@tonic-gate unsigned char function; 44*7c478bd9Sstevel@tonic-gate unsigned short length; 45*7c478bd9Sstevel@tonic-gate unsigned char flags; 46*7c478bd9Sstevel@tonic-gate unsigned char dialect; 47*7c478bd9Sstevel@tonic-gate unsigned char language[2]; 48*7c478bd9Sstevel@tonic-gate unsigned short charset; 49*7c478bd9Sstevel@tonic-gate unsigned short xid; 50*7c478bd9Sstevel@tonic-gate }; 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gate struct slpv2_hdr { 53*7c478bd9Sstevel@tonic-gate unsigned char vers; 54*7c478bd9Sstevel@tonic-gate unsigned char function; 55*7c478bd9Sstevel@tonic-gate unsigned char l1, l2, l3; 56*7c478bd9Sstevel@tonic-gate unsigned char flags; 57*7c478bd9Sstevel@tonic-gate unsigned char reserved; 58*7c478bd9Sstevel@tonic-gate unsigned char o1, o2, o3; 59*7c478bd9Sstevel@tonic-gate unsigned short xid; 60*7c478bd9Sstevel@tonic-gate }; 61*7c478bd9Sstevel@tonic-gate 62*7c478bd9Sstevel@tonic-gate /* 63*7c478bd9Sstevel@tonic-gate * flags 64*7c478bd9Sstevel@tonic-gate */ 65*7c478bd9Sstevel@tonic-gate #define V1_OVERFLOW 0x80 66*7c478bd9Sstevel@tonic-gate #define V1_MONOLINGUAL 0x40 67*7c478bd9Sstevel@tonic-gate #define V1_URL_AUTH 0x20 68*7c478bd9Sstevel@tonic-gate #define V1_ATTR_AUTH 0x10 69*7c478bd9Sstevel@tonic-gate #define V1_FRESH_REG 0x08 70*7c478bd9Sstevel@tonic-gate 71*7c478bd9Sstevel@tonic-gate #define V2_OVERFLOW 0x80 72*7c478bd9Sstevel@tonic-gate #define V2_FRESH 0x40 73*7c478bd9Sstevel@tonic-gate #define V2_MCAST 0x20 74*7c478bd9Sstevel@tonic-gate 75*7c478bd9Sstevel@tonic-gate /* 76*7c478bd9Sstevel@tonic-gate * packet types 77*7c478bd9Sstevel@tonic-gate */ 78*7c478bd9Sstevel@tonic-gate 79*7c478bd9Sstevel@tonic-gate #define V1_SRVREQ 1 80*7c478bd9Sstevel@tonic-gate #define V1_SRVRPLY 2 81*7c478bd9Sstevel@tonic-gate #define V1_SRVREG 3 82*7c478bd9Sstevel@tonic-gate #define V1_SRVDEREG 4 83*7c478bd9Sstevel@tonic-gate #define V1_SRVACK 5 84*7c478bd9Sstevel@tonic-gate #define V1_ATTRRQST 6 85*7c478bd9Sstevel@tonic-gate #define V1_ATTRRPLY 7 86*7c478bd9Sstevel@tonic-gate #define V1_DAADVERT 8 87*7c478bd9Sstevel@tonic-gate #define V1_SRVTYPERQST 9 88*7c478bd9Sstevel@tonic-gate #define V1_SRVTYPERPLY 10 89*7c478bd9Sstevel@tonic-gate 90*7c478bd9Sstevel@tonic-gate #define V2_SRVRQST 1 91*7c478bd9Sstevel@tonic-gate #define V2_SRVRPLY 2 92*7c478bd9Sstevel@tonic-gate #define V2_SRVREG 3 93*7c478bd9Sstevel@tonic-gate #define V2_SRVDEREG 4 94*7c478bd9Sstevel@tonic-gate #define V2_SRVACK 5 95*7c478bd9Sstevel@tonic-gate #define V2_ATTRRQST 6 96*7c478bd9Sstevel@tonic-gate #define V2_ATTRRPLY 7 97*7c478bd9Sstevel@tonic-gate #define V2_DAADVERT 8 98*7c478bd9Sstevel@tonic-gate #define V2_SRVTYPERQST 9 99*7c478bd9Sstevel@tonic-gate #define V2_SRVTYPERPLY 10 100*7c478bd9Sstevel@tonic-gate #define V2_SAADVERT 11 101*7c478bd9Sstevel@tonic-gate 102*7c478bd9Sstevel@tonic-gate /* 103*7c478bd9Sstevel@tonic-gate * extended packet types 104*7c478bd9Sstevel@tonic-gate */ 105*7c478bd9Sstevel@tonic-gate #define SCOPERQST 65 106*7c478bd9Sstevel@tonic-gate #define SCOPERPLY 66 107*7c478bd9Sstevel@tonic-gate #define DARQST 67 108*7c478bd9Sstevel@tonic-gate #define DARPLY 68 109*7c478bd9Sstevel@tonic-gate #define DASTRIKE 69 110*7c478bd9Sstevel@tonic-gate 111*7c478bd9Sstevel@tonic-gate 112*7c478bd9Sstevel@tonic-gate /* 113*7c478bd9Sstevel@tonic-gate * error codes 114*7c478bd9Sstevel@tonic-gate */ 115*7c478bd9Sstevel@tonic-gate 116*7c478bd9Sstevel@tonic-gate #define OK 0x0000 117*7c478bd9Sstevel@tonic-gate #define LANG_NOT_SUPPORTED 0x0001 118*7c478bd9Sstevel@tonic-gate #define PROTOCOL_PARSE_ERR 0x0002 119*7c478bd9Sstevel@tonic-gate #define INVALID_REGISTRATION 0x0003 120*7c478bd9Sstevel@tonic-gate #define SCOPE_NOT_SUPPORTED 0x0004 121*7c478bd9Sstevel@tonic-gate #define CHARSET_NOT_UNDERSTOOD 0x0005 122*7c478bd9Sstevel@tonic-gate #define AUTHENTICATION_UNKNOWN 0x0005 123*7c478bd9Sstevel@tonic-gate #define AUTHENTICATION_INVALID 0x0006 124*7c478bd9Sstevel@tonic-gate #define V2_AUTHENTICATION_ABSENT 0x0006 125*7c478bd9Sstevel@tonic-gate #define V2_AUTHENTICATION_FAILED 0x0007 126*7c478bd9Sstevel@tonic-gate #define V2_VER_NOT_SUPPORTED 0x0009 127*7c478bd9Sstevel@tonic-gate #define NOT_SUPPORTED_YET 0x000a 128*7c478bd9Sstevel@tonic-gate #define V2_INTERNAL_ERROR 0x000a 129*7c478bd9Sstevel@tonic-gate #define REQUEST_TIMED_OUT 0x000b 130*7c478bd9Sstevel@tonic-gate #define V2_DA_BUSY_NOW 0x000b 131*7c478bd9Sstevel@tonic-gate #define COULD_NOT_INIT_NET_RESOURCES 0x000c 132*7c478bd9Sstevel@tonic-gate #define V2_OPTION_NOT_UNDERSTOOD 0x000c 133*7c478bd9Sstevel@tonic-gate #define COULD_NOT_ALLOCATE_MEMORY 0x000d 134*7c478bd9Sstevel@tonic-gate #define V2_INVALID_UPDATE 0x000d 135*7c478bd9Sstevel@tonic-gate #define PARAMETER_BAD 0x000e 136*7c478bd9Sstevel@tonic-gate #define V2_RQST_NOT_SUPPORTED 0x000e 137*7c478bd9Sstevel@tonic-gate #define INVALID_LIFETIME 0x000f 138*7c478bd9Sstevel@tonic-gate 139*7c478bd9Sstevel@tonic-gate #define INTERNAL_NET_ERROR 0x000f 140*7c478bd9Sstevel@tonic-gate #define INTERNAL_SYSTEM_ERROR 0x0010 141*7c478bd9Sstevel@tonic-gate 142*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 143*7c478bd9Sstevel@tonic-gate } 144*7c478bd9Sstevel@tonic-gate #endif 145*7c478bd9Sstevel@tonic-gate 146*7c478bd9Sstevel@tonic-gate #endif /* _SNOOP_SLP_H */ 147