slp_srvreg Command

Purpose

Manages a service location protocol (SLP) service agent.

Syntax

slp_srvreg -t servicetype -u URL [-a attribute] [-l lifetime] [-s scopes] [-T IPAddress] [-p port] [-U] [-v] [-b debuglevel] [-6]

slp_srvreg -d URL [-s scopes] [-T IPAddress] [-p port] [-v] [-b debuglevel] [-6]

slp_srvreg -D [-v] [-b debuglevel [ -p port]

slp_srvreg -k [-v] [-b debuglevel]

slp_srvreg -h

Description

The slp_srvreg command manages the service location protocol (SLP) service agent. The slp_srvreg command is used to register services for a specified URL with an attribute list in a given scope. The servicetype specified with the -t flag will override any service type expressed in the URL with the scheme service.

To register a service, use the slp_srvreg command with the -u flag to specify the URL to register.

To deregister a service, use the slp_srvreg command with the -d flag to specify the URL to deregister.

For both registration and deregistration, use the -T flag to specify an IP address to which the registration request will be sent to. If you specify the IP address of the local host (e.g. 127.0.0.1) or if you do not use the -T flag, the registration of the service URL is processed locally.

You must specify the slp_srvreg command with the -D flag to run slp_srvreg as a daemon. The slp_srvreg command with the -k flag kills the slp_srvreg.

Restriction: Do not run more than one slp_srvreg daemon on the same machine.

Use the -p flag to make the slp_srvreg agent running as daemon listen on a user specified port instead of the default port number 427. When registering or de-registering with a port specified in the -p flag of the slp_srvreg, only the service agents or directory agents listening on this port will accept the registration or deregistration.

Requirement: The -t and -u flags are mandatory for registration.

SLP clients must not expect the SLP service agent to return attribute values using the same case as used during the registration. For example, if a client registers a service with attribute=true, a query for the attribute might respond with attribute=TRUE. Any client seeking this information must handle the attribute in a case-insensitive manner.

Note: When the command slp_srvreg -D -b debuglevel is used with a debuglevel greater than zero, then slp_srvreg is not run as a daemon.

Flags

Item Description
-a attribute Specifies a comma-separated list of attributes for the services to be registered.
-d URL Specifies the URL for the service to be deregistered.
-D Specifies to run as a daemon.
-k Kills the slp_srvreg daemon.
-l lifetime Specifies the time after which the service registration needs be renewed. The value of the lifetime attribute is specified in number of seconds.
-p port Specifies the port to listen to when running as a daemon. If you do not specify the -p flag, the default port 427 is used. If the slp_srvreg daemon is listening on a port other than the standard port, the user agent uses this flag to send the new registration data to the correct listener.
-s scopes Specifies the scopes of the services to be registered.
-t servicetype

Specifies the service type of the service URL.
-T IPAddress Specifies the IP address that the service registration needs to be sent to.
-u URL Specifies the URL for the service to be registered.
-U Replaces an existing registration.
-v Specifies verbose output.
-b level Specifies the debuglevel (from 0 to 7). A three-bit mask is used:
  • - 0b001 = 1 is to see the important debug information (errors and main program steps)
  • - 0b010 = 2 is to see the detailed debug information (detailed program steps)
  • - 0b100 = 4 is to see the start and stop traces of all functions.
-6 Specifies that IPv6 must be used to resolve any hostname used in URL; if omitted, IPv4 is used to resolve the host names.
-h Display the help: Command Usage.

Examples

  1. To run the command as a daemon on the default SLP port 427, enter the following command:
    # slp_srvreg –D
  2. To register the service with the service:pop3://mail.ibm.com URL and the user=Tom, Richard attributes for two days, enter the following command:
    # slp_srvreg -v –a “user=Tom, Richard” –u “service:pop3://mail.ibm.com” 
                 –t “service:pop3” –l 172800
  3. To register the service with the service:pop3://mail.ibm.com URL and the user=Tom, Richard attributes for two days for the local host, enter the following command:
    # slp_srvreg –a “user=Tom, Richard” –u “service:pop3://mail.ibm.com”
                 –t “service:pop3”  –l 172800 –T 127.0.0.1
  4. To register the service with the service:pop3://mail.ibm.com URL and the user=Tom, Richard attributes for two days for the local host, enter the following command:
    # slp_srvreg -a “user=Tom, Richard" -u “service:pop3://mail.ibm.com"
                 -t “service:pop3"  -l 172800 -T 127.0.0.1
  5. To deregister the service with the service:pop3://mail.ibm.com URL with important and detailled debug traces (0b011 = 3), enter the following command:
    # slp_srvreg -d “service:pop3://mail.ibm.com" -t “service:pop3" -b 5
  6. To kill the slp_srvreg daemon, enter the following command:
    # slp_srvreg -k