xpatemplate(n)
π xpatemplate(n) β Access Point Names and Templates
okay bestie so this is the xpatemplate page from the SAORD Documentation set, and it's literally the glow-up guide for how XPA access points get their names. buckle up π
β¨ SYNOPSIS β¨
so here's the tea: XPA access points are built out of two parts β a general class and a specific name. and BOTH of those parts take template characters, which means you can yeet data to (or grab data from) a whole squad of servers at once. multi-target slay π
πΈ DESCRIPTION πΈ
When XPA servers call XPANew(), or XPACmdNew() to define XPA access points, they hand over a string identifier made of a class and a name. cute. and when clients wanna talk to XPA access points, they say which ones they want using an identifier that looks like this:
class:name
Every registered XPA access point that matches the identifier you gave is now available for communication β subject to access control rules, etc. (the "etc" is doing a lot of heavy lifting there but ok π«Ά).
As of XPA 2.1.5, the length of both the class and name designations are limited to 1024 characters. yes, 1024. no, you can't go over. it's giving "the limit is the limit" periodt.
Now the main character moment: the class:name identifier is actually a template. it accepts wild cards in its syntax, so one single specifier can match more than one XPA access point. (heads up: the class is optional and defaults to "*".) The allowed syntax for clients to specify the class:name template is the form shown below. (also note: "*" is used to denote a generic wild card, but other wild card characters are supported too, as described below, iykyk).
template explanation
-------- -----------
class:name exact match of class and name
name match any class with this name
*:name match any class with this name
class:* match any name of this class
*:* match any access point
In general, these wild-cards can be applied to class and name:
wildcard explanation
-------- -----------
? match any character, but there must be one
* match anything, or nothing
[...] match an inclusive set
π¦ socket identifiers (yes, another way to find your faves)
Although the class:name template normally is used to refer to XPA access points, these also can be specified using their individual socket identifiers. For inet sockets, the socket identifier is ip:port, where ip can be the DNS-registered name, the ASCII IP number (e.g. 123.45.67.890) or the hex IP number (e.g. 838f3a60). For unix sockets, the identifier is the socket file name. These socket identifiers are displayed as the fourth argument in the xpans display of registered access points. π
For example, consider the ds9 program started using inet sockets. The xpans name server will register something like this:
csh> xpaget xpans
DS9 ds9 gs saord.harvard.edu:3236 eric
You can access ds9 using ip:3236 in any of the three forms:
csh> xpaget saord:3236 file
/home/eric/data/snr.ev
csh> xpaget 123.45.67.890:3236 file
/home/eric/data/snr.ev
csh> xpaget 838f3a60:3236 file
/home/eric/data/snr.ev
In the case of unix sockets, the socket identifier is a file:
csh> xpaget xpans
DS9 ds9 gs /tmp/.xpa/DS9_ds9.2631 eric
csh> xpaget /tmp/.xpa/DS9_ds9.2631 file
/home/eric/data/snr.ev
This feature can be useful in distinguishing between multiple instances of a program that all have the same class:name designation. like when you have three of the same app open and you're trying to figure out which one is which π iconique.
π SEE ALSO π
- See
xpa(n)for a list of XPA help pages
π«Ά bestie reminder: don't sleep on the wildcards, they're the whole vibe.
and that's the page! version 2.1.15, dated July 23, 2013, from the SAORD Documentation squad. mwah, go template something iconic πβ¨π
π¦ where this page comes from
- fedora 43: xpa-devel 2.1.20-9.fc43 Β· MIT
- fedora 43: xpa-devel 2.1.20-9.fc43 Β· MIT
- fedora 44: xpa-devel 2.1.20-10.fc44 Β· MIT
- fedora 44: xpa-devel 2.1.20-10.fc44 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms