1. pafc(1)
  2. pafc(1)

NAME

pafc - service discovery client

SYNOPSIS

pafc [-i client_id] [-p version] addr
pafc [-i client_id] [-p version] [-n server-index>] domain
pafc [-a] domain
pafc -l
pafc -h

DESCRIPTION

pafc is an interactive Pathfinder service discovery client, primarily intended for test and debugging purposes.

ARGUMENTS

pafc accept a single argument, which is either a Pathfinder service discovery domain name, or an address to a server. The argument will first be treated as a domain name, and then, if no such service discovery domain can be found, as a server address in XCM format.

pafc looks up domain files in the same manner as a libpaf-based client would. See the libpaf documentation for details on the format and location of such domain files.

If the service discovery domain name resolves to multiple addresses (i.e., the file contains multiple server addresses), the first server in the list will be used.

OPTIONS

INTERACTIVE COMMANDS

If a connection to a Pathfinder server was successfully established, pafc will present the user with a prompt.

pafc supports the following interactive commands:

Most of the pafc interactive commands maps closely to a Pathfinder protocol-level command. For more information on command requests and responses, please refer to the appropriate section of the Pathfinder protocol specification.

EXAMPLES

In the below session, a user connects to a server serving the service discovery domain "oam" and checks the latency:

$ pafc oam
> ping
0.4 ms
OK.
>

The below is pafc session where the user connects to a server on the host 192.168.1.59, serving a service discovery on a TLS server socket bound to port 4711. The user checks pafc's client id, list all clients, issues a subscription, and list all subscriptions. Another client adds a matching service, and then modifies the same service. The user then goes on to list all services.

$ pafc tls:192.168.1.42:4711
> id
Client Id: 0x13b908adda6688d6
> clients
Client Id          Remote Address    Session Uptime
13b908adda6688d6   tls:192.168.1.59:58700 0:00:02
4e9a2e1d7ab98fcc   tls:192.168.1.59:58692 0:00:04
OK.
> subscribe (name=service-a)
Subscription Id 5f2928fd0233f5c1.
OK.
> subscriptions
Subscription Id   Owner Id           Filter Expression
1cda481d5018aaeb  4e9a2e1d7ab98fcc   -
5f2928fd0233f5c1  13b908adda6688d6   (name=service-a)
OK.
> Subscription 5f2928fd0233f5c1: Match type: appeared; Service id: 616fcc6f1bf6aabe; Generation: 0; TTL: 60; Client Id: 0x4e9a2e1d7ab98fcc; Properties: {'name': 'service-a', 'address': 'https://1.2.3.4:5555'}
Subscription 5f2928fd0233f5c1: Match type: modified; Service id: 616fcc6f1bf6aabe; Generation: 1; TTL: 60; Client Id: 0x4e9a2e1d7ab98fcc; Properties: {'name': 'service-a', 'address': 'https://1.2.3.4:5678'}
>
> services
  Service Id  Gen  TTL  Orphan Tmo  Owner              Properties
616fcc6f1bf6aabe    1   60           -  4e9a2e1d7ab98fcc   {'name': 'service-a', 'address': 'https://1.2.3.4:5678'}
OK.
>

In this session, a pafc user connects to a server by address, and publishes a service, and then modifies that service:

$ pafc tls:192.168.1.42:4711
> publish 0 60 name service-a address https://1.2.3.4:5555
Service Id 616fcc6f1bf6aabe.
OK.
> publish 616fcc6f1bf6aabe 1 60 name service-a address https://1.2.3.4:5678
OK.
>

Pathfinder is Copyright (c) 2020, Ericsson AB, and released under the BSD 3-Clause Revised License.

SEE ALSO

pafd(8).

  1. September 2024
  2. pafc(1)