⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 slp.h

📁 SLP协议在linux下的实现。此版本为1.2.1版。官方网站为www.openslp.org
💻 H
📖 第 1 页 / 共 5 页
字号:
/***************************************************************************//*                                                                         *//* Project:     OpenSLP - OpenSource implementation of Service Location    *//*              Protocol                                                   *//*                                                                         *//* File:        slp.h                                                      *//*                                                                         *//* Abstract:    Main header file for the SLP API exactly as described by   *//*              rfc2614.  This is the only file that needs to be included  *//*              in order make all SLP API declarations.                    *//*                                                                         *//* Author(s)    Matt Peterson <mpeterson@caldera.com>                      *//*-------------------------------------------------------------------------*//*                                                                         *//*     Please submit patches to http://www.openslp.org                     *//*                                                                         *//*-------------------------------------------------------------------------*//*                                                                         *//* Copyright (C) 2000 Caldera Systems, Inc                                 *//* All rights reserved.                                                    *//*                                                                         *//* Redistribution and use in source and binary forms, with or without      *//* modification, are permitted provided that the following conditions are  *//* met:                                                                    */ /*                                                                         *//*      Redistributions of source code must retain the above copyright     *//*      notice, this list of conditions and the following disclaimer.      *//*                                                                         *//*      Redistributions in binary form must reproduce the above copyright  *//*      notice, this list of conditions and the following disclaimer in    *//*      the documentation and/or other materials provided with the         *//*      distribution.                                                      *//*                                                                         *//*      Neither the name of Caldera Systems nor the names of its           *//*      contributors may be used to endorse or promote products derived    *//*      from this software without specific prior written permission.      *//*                                                                         *//* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS     *//* `AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT      *//* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR   *//* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CALDERA      *//* SYSTEMS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, *//* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT        *//* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE,  *//* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON       *//* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *//* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   *//* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    *//*                                                                         *//***************************************************************************/#if(!defined SLP_H_INCLUDED)#define SLP_H_INCLUDED#if(defined __cplusplus)extern "C"{#endif#if defined(_WIN32) && defined(_MSC_VER)/* MSVC auto-exports, BCB uses .def file */# define SLPCALLBACK# ifdef LIBSLP_EXPORTS#  define SLPEXP __declspec(dllexport)# elif defined(LIBSLP_STATIC)#  define SLPEXP# else#  define SLPEXP __declspec(dllimport)# endif# define SLPAPI#else# define SLPCALLBACK# define SLPEXP# define SLPAPI#endif/*==========================================================================*//* lifetime values, in  seconds, that are frequently used.                  *//*==========================================================================*/#define SLP_LIFETIME_DEFAULT 10800   /* 3 hours  */#define SLP_LIFETIME_MAXIMUM 65535   /* 18 hours *//*==========================================================================*//* SLPError                                                                 *//* ---------                                                                *//* The SLPError type represents error codes that are returned from API      *//* functions.                                                               */typedef int SLPError;#define  SLP_LAST_CALL              1/* passed to callback functions when the API                            *//* library has no more data for them and therefore no further calls     *//* will be made to the callback on the currently outstanding operation. *//* The callback can use this to signal the main body of the client code *//* that no more data will be forthcoming on the operation, so that the  *//* main body of the client code can break out of data collection loops. *//* On * the last call of a callback during both a synchronous and       *//* asynchronous call, the error code parameter has value SLP_LAST_CALL, *//* and the other parameters are all NULL. If no results are returned by *//* an API operation, then only one call is made, with the error         *//* parameter set to SLP_LAST_CALL.                                      */#define SLP_OK                      0/* indicates that the no error occurred during the operation.           */#define SLP_LANGUAGE_NOT_SUPPORTED  -1/* No DA or SA has service advertisement or attribute information       *//* in the language requested, but at least one DA or SA indicated,      *//* via the LANGUAGE_NOT_SUPPORTED error code, that it might have        *//* information for that service in another language                     */#define SLP_PARSE_ERROR             -2/* The SLP message was rejected by a remote SLP agent.  The API         *//* returns this error only when no information was retrieved, and       *//* at least one SA or DA indicated a protocol error.  The data          *//* supplied through the API may be malformed or a may have been         *//* damaged in transit.                                                  */#define SLP_INVALID_REGISTRATION    -3/* The API may return this error if an attempt to register a            *//* service was rejected by all DAs because of a malformed URL or        *//* attributes.  SLP does not return the error if at least one DA        *//* accepted the registration.                                           */#define SLP_SCOPE_NOT_SUPPORTED     -4/* The API returns this error if the SA has been configured with        *//* net.slp.useScopes value-list of scopes and the SA request did        *//* not specify one or more of these allowable scopes, and no            *//* others.  It may be returned by a DA or SA if the scope included      *//* in a request is not supported by the DA or SA.                       */#define SLP_AUTHENTICATION_ABSENT   -6/* if the SLP framework supports authentication, this error arises      *//* when the UA or SA failed to send an authenticator for requests       *//* or registrations in a protected scope.                               */#define SLP_AUTHENTICATION_FAILED   -7/* If the SLP framework supports authentication, this error arises      *//* when a authentication on an SLP message failed                       */#define SLP_INVALID_UPDATE          -13/* An update for a non-existing registration was issued, or the         *//* update includes a service type or scope different than that in       *//* the initial registration, etc.                                       */#define SLP_REFRESH_REJECTED        -15/* The SA attempted to refresh a registration more frequently           *//* than the minimum refresh interval.  The SA should call the           *//* appropriate API function to obtain the minimum refresh interval      *//* to use.                                                              */#define SLP_NOT_IMPLEMENTED         -17/* If an unimplemented feature is used, this error is returned.         */#define SLP_BUFFER_OVERFLOW         -18/* An outgoing request overflowed the maximum network MTU size.         *//* The request should be reduced in size or broken into pieces and      *//* tried again.                                                         */#define SLP_NETWORK_TIMED_OUT       -19/* When no reply can be obtained in the time specified by the           *//* configured timeout interval for a unicast request, this error        *//* is returned.                                                         */#define SLP_NETWORK_INIT_FAILED     -20/* If the network cannot initialize properly, this error is             *//* returned.  Will also be returned if an SA or DA agent (slpd)         *//* can not be contacted. See SLPRegReport() callback.                   */#define SLP_MEMORY_ALLOC_FAILED     -21/* Out of memory error */#define SLP_PARAMETER_BAD           -22/* If a parameter passed into an interface is bad, this error is        *//* returned.                                                            */#define SLP_NETWORK_ERROR           -23/* The failure of networking during normal operations causes this       *//* error to be returned.                                                */#define SLP_INTERNAL_SYSTEM_ERROR   -24

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -