The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::SLP - Perl extension for accessing the Service Location Protocol (SLP) API. SLP can be used to discover the location of services

SYNOPSIS

use Net::SLP; my $handle; Net::SLP::SLPOpen('', 0, $handle); Net::SLP::SLPReg($handle, 'service:mytestservice.x://zulu.open.com.au:9048', # URL Net::SLP::SLP_LIFETIME_MAXIMUM, # lifetime '', # srvtype (ignored) '(attr1=val1),(attr2=val2),(attr3=val3)', # attrs 1, # Register. SLP does not support reregister. \&regcallback) Net::SLP::SLPFindSrvs($handle, 'mytestservice.x', '', '', \&urlcallback); Net::SLP::SLPClose($handle);

# Called when a service is registered or deregisted with # SLPReg(), SLPDeReg() and SLPDelAttrs() functions. sub regcallback { my ($errcode) = @_; } # Called when a service URL is available from SLPFindSrvs # This callback returns SLP_TRUE if it wishes to be called again if there is more # data, else SLP_FALSE # If $errcode == SLP_LAST_CALL, then there is no more data sub urlcallback { my ($srvurl, $lifetime, $errcode) = @_; return Net::SLP::SLP_TRUE; }

DESCRIPTION

SLP is the Service Location Protocol, a protocol fpor discovering the location and attributes of servers for some required service. There is a standard C API for SLP, and this module is a wrapper around that API. The API is described in RFC2614, see which for detailed API usage. All RFC2614 functions are implmeneted except for SLPParseSrvURL() and SLPFree().

EXPORT

None by default.

Exportable constants

  SLP_AUTHENTICATION_ABSENT
  SLP_AUTHENTICATION_FAILED
  SLP_BUFFER_OVERFLOW
  SLP_FALSE
  SLP_HANDLE_IN_USE
  SLP_INTERNAL_SYSTEM_ERROR
  SLP_INVALID_REGISTRATION
  SLP_INVALID_UPDATE
  SLP_LANGUAGE_NOT_SUPPORTED
  SLP_LAST_CALL
  SLP_LIFETIME_DEFAULT
  SLP_LIFETIME_MAXIMUM
  SLP_MEMORY_ALLOC_FAILED
  SLP_NETWORK_ERROR
  SLP_NETWORK_INIT_FAILED
  SLP_NETWORK_TIMED_OUT
  SLP_NOT_IMPLEMENTED
  SLP_OK
  SLP_PARAMETER_BAD
  SLP_PARSE_ERROR
  SLP_REFRESH_REJECTED
  SLP_SCOPE_NOT_SUPPORTED
  SLP_TRUE
  SLP_TYPE_ERROR

SEE ALSO

Openslp Programmer Guide http://www.openslp.org RFC2608 (SLPv2) RFC2614 (SLP API)

AUTHOR

Mike McCauley, <mikem@open.com.au>

COPYRIGHT AND LICENSE

Copyright (C) 2004 by Mike McCauley

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.