mwmrc

package: lesstif-mwm

title: mwmrc(5)

text:
# mwmrc(5)

## NAME
mwmrc - The M*tif Window Manager configuration file

## DESCRIPTION
The LessTif window manager mwm supports both a global configuration file /etc/X11/mwm/system.mwmrc and a per-user configation file ~/.mwmrc.

## STRUCTURE
Each mwm configuration file consist of blocks of bindings. Each block consists of a block type keyword, a name and a set of entries between curly braces (`{' and '}').

An exclamation mark (`!') introduces a comment. Comments extend to the end of the line.

## Block types
There are three types of blocks:

Menu bindings

Button bindings

Key bindings

## Menu bindings
Menu bindings are introduced by the Menu keyword. The generic form of the entries is label mnemonic accelerator function . Both mnemonic and accelerator may be empty. For example:

"Foo bar" _R Alt<Key>F5 f.restore

## Button bindings
Button bindings are introduced by the Buttons keyword. The entries each are Button name Context Function . For example:

<Btn3Down> icon|frame f.post_wmenu

## Key bindings
Key bindings are very similar to button bindings. The entries each are Key name Context Function . For example:

Alt<Key>Tab root|icon|window f.next_key

## Label
A label is either a plain string, or a bitmap. Bitmaps are indicated as "@" followed by the filename. For example:

mailer @fortytwo.bmp

## Mnemonic
A mnemonic is an underscore ("_") followed by a single character. For example:

_M

## Accelerator
An accelerator is a key name.

## Button name
A button name is Btn followed by the number (1..5) and an action (Up, Down, Click, Click2); for example:

Btn2Click

## Context
A context is a single string consisting of bar (`|') separated object names (root, icon, menub, minimizeb, maximizeb , window, title, frame, border); for example:

icon|title

## Function
A function is a string starting with "f.". The functions are: f.beep, f.circle_down, f.circle_up, f.desk, f.exec, f.focus_color, f.focus_key, f.goto_page, f.kill, f.lower, f.maximize, f.menu, f.minimize, f.move, f.next_cmap, f.next_key, f.nop, f.normalize, f.normalize_and_raise, f.pack_icons, f.pass_keys, f.post_wmenu, f.prev_cmap, f.prev_key, f.quit_mwm, f.raise, f.raise_lower, f.refresh, f.refresh_win, f.resize, f.restart, f.restore, f.restore_and_raise, f.screen, f.send_msg, f.separator, f.set_behavior, f.title, f.toggle_page, f.window_list.

## EXAMPLE
For a complete example, check out /etc/X11/mwm/system.mwmrc or look at the system.mwmrc distributed with the LessTif sources.

## AUTHORS
mwm was written by the LessTif project, http://www.lesstif.org/ and others. This manpage was written by Ray Dassen <jdassen@debian.org>.

## SEE ALSO
mwm(1x)


lftp.conf

package: lftp

title: lftp.conf(5)

summary: the global configuration file for lftp

text:
# lftp.conf(5)

## NAME
lftp.conf - the global configuration file for lftp

## DESCRIPTION
the /etc/lftp.conf configuration file changes the default behavior of lftp and affects the settings for all users. User-specific options should be set in either the ~/.lftprc or ~/.lftp/rc file. These configuration files are read when lftp starts up and the parameters defined therein take affect at that time.

In addition to lftp's configuration options, aliases and 'set' commands can be defined in any of these configuration files. Refer to the Command and Settings sections of the lftp man page for more details.

## SEE ALSO
lftp(1)

branch: sisyphus


Compose

title: Compose(5)

text:
# Compose(5)

## NAME
Compose - X client mappings for multi-key input sequences

## DESCRIPTION
The X library, libX11, provides a simple input method for characters beyond those represented on typical keyboards using sequences of key strokes that are combined to enter a single character.

The compose file is searched for in the following order:

-

If the environment variable $XCOMPOSEFILE is set, its value is used as the name of the Compose file.

-

If the user's home directory has a file named .XCompose, it is used as the Compose file.

-

The system provided compose file is used by mapping the locale to a compose file from the list in /usr/share/X11/locale/compose.dir.

Compose files can use an "include" instruction. This allows local modifications to be made to existing compose files without including all of the content directly. For example, the system's iso8859-1 compose file can be included with a line like this:

include "%S/iso8859-1/Compose"

There are several substitutions that can be made in the file name of the include instruction:

%H

expands to the user's home directory (the $HOME environment variable)

%L

expands to the name of the locale specific Compose file (i.e., "/usr/share/X11/locale/<localename>/Compose")

%S

expands to the name of the system directory for Compose files (i.e., "/usr/share/X11/locale")

For example, you can include in your compose file the default Compose file by using:

include "%L"

and then rewrite only the few rules that you need to change. New compose rules can be added, and previous ones replaced.

## FILE FORMAT
Compose files are plain text files, with a separate line for each compose sequence. Comments begin with # characters. Each compose sequence specifies one or more events and a resulting input sequence, with an optional comment at the end of the line:

EVENT [EVENT...] : RESULT [# COMMENT]

Each event consists of a specified input keysym, and optional modifier states:

[([!] ([~] MODIFIER)...) | None] <keysym>

If the modifier list is preceded by "!" it must match exactly. MODIFIER may be one of Ctrl, Lock, Caps, Shift, Alt or Meta. Each modifier may be preceded by a "~" character to indicate that the modifier must not be present. If "None" is specified, no modifier may be present.

The result specifies a string, keysym, or both, that the X client receives as input when the sequence of events is input:

"STRING" | keysym | "STRING" keysym

Keysyms are specified without the XK_ prefix.

Strings may be direct text encoded in the locale for which the compose file is to be used, or an escaped octal or hexadecimal character code. Octal codes are specified as "\123" and hexadecimal codes as "\x3a". It is not necessary to specify in the right part of a rule a locale encoded string in addition to the keysym name. If the string is omitted, Xlib figures it out from the keysym according to the current locale. I.e., if a rule looks like:

<dead_grave> <A> : "\300" Agrave

the result of the composition is always the letter with the "\300" code. But if the rule is: <dead_grave> <A> : Agrave

the result depends on how Agrave is mapped in the current locale.

## ENVIRONMENT
XCOMPOSEFILE

File to use for compose sequences.

XCOMPOSECACHE

Directory to use for caching compiled compose files.

## FILES
$HOME/.XCompose

User default compose file if XCOMPOSEFILE is not set.

/usr/share/X11/locale/compose.dir

File listing the compose file path to use for each locale.

/usr/share/X11/locale/<localemapping>/Compose

System default compose file for the locale, mapped via compose.dir.

/var/cache/libx11/compose/

System-wide cache directory for compiled compose files.

$HOME/.cache/compose/

Per-user cache directory for compiled compose files.

## SEE ALSO
XLookupString(3), XmbLookupString(3), XwcLookupString(3), Xutf8LookupString(3), mkcomposecache(1), locale(7).

Xlib - C Language X Interface


libao.conf

package: libao

title: libao.conf(5)

summary: configuration for libao.

text:
# libao.conf(5)

## NAME
libao.conf - configuration for libao.

## SYNOPSIS
/etc/libao.conf

~/.libao

## DESCRIPTION
libao.conf and .libao are configuration files for libao, the audio output library. They specify various options to libao, as described below. libao.conf sets system-wide options, whereas ~/.libao sets user-specific options. When an option is set in both places, the option in ~/.libao takes precedence.

## FILE FORMAT
The file consists of comments and key-value pairs. Comments are on separate lines that start with a # symbol. The key-value pairs are of the form:

key=value

where key contains no whitespace and no equal signs. value will be all of the text after the equal sign until (but not including) the ending newline. Beware of extra spaces at the end of the line! They will probably be interpreted as part of the option value. The following is a list of valid global option keys. Any driver specific option may be used as well as those keys.

default_driver

The short name of the driver libao should use by default. Valid values include (not all are available on every platform): pulse, oss, esd, arts, alsa, nas, irix, sun, roar and sndio. Note that "sun" is used on many BSD systems as well as Solaris.

debug (Value optional/ignored)

Sets all the drivers as well as AO itself into debugging output mode. Unlike passing the debug option to a driver, debug will also print debugging information from driver loading and testing.

quiet (Value optional/ignored)

Sets all the drivers as well as AO itself into silent mode. Errors will return only error codes; neither ao nor the drivers will print any output whatsoever to stderr.

verbose (Value optional/ignored)

Sets all the drivers as well as AO itself into verbose mode.

## EXAMPLE
Here is an example libao.conf that forces the OSS driver to be used by default:

\# This is a comment.

default_driver=oss

## BUGS
libao.conf is missing a number of potentially useful options.

## AUTHORS
Stan Seibert <volsung@xiph.org>


cpio

package: libarchive-devel

title: cpio(5)

summary: format of cpio archive files

text:
# cpio(5)

## NAME
cpio — format of cpio archive files

## DESCRIPTION
The cpio archive format collects any number of files, directories, and other file system objects (symbolic links, device nodes, etc.) into a single stream of bytes.

### General Format
Each file system object in a cpio archive comprises a header record with basic numeric metadata followed by the full pathname of the entry and the file data. The header record stores a series of integer values that generally follow the fields in struct stat. (See stat(2) for details.) The variants differ primarily in how they store those integers (binary, octal, or hexadecimal). The header is followed by the pathname of the entry (the length of the pathname is stored in the header) and any file data. The end of the archive is indicated by a special record with the pathname “TRAILER!!!”.

### PWB format
The PWB binary cpio format is the original format, when cpio was introduced as part of the Programmer's Work Bench system, a variant of 6th Edition UNIX. It stores numbers as 2-byte and 4-byte binary values. Each entry begins with a header in the following format:

```
struct header_pwb_cpio {
        short   h_magic;
        short   h_dev;
        short   h_ino;
        short   h_mode;
        short   h_uid;
        short   h_gid;
        short   h_nlink;
        short   h_majmin;
        long    h_mtime;
        short   h_namesize;
        long    h_filesize;
};
```

The short fields here are 16-bit integer values, while the long fields are 32 bit integers. Since PWB UNIX, like the 6th Edition UNIX it was based on, only ran on PDP-11 computers, they are in PDP-endian format, which has little-endian shorts, and big-endian longs. That is, the long integer whose hexadecimal representation is 0x12345678 would be stored in four successive bytes as 0x34, 0x12, 0x78, 0x56. The fields are as follows:

h_magic

The integer value octal 070707.

h_dev, h_ino

The device and inode numbers from the disk. These are used by programs that read cpio archives to determine when two entries refer to the same file. Programs that synthesize cpio archives should be careful to set these to distinct values for each entry.

h_mode

The mode specifies both the regular permissions and the file type, and it also holds a couple of bits that are irrelevant to the cpio format, because the field is actually a raw copy of the mode field in the inode representing the file. These are the IALLOC flag, which shows that the inode entry is in use, and the ILARG flag, which shows that the file it represents is large enough to have indirect blocks pointers in the inode. The mode is decoded as follows:

0100000

IALLOC flag - irrelevant to cpio.

0060000

This masks the file type bits.

0040000

File type value for directories.

0020000

File type value for character special devices.

0060000

File type value for block special devices.

0010000

ILARG flag - irrelevant to cpio.

0004000

SUID bit.

0002000

SGID bit.

0001000

Sticky bit.

0000777

The lower 9 bits specify read/write/execute permissions for world, group, and user following standard POSIX conventions.

h_uid, h_gid

The numeric user id and group id of the owner.

h_nlink

The number of links to this file. Directories always have a value of at least two here. Note that hardlinked files include file data with every copy in the archive.

h_majmin

For block special and character special entries, this field contains the associated device number, with the major number in the high byte, and the minor number in the low byte. For all other entry types, it should be set to zero by writers and ignored by readers.

h_mtime

Modification time of the file, indicated as the number of seconds since the start of the epoch, 00:00:00 UTC January 1, 1970.

h_namesize

The number of bytes in the pathname that follows the header. This count includes the trailing NUL byte.

h_filesize

The size of the file. Note that this archive format is limited to 16 megabyte file sizes, because PWB UNIX, like 6th Edition, only used an unsigned 24 bit integer for the file size internally.

The pathname immediately follows the fixed header. If h_namesize is odd, an additional NUL byte is added after the pathname. The file data is then appended, again with an additional NUL appended if needed to get the next header at an even offset.

Hardlinked files are not given special treatment; the full file contents are included with each copy of the file.

### New Binary Format
The new binary cpio format showed up when cpio was adopted into late 7th Edition UNIX. It is exactly like the PWB binary format, described above, except for three changes:

First, UNIX now ran on more than one hardware type, so the endianness of 16 bit integers must be determined by observing the magic number at the start of the header. The 32 bit integers are still always stored with the most significant word first, though, so each of those two, in the struct shown above, was stored as an array of two 16 bit integers, in the traditional order. Those 16 bit integers, like all the others in the struct, were accessed using a macro that byte swapped them if necessary.

Next, 7th Edition had more file types to store, and the IALLOC and ILARG flag bits were re-purposed to accommodate these. The revised use of the various bits is as follows:

0170000

This masks the file type bits.

0140000

File type value for sockets.

0120000

File type value for symbolic links. For symbolic links, the link body is stored as file data.

0100000

File type value for regular files.

0060000

File type value for block special devices.

0040000

File type value for directories.

0020000

File type value for character special devices.

0010000

File type value for named pipes or FIFOs.

0004000

SUID bit.

0002000

SGID bit.

0001000

Sticky bit.

0000777

The lower 9 bits specify read/write/execute permissions for world, group, and user following standard POSIX conventions.

Finally, the file size field now represents a signed 32 bit integer in the underlying file system, so the maximum file size has increased to 2 gigabytes.

Note that there is no obvious way to tell which of the two binary formats an archive uses, other than to see which one makes more sense. The typical error scenario is that a PWB format archive unpacked as if it were in the new format will create named sockets instead of directories, and then fail to unpack files that should go in those directories. Running bsdcpio -itv on an unknown archive will make it obvious which it is: if it's PWB format, directories will be listed with an 's' instead of a 'd' as the first character of the mode string, and the larger files will have a '?' in that position.

### Portable ASCII Format
Version 2 of the Single UNIX Specification (“SUSv2”) standardized an ASCII variant that is portable across all platforms. It is commonly known as the “old character” format or as the “odc” format. It stores the same numeric fields as the old binary format, but represents them as 6-character or 11-character octal values.

```
struct cpio_odc_header {
        char    c_magic[6];
        char    c_dev[6];
        char    c_ino[6];
        char    c_mode[6];
        char    c_uid[6];
        char    c_gid[6];
        char    c_nlink[6];
        char    c_rdev[6];
        char    c_mtime[11];
        char    c_namesize[6];
        char    c_filesize[11];
};
```

The fields are identical to those in the new binary format. The name and file body follow the fixed header. Unlike the binary formats, there is no additional padding after the pathname or file contents. If the files being archived are themselves entirely ASCII, then the resulting archive will be entirely ASCII, except for the NUL byte that terminates the name field.

### New ASCII Format
The "new" ASCII format uses 8-byte hexadecimal fields for all numbers and separates device numbers into separate fields for major and minor numbers.

```
struct cpio_newc_header {
        char    c_magic[6];
        char    c_ino[8];
        char    c_mode[8];
        char    c_uid[8];
        char    c_gid[8];
        char    c_nlink[8];
        char    c_mtime[8];
        char    c_filesize[8];
        char    c_devmajor[8];
        char    c_devminor[8];
        char    c_rdevmajor[8];
        char    c_rdevminor[8];
        char    c_namesize[8];
        char    c_check[8];
};
```

Except as specified below, the fields here match those specified for the new binary format above.

magic

The string “070701”.

check

This field is always set to zero by writers and ignored by readers. See the next section for more details.

The pathname is followed by NUL bytes so that the total size of the fixed header plus pathname is a multiple of four. Likewise, the file data is padded to a multiple of four bytes. Note that this format supports only 4 gigabyte files (unlike the older ASCII format, which supports 8 gigabyte files).

In this format, hardlinked files are handled by setting the filesize to zero for each entry except the first one that appears in the archive.

### New CRC Format
The CRC format is identical to the new ASCII format described in the previous section except that the magic field is set to “070702” and the check field is set to the sum of all bytes in the file data. This sum is computed treating all bytes as unsigned values and using unsigned arithmetic. Only the least-significant 32 bits of the sum are stored.

### HP variants
The cpio implementation distributed with HPUX used XXXX but stored device numbers differently XXX.

### Other Extensions and Variants
Sun Solaris uses additional file types to store extended file data, including ACLs and extended attributes, as special entries in cpio archives.

XXX Others? XXX

## SEE ALSO
cpio(1), tar(5)

## STANDARDS
The cpio utility is no longer a part of POSIX or the Single Unix Standard. It last appeared in Version 2 of the Single UNIX Specification (“SUSv2”). It has been supplanted in subsequent standards by pax(1). The portable ASCII format is currently part of the specification for the pax(1) utility.

## HISTORY
The original cpio utility was written by Dick Haight while working in AT&T's Unix Support Group. It appeared in 1977 as part of PWB/UNIX 1.0, the “Programmer's Work Bench” derived from Version 6 AT&T UNIX that was used internally at AT&T. Both the new binary and old character formats were in use by 1980, according to the System III source released by SCO under their “Ancient Unix” license. The character format was adopted as part of IEEE Std 1003.1-1988 (“POSIX.1”). XXX when did "newc" appear? Who invented it? When did HP come out with their variant? When did Sun introduce ACLs and extended attributes? XXX

## BUGS
The “CRC” format is mis-named, as it uses a simple checksum and not a cyclic redundancy check.

The binary formats are limited to 16 bits for user id, group id, device, and inode numbers. They are limited to 16 megabyte and 2 gigabyte file sizes for the older and newer variants, respectively.

The old ASCII format is limited to 18 bits for the user id, group id, device, and inode numbers. It is limited to 8 gigabyte file sizes.

The new ASCII format is limited to 4 gigabyte file sizes.

None of the cpio formats store user or group names, which are essential when moving files between systems with dissimilar user or group numbering.

Especially when writing older cpio variants, it may be necessary to map actual device/inode values to synthesized values that fit the available fields. With very large filesystems, this may be necessary even for the newer formats.


libarchive-formats

title: libarchive-formats(5)

text:
# libarchive-formats(5)

## NAME
libarchive-formats — archive formats supported by the libarchive library

## DESCRIPTION
The libarchive(3) library reads and writes a variety of streaming archive formats. Generally speaking, all of these archive formats consist of a series of “entries”. Each entry stores a single file system object, such as a file, directory, or symbolic link.

The following provides a brief description of each format supported by libarchive, with some information about recognized extensions or limitations of the current library support. Note that just because a format is supported by libarchive does not imply that a program that uses libarchive will support that format. Applications that use libarchive specify which formats they wish to support, though many programs do use libarchive convenience functions to enable all supported formats.

### Tar Formats
The libarchive(3) library can read most tar archives. It can write POSIX-standard “ustar” and “pax interchange” formats as well as v7 tar format and a subset of the legacy GNU tar format.

All tar formats store each entry in one or more 512-byte records. The first record is used for file metadata, including filename, timestamp, and mode information, and the file data is stored in subsequent records. Later variants have extended this by either appropriating undefined areas of the header record, extending the header to multiple records, or by storing special entries that modify the interpretation of subsequent entries.

gnutar

The libarchive(3) library can read most GNU-format tar archives. It currently supports the most popular GNU extensions, including modern long filename and linkname support, as well as atime and ctime data. The libarchive library does not support multi-volume archives, nor the old GNU long filename format. It can read GNU sparse file entries, including the new POSIX-based formats. The libarchive(3) library can write GNU tar format, including long filename and linkname support, as well as atime and ctime data.

pax

The libarchive(3) library can read and write POSIX-compliant pax interchange format archives. Pax interchange format archives are an extension of the older ustar format that adds a separate entry with additional attributes stored as key/value pairs immediately before each regular entry. The presence of these additional entries is the only difference between pax interchange format and the older ustar format. The extended attributes are of unlimited length and are stored as UTF-8 Unicode strings. Keywords defined in the standard are in all lowercase; vendors are allowed to define custom keys by preceding them with the vendor name in all uppercase. When writing pax archives, libarchive uses many of the SCHILY keys defined by Joerg Schilling's “star” archiver and a few LIBARCHIVE keys. The libarchive library can read most of the SCHILY keys and most of the GNU keys introduced by GNU tar. It silently ignores any keywords that it does not understand. The pax interchange format converts filenames to Unicode and stores them using the UTF-8 encoding. Prior to libarchive 3.0, libarchive erroneously assumed that the system wide-character routines natively supported Unicode. This caused it to mis-handle non-ASCII filenames on systems that did not satisfy this assumption.

restricted pax

The libarchive library can also write pax archives in which it attempts to suppress the extended attributes entry whenever possible. The result will be identical to a ustar archive unless the extended attributes entry is required to store a long file name, long linkname, extended ACL, file flags, or if any of the standard ustar data (user name, group name, UID, GID, etc) cannot be fully represented in the ustar header. In all cases, the result can be dearchived by any program that can read POSIX-compliant pax interchange format archives. Programs that correctly read ustar format (see below) will also be able to read this format; any extended attributes will be extracted as separate files stored in PaxHeader directories.

ustar

The libarchive library can both read and write this format. This format has the following limitations:

- Device major and minor numbers are limited to 21 bits. Nodes with larger numbers will not be added to the archive.

- Path names in the archive are limited to 255 bytes. (Shorter if there is no / character in exactly the right place.)

- Symbolic links and hard links are stored in the archive with the name of the referenced file. This name is limited to 100 bytes.

- Extended attributes, file flags, and other extended security information cannot be stored.

- Archive entries are limited to 8 gigabytes in size.

Note that the pax interchange format has none of these restrictions. The ustar format is old and widely supported. It is recommended when compatibility is the primary concern.

v7

The libarchive library can read and write the legacy v7 tar format. This format has the following limitations:

- Only regular files, directories, and symbolic links can be archived. Block and character device nodes, FIFOs, and sockets cannot be archived.

- Path names in the archive are limited to 100 bytes.

- Symbolic links and hard links are stored in the archive with the name of the referenced file. This name is limited to 100 bytes.

- User and group information are stored as numeric IDs; there is no provision for storing user or group names.

- Extended attributes, file flags, and other extended security information cannot be stored.

- Archive entries are limited to 8 gigabytes in size.

Generally, users should prefer the ustar format for portability as the v7 tar format is both less useful and less portable.

The libarchive library also reads a variety of commonly-used extensions to the basic tar format. These extensions are recognized automatically whenever they appear.

Numeric extensions.

The POSIX standards require fixed-length numeric fields to be written with some character position reserved for terminators. Libarchive allows these fields to be written without terminator characters. This extends the allowable range; in particular, ustar archives with this extension can support entries up to 64 gigabytes in size. Libarchive also recognizes base-256 values in most numeric fields. This essentially removes all limitations on file size, modification time, and device numbers.

Solaris extensions

Libarchive recognizes ACL and extended attribute records written by Solaris tar.

The first tar program appeared in Seventh Edition Unix in 1979. The first official standard for the tar file format was the “ustar” (Unix Standard Tar) format defined by POSIX in 1988. POSIX.1-2001 extended the ustar format to create the “pax interchange” format.

### Cpio Formats
The libarchive library can read and write a number of common cpio variants. A cpio archive stores each entry as a fixed-size header followed by a variable-length filename and variable-length data. Unlike the tar format, the cpio format does only minimal padding of the header or file data. There are several cpio variants, which differ primarily in how they store the initial header: some store the values as octal or hexadecimal numbers in ASCII, others as binary values of varying byte order and length.

binary

The libarchive library transparently reads both big-endian and little-endian variants of the the two binary cpio formats; the original one from PWB/UNIX, and the later, more widely used, variant. This format used 32-bit binary values for file size and mtime, and 16-bit binary values for the other fields. The formats support only the file types present in UNIX at the time of their creation. File sizes are limited to 24 bits in the PWB format, because of the limits of the file system, and to 31 bits in the newer binary format, where signed 32 bit longs were used.

odc

This is the POSIX standardized format, which is officially known as the “cpio interchange format” or the “octet-oriented cpio archive format” and sometimes unofficially referred to as the “old character format”. This format stores the header contents as octal values in ASCII. It is standard, portable, and immune from byte-order confusion. File sizes and mtime are limited to 33 bits (8GB file size), other fields are limited to 18 bits.

SVR4/newc

The libarchive library can read both CRC and non-CRC variants of this format. The SVR4 format uses eight-digit hexadecimal values for all header fields. This limits file size to 4GB, and also limits the mtime and other fields to 32 bits. The SVR4 format can optionally include a CRC of the file contents, although libarchive does not currently verify this CRC.

Cpio first appeared in PWB/UNIX 1.0, which was released within AT&T in 1977. PWB/UNIX 1.0 formed the basis of System III Unix, released outside of AT&T in 1981. This makes cpio older than tar, although cpio was not included in Version 7 AT&T Unix. As a result, the tar command became much better known in universities and research groups that used Version 7. The combination of the find and cpio utilities provided very precise control over file selection. Unfortunately, the format has many limitations that make it unsuitable for widespread use. Only the POSIX format permits files over 4GB, and its 18-bit limit for most other fields makes it unsuitable for modern systems. In addition, cpio formats only store numeric UID/GID values (not usernames and group names), which can make it very difficult to correctly transfer archives across systems with dissimilar user numbering.

### Shar Formats
A “shell archive” is a shell script that, when executed on a POSIX-compliant system, will recreate a collection of file system objects. The libarchive library can write two different kinds of shar archives:

shar

The traditional shar format uses a limited set of POSIX commands, including echo(1), mkdir(1), and sed(1). It is suitable for portably archiving small collections of plain text files. However, it is not generally well-suited for large archives (many implementations of sh(1) have limits on the size of a script) nor should it be used with non-text files.

shardump

This format is similar to shar but encodes files using uuencode(1) so that the result will be a plain text file regardless of the file contents. It also includes additional shell commands that attempt to reproduce as many file attributes as possible, including owner, mode, and flags. The additional commands used to restore file attributes make shardump archives less portable than plain shar archives.

### ISO9660 format
Libarchive can read and extract from files containing ISO9660-compliant CDROM images. In many cases, this can remove the need to burn a physical CDROM just in order to read the files contained in an ISO9660 image. It also avoids security and complexity issues that come with virtual mounts and loopback devices. Libarchive supports the most common Rockridge extensions and has partial support for Joliet extensions. If both extensions are present, the Joliet extensions will be used and the Rockridge extensions will be ignored. In particular, this can create problems with hardlinks and symlinks, which are supported by Rockridge but not by Joliet.

Libarchive reads ISO9660 images using a streaming strategy. This allows it to read compressed images directly (decompressing on the fly) and allows it to read images directly from network sockets, pipes, and other non-seekable data sources. This strategy works well for optimized ISO9660 images created by many popular programs. Such programs collect all directory information at the beginning of the ISO9660 image so it can be read from a physical disk with a minimum of seeking. However, not all ISO9660 images can be read in this fashion.

Libarchive can also write ISO9660 images. Such images are fully optimized with the directory information preceding all file data. This is done by storing all file data to a temporary file while collecting directory information in memory. When the image is finished, libarchive writes out the directory structure followed by the file data. The location used for the temporary file can be changed by the usual environment variables.

### Zip format
Libarchive can read and write zip format archives that have uncompressed entries and entries compressed with the “deflate” , “LZMA” , “XZ” , “BZIP2” and “ZSTD” algorithms. Libarchive can also read, but not write, zip format archives that have entries compressed with the “PPMd” algorithm. Other zip compression algorithms are not supported. The extensions supported by libarchive are Zip64, Libarchive's extensions to better support streaming, PKZIP's traditional ZIP encryption, Info-ZIP's Unix extra fields, extra time, and Unicode path, as well as WinZIP's AES encryption. It can extract jar archives, __MACOSX resource forks extension for OS X, and self-extracting zip archives. Libarchive can use either of two different strategies for reading Zip archives: a streaming strategy which is fast and can handle extremely large archives, and a seeking strategy which can correctly process self-extracting Zip archives and archives with deleted members or other in-place modifications.

The streaming reader processes Zip archives as they are read. It can read archives of arbitrary size from tape or network sockets, and can decode Zip archives that have been separately compressed or encoded. However, self-extracting Zip archives and archives with certain types of modifications cannot be correctly handled. Such archives require that the reader first process the Central Directory, which is ordinarily located at the end of a Zip archive and is thus inaccessible to the streaming reader. If the program using libarchive has enabled seek support, then libarchive will use this to processes the central directory first.

In particular, the seeking reader must be used to correctly handle self-extracting archives. Such archives consist of a program followed by a regular Zip archive. The streaming reader cannot parse the initial program portion, but the seeking reader starts by reading the Central Directory from the end of the archive. Similarly, Zip archives that have been modified in-place can have deleted entries or other garbage data that can only be accurately detected by first reading the Central Directory.

### Archive (library) file format
The Unix archive format (commonly created by the ar(1) archiver) is a general-purpose format which is used almost exclusively for object files to be read by the link editor ld(1). The ar format has never been standardised. There are two common variants: the GNU format derived from SVR4, and the BSD format, which first appeared in 4.4BSD. The two differ primarily in their handling of filenames longer than 15 characters: the GNU/SVR4 variant writes a filename table at the beginning of the archive; the BSD format stores each long filename in an extension area adjacent to the entry. Libarchive can read both extensions, including archives that may include both types of long filenames. Programs using libarchive can write GNU/SVR4 format if they provide an entry called // containing a filename table to be written into the archive before any of the entries. Any entries whose names are not in the filename table will be written using BSD-style long filenames. This can cause problems for programs such as GNU ld that do not support the BSD-style long filenames.

### mtree
Libarchive can read and write files in mtree(5) format. This format is not a true archive format, but rather a textual description of a file hierarchy in which each line specifies the name of a file and provides specific metadata about that file. Libarchive can read all of the keywords supported by both the NetBSD and FreeBSD versions of mtree(8), although many of the keywords cannot currently be stored in an archive_entry object. When writing, libarchive supports use of the archive_write_set_options(3) interface to specify which keywords should be included in the output. If libarchive was compiled with access to suitable cryptographic libraries (such as the OpenSSL libraries), it can compute hash entries such as sha512 or md5 from file data being written to the mtree writer.

When reading an mtree file, libarchive will locate the corresponding files on disk using the contents keyword if present or the regular filename. If it can locate and open the file on disk, it will use that to fill in any metadata that is missing from the mtree file and will read the file contents and return those to the program using libarchive. If it cannot locate and open the file on disk, libarchive will return an error for any attempt to read the entry body.

### 7-Zip
Libarchive can read and write 7-Zip format archives. TODO: Need more information

### CAB
Libarchive can read Microsoft Cabinet ( “CAB”) format archives. TODO: Need more information.

### LHA
TODO: Information about libarchive's LHA support

### RAR
Libarchive has limited support for reading RAR format archives. Currently, libarchive can read RARv3 format archives which have been either created uncompressed, or compressed using any of the compression methods supported by the RARv3 format. Libarchive can also read self-extracting RAR archives.

### Warc
Libarchive can read and write “web archives”. TODO: Need more information

### XAR
Libarchive can read and write the XAR format used by many Apple tools. TODO: Need more information

## SEE ALSO
ar(1), cpio(1), mkisofs(1), shar(1), tar(1), zip(1), zlib(3), cpio(5), mtree(5), tar(5)


mtree

title: mtree(5)

summary: format of mtree dir hierarchy files

text:
# mtree(5)

## NAME
mtree — format of mtree dir hierarchy files

## DESCRIPTION
The mtree format is a textual format that describes a collection of filesystem objects. Such files are typically used to create or verify directory hierarchies.

### General Format
An mtree file consists of a series of lines, each providing information about a single filesystem object. Leading whitespace is always ignored.

When encoding file or pathnames, any backslash character or character outside of the 95 printable ASCII characters must be encoded as a backslash followed by three octal digits. When reading mtree files, any appearance of a backslash followed by three octal digits should be converted into the corresponding character.

Each line is interpreted independently as one of the following types:

Blank

Blank lines are ignored.

Comment

Lines beginning with # are ignored.

Special

Lines beginning with / are special commands that influence the interpretation of later lines.

Relative

If the first whitespace-delimited word has no / characters, it is the name of a file in the current directory. Any relative entry that describes a directory changes the current directory.

dot-dot

As a special case, a relative entry with the filename .. changes the current directory to the parent directory. Options on dot-dot entries are always ignored.

Full

If the first whitespace-delimited word has a / character after the first character, it is the pathname of a file relative to the starting directory. There can be multiple full entries describing the same file.

Some tools that process mtree files may require that multiple lines describing the same file occur consecutively. It is not permitted for the same file to be mentioned using both a relative and a full file specification.

### Special commands
Two special commands are currently defined:

/set

This command defines default values for one or more keywords. It is followed on the same line by one or more whitespace-separated keyword definitions. These definitions apply to all following files that do not specify a value for that keyword.

/unset

This command removes any default value set by a previous /set command. It is followed on the same line by one or more keywords separated by whitespace.

### Keywords
After the filename, a full or relative entry consists of zero or more whitespace-separated keyword definitions. Each such definition consists of a key from the following list immediately followed by an '=' sign and a value. Software programs reading mtree files should warn about unrecognized keywords.

Currently supported keywords are as follows:

cksum

The checksum of the file using the default algorithm specified by the cksum(1) utility.

device

The device number for block or char file types. The value must be one of the following forms: format,major,minor[,subunit]

A device with major, minor and optional subunit fields. Their meaning is specified by the operating's system format. See below for valid formats.

number

Opaque number (as stored on the file system).

The following values for format are recognized: native, 386bsd, 4bsd, bsdos, freebsd, hpux, isc, linux, netbsd, osf1, sco, solaris, sunos, svr3, svr4, and ultrix.

See mknod(8) for more details.

contents

The full pathname of a file that holds the contents of this file.

flags

The file flags as a symbolic name. See chflags(1) for information on these names. If no flags are to be set the string “none” may be used to override the current default.

gid

The file group as a numeric value.

gname

The file group as a symbolic name.

ignore

Ignore any file hierarchy below this file.

inode

The inode number.

link

The target of the symbolic link when type=link.

md5

The MD5 message digest of the file.

md5digest

A synonym for md5.

mode

The current file's permissions as a numeric (octal) or symbolic value.

nlink

The number of hard links the file is expected to have.

nochange

Make sure this file or directory exists but otherwise ignore all attributes.

optional

The file is optional; do not complain about the file if it is not in the file hierarchy.

resdevice

The “resident” device number of the file, e.g. the ID of the device that contains the file. Its format is the same as the one for device.

ripemd160digest

The RIPEMD160 message digest of the file.

rmd160

A synonym for ripemd160digest.

rmd160digest

A synonym for ripemd160digest.

sha1

The FIPS 160-1 (“SHA-1”) message digest of the file.

sha1digest

A synonym for sha1.

sha256

The FIPS 180-2 (“SHA-256”) message digest of the file.

sha256digest

A synonym for sha256.

sha384

The FIPS 180-2 (“SHA-384”) message digest of the file.

sha384digest

A synonym for sha384.

sha512

The FIPS 180-2 (“SHA-512”) message digest of the file.

sha512digest

A synonym for sha512.

size

The size, in bytes, of the file.

time

The last modification time of the file.

type

The type of the file; may be set to any one of the following:

block

block special device

char

character special device

dir

directory

fifo

fifo

file

regular file

link

symbolic link

socket

socket

uid

The file owner as a numeric value.

uname

The file owner as a symbolic name.

## SEE ALSO
cksum(1), find(1), mtree(8)

## HISTORY
The mtree utility appeared in 4.3BSD-Reno. The MD5 digest capability was added in FreeBSD 2.1, in response to the widespread use of programs which can spoof cksum(1). The SHA-1 and RIPEMD160 digests were added in FreeBSD 4.0, as new attacks have demonstrated weaknesses in MD5. The SHA-256 digest was added in FreeBSD 6.0. Support for file flags was added in FreeBSD 4.0, and mostly comes from NetBSD. The “full” entry format was added by NetBSD.


tar

title: tar(5)

summary: format of tape archive files

text:
# tar(5)

## NAME
tar — format of tape archive files

## DESCRIPTION
The tar archive format collects any number of files, directories, and other file system objects (symbolic links, device nodes, etc.) into a single stream of bytes. The format was originally designed to be used with tape drives that operate with fixed-size blocks, but is widely used as a general packaging mechanism.

### General Format
A tar archive consists of a series of 512-byte records. Each file system object requires a header record which stores basic metadata (pathname, owner, permissions, etc.) and zero or more records containing any file data. The end of the archive is indicated by two records consisting entirely of zero bytes.

For compatibility with tape drives that use fixed block sizes, programs that read or write tar files always read or write a fixed number of records with each I/O operation. These “blocks” are always a multiple of the record size. The maximum block size supported by early implementations was 10240 bytes or 20 records. This is still the default for most implementations although block sizes of 1MiB (2048 records) or larger are commonly used with modern high-speed tape drives. (Note: the terms “block” and “record” here are not entirely standard; this document follows the convention established by John Gilmore in documenting pdtar.)

### Old-Style Archive Format
The original tar archive format has been extended many times to include additional information that various implementors found necessary. This section describes the variant implemented by the tar command included in Version 7 AT&T UNIX, which seems to be the earliest widely-used version of the tar program.

The header record for an old-style tar archive consists of the following:

```
struct header_old_tar {
	char name[100];
	char mode[8];
	char uid[8];
	char gid[8];
	char size[12];
	char mtime[12];
	char checksum[8];
	char linkflag[1];
	char linkname[100];
	char pad[255];
};
```

All unused bytes in the header record are filled with nulls. name

Pathname, stored as a null-terminated string. Early tar implementations only stored regular files (including hardlinks to those files). One common early convention used a trailing "/" character to indicate a directory name, allowing directory permissions and owner information to be archived and restored.

mode

File mode, stored as an octal number in ASCII.

uid, gid

User id and group id of owner, as octal numbers in ASCII.

size

Size of file, as octal number in ASCII. For regular files only, this indicates the amount of data that follows the header. In particular, this field was ignored by early tar implementations when extracting hardlinks. Modern writers should always store a zero length for hardlink entries.

mtime

Modification time of file, as an octal number in ASCII. This indicates the number of seconds since the start of the epoch, 00:00:00 UTC January 1, 1970. Note that negative values should be avoided here, as they are handled inconsistently.

checksum

Header checksum, stored as an octal number in ASCII. To compute the checksum, set the checksum field to all spaces, then sum all bytes in the header using unsigned arithmetic. This field should be stored as six octal digits followed by a null and a space character. Note that many early implementations of tar used signed arithmetic for the checksum field, which can cause interoperability problems when transferring archives between systems. Modern robust readers compute the checksum both ways and accept the header if either computation matches.

linkflag, linkname

In order to preserve hardlinks and conserve tape, a file with multiple links is only written to the archive the first time it is encountered. The next time it is encountered, the linkflag is set to an ASCII ‘1’ and the linkname field holds the first name under which this file appears. (Note that regular files have a null value in the linkflag field.)

Early tar implementations varied in how they terminated these fields. The tar command in Version 7 AT&T UNIX used the following conventions (this is also documented in early BSD manpages): the pathname must be null-terminated; the mode, uid, and gid fields must end in a space and a null byte; the size and mtime fields must end in a space; the checksum is terminated by a null and a space. Early implementations filled the numeric fields with leading spaces. This seems to have been common practice until the IEEE Std 1003.1-1988 (“POSIX.1”) standard was released. For best portability, modern implementations should fill the numeric fields with leading zeros.

### Pre-POSIX Archives
An early draft of IEEE Std 1003.1-1988 (“POSIX.1”) served as the basis for John Gilmore's pdtar program and many system implementations from the late 1980s and early 1990s. These archives generally follow the POSIX ustar format described below with the following variations:

- The magic value consists of the five characters “ustar” followed by a space. The version field contains a space character followed by a null.

- The numeric fields are generally filled with leading spaces (not leading zeros as recommended in the final standard).

- The prefix field is often not used, limiting pathnames to the 100 characters of old-style archives.

### POSIX ustar Archives
IEEE Std 1003.1-1988 (“POSIX.1”) defined a standard tar file format to be read and written by compliant implementations of tar(1). This format is often called the “ustar” format, after the magic value used in the header. (The name is an acronym for “Unix Standard TAR”.) It extends the historic format with new fields:

```
struct header_posix_ustar {
	char name[100];
	char mode[8];
	char uid[8];
	char gid[8];
	char size[12];
	char mtime[12];
	char checksum[8];
	char typeflag[1];
	char linkname[100];
	char magic[6];
	char version[2];
	char uname[32];
	char gname[32];
	char devmajor[8];
	char devminor[8];
	char prefix[155];
	char pad[12];
};
```

typeflag

Type of entry. POSIX extended the earlier linkflag field with several new type values: “0”

Regular file. NUL should be treated as a synonym, for compatibility purposes.

“1”

Hard link.

“2”

Symbolic link.

“3”

Character device node.

“4”

Block device node.

“5”

Directory.

“6”

FIFO node.

“7”

Reserved.

Other

A POSIX-compliant implementation must treat any unrecognized typeflag value as a regular file. In particular, writers should ensure that all entries have a valid filename so that they can be restored by readers that do not support the corresponding extension. Uppercase letters "A" through "Z" are reserved for custom extensions. Note that sockets and whiteout entries are not archivable.

It is worth noting that the size field, in particular, has different meanings depending on the type. For regular files, of course, it indicates the amount of data following the header. For directories, it may be used to indicate the total size of all files in the directory, for use by operating systems that pre-allocate directory space. For all other types, it should be set to zero by writers and ignored by readers.

magic

Contains the magic value “ustar” followed by a NUL byte to indicate that this is a POSIX standard archive. Full compliance requires the uname and gname fields be properly set.

version

Version. This should be “00” (two copies of the ASCII digit zero) for POSIX standard archives.

uname, gname

User and group names, as null-terminated ASCII strings. These should be used in preference to the uid/gid values when they are set and the corresponding names exist on the system.

devmajor, devminor

Major and minor numbers for character device or block device entry.

name, prefix

If the pathname is too long to fit in the 100 bytes provided by the standard format, it can be split at any / character with the first portion going into the prefix field. If the prefix field is not empty, the reader will prepend the prefix value and a / character to the regular name field to obtain the full pathname. The standard does not require a trailing / character on directory names, though most implementations still include this for compatibility reasons.

Note that all unused bytes must be set to NUL.

Field termination is specified slightly differently by POSIX than by previous implementations. The magic, uname, and gname fields must have a trailing NUL. The pathname, linkname, and prefix fields must have a trailing NUL unless they fill the entire field. (In particular, it is possible to store a 256-character pathname if it happens to have a / as the 156th character.) POSIX requires numeric fields to be zero-padded in the front, and requires them to be terminated with either space or NUL characters.

Currently, most tar implementations comply with the ustar format, occasionally extending it by adding new fields to the blank area at the end of the header record.

### Numeric Extensions
There have been several attempts to extend the range of sizes or times supported by modifying how numbers are stored in the header.

One obvious extension to increase the size of files is to eliminate the terminating characters from the various numeric fields. For example, the standard only allows the size field to contain 11 octal digits, reserving the twelfth byte for a trailing NUL character. Allowing 12 octal digits allows file sizes up to 64 GB.

Another extension, utilized by GNU tar, star, and other newer tar implementations, permits binary numbers in the standard numeric fields. This is flagged by setting the high bit of the first byte. The remainder of the field is treated as a signed twos-complement value. This permits 95-bit values for the length and time fields and 63-bit values for the uid, gid, and device numbers. In particular, this provides a consistent way to handle negative time values. GNU tar supports this extension for the length, mtime, ctime, and atime fields. Joerg Schilling's star program and the libarchive library support this extension for all numeric fields. Note that this extension is largely obsoleted by the extended attribute record provided by the pax interchange format.

Another early GNU extension allowed base-64 values rather than octal. This extension was short-lived and is no longer supported by any implementation.

### Pax Interchange Format
There are many attributes that cannot be portably stored in a POSIX ustar archive. IEEE Std 1003.1-2001 (“POSIX.1”) defined a “pax interchange format” that uses two new types of entries to hold text-formatted metadata that applies to following entries. Note that a pax interchange format archive is a ustar archive in every respect. The new data is stored in ustar-compatible archive entries that use the “x” or “g” typeflag. In particular, older implementations that do not fully support these extensions will extract the metadata into regular files, where the metadata can be examined as necessary.

An entry in a pax interchange format archive consists of one or two standard ustar entries, each with its own header and data. The first optional entry stores the extended attributes for the following entry. This optional first entry has an "x" typeflag and a size field that indicates the total size of the extended attributes. The extended attributes themselves are stored as a series of text-format lines encoded in the portable UTF-8 encoding. Each line consists of a decimal number, a space, a key string, an equals sign, a value string, and a new line. The decimal number indicates the length of the entire line, including the initial length field and the trailing newline. An example of such a field is:

25 ctime=1084839148.1212\n

Keys in all lowercase are standard keys. Vendors can add their own keys by prefixing them with an all uppercase vendor name and a period. Note that, unlike the historic header, numeric values are stored using decimal, not octal. A description of some common keys follows: atime, ctime, mtime

File access, inode change, and modification times. These fields can be negative or include a decimal point and a fractional value.

hdrcharset

The character set used by the pax extension values. By default, all textual values in the pax extended attributes are assumed to be in UTF-8, including pathnames, user names, and group names. In some cases, it is not possible to translate local conventions into UTF-8. If this key is present and the value is the six-character ASCII string “BINARY”, then all textual values are assumed to be in a platform-dependent multi-byte encoding. Note that there are only two valid values for this key: “BINARY” or “ISO-IR 10646 2000 UTF-8”. No other values are permitted by the standard, and the latter value should generally not be used as it is the default when this key is not specified. In particular, this flag should not be used as a general mechanism to allow filenames to be stored in arbitrary encodings.

uname, uid, gname, gid

User name, group name, and numeric UID and GID values. The user name and group name stored here are encoded in UTF8 and can thus include non-ASCII characters. The UID and GID fields can be of arbitrary length.

linkpath

The full path of the linked-to file. Note that this is encoded in UTF8 and can thus include non-ASCII characters.

path

The full pathname of the entry. Note that this is encoded in UTF8 and can thus include non-ASCII characters.

realtime.*, security.*

These keys are reserved and may be used for future standardization.

size

The size of the file. Note that there is no length limit on this field, allowing conforming archives to store files much larger than the historic 8GB limit.

SCHILY.*

Vendor-specific attributes used by Joerg Schilling's star implementation.

SCHILY.acl.access, SCHILY.acl.default, SCHILY.acl.ace

Stores the access, default and NFSv4 ACLs as textual strings in a format that is an extension of the format specified by POSIX.1e draft 17. In particular, each user or group access specification can include an additional colon-separated field with the numeric UID or GID. This allows ACLs to be restored on systems that may not have complete user or group information available (such as when NIS/YP or LDAP services are temporarily unavailable).

SCHILY.devminor, SCHILY.devmajor

The full minor and major numbers for device nodes.

SCHILY.fflags

The file flags.

SCHILY.realsize

The full size of the file on disk. XXX explain? XXX

SCHILY.dev, SCHILY.ino, SCHILY.nlinks

The device number, inode number, and link count for the entry. In particular, note that a pax interchange format archive using Joerg Schilling's SCHILY.* extensions can store all of the data from struct stat.

LIBARCHIVE.*

Vendor-specific attributes used by the libarchive library and programs that use it.

LIBARCHIVE.creationtime

The time when the file was created. (This should not be confused with the POSIX “ctime” attribute, which refers to the time when the file metadata was last changed.)

LIBARCHIVE.xattr.namespace.key

Libarchive stores POSIX.1e-style extended attributes using keys of this form. The key value is URL-encoded: All non-ASCII characters and the two special characters “=” and “%” are encoded as “%” followed by two uppercase hexadecimal digits. The value of this key is the extended attribute value encoded in base 64. XXX Detail the base-64 format here XXX

VENDOR.*

XXX document other vendor-specific extensions XXX

Any values stored in an extended attribute override the corresponding values in the regular tar header. Note that compliant readers should ignore the regular fields when they are overridden. This is important, as existing archivers are known to store non-compliant values in the standard header fields in this situation. There are no limits on length for any of these fields. In particular, numeric fields can be arbitrarily large. All text fields are encoded in UTF8. Compliant writers should store only portable 7-bit ASCII characters in the standard ustar header and use extended attributes whenever a text value contains non-ASCII characters.

In addition to the x entry described above, the pax interchange format also supports a g entry. The g entry is identical in format, but specifies attributes that serve as defaults for all subsequent archive entries. The g entry is not widely used.

Besides the new x and g entries, the pax interchange format has a few other minor variations from the earlier ustar format. The most troubling one is that hardlinks are permitted to have data following them. This allows readers to restore any hardlink to a file without having to rewind the archive to find an earlier entry. However, it creates complications for robust readers, as it is no longer clear whether or not they should ignore the size field for hardlink entries.

### GNU Tar Archives
The GNU tar program started with a pre-POSIX format similar to that described earlier and has extended it using several different mechanisms: It added new fields to the empty space in the header (some of which was later used by POSIX for conflicting purposes); it allowed the header to be continued over multiple records; and it defined new entries that modify following entries (similar in principle to the x entry described above, but each GNU special entry is single-purpose, unlike the general-purpose x entry). As a result, GNU tar archives are not POSIX compatible, although more lenient POSIX-compliant readers can successfully extract most GNU tar archives.

```
struct header_gnu_tar {
	char name[100];
	char mode[8];
	char uid[8];
	char gid[8];
	char size[12];
	char mtime[12];
	char checksum[8];
	char typeflag[1];
	char linkname[100];
	char magic[6];
	char version[2];
	char uname[32];
	char gname[32];
	char devmajor[8];
	char devminor[8];
	char atime[12];
	char ctime[12];
	char offset[12];
	char longnames[4];
	char unused[1];
	struct {
		char offset[12];
		char numbytes[12];
	} sparse[4];
	char isextended[1];
	char realsize[12];
	char pad[17];
};
```

typeflag

GNU tar uses the following special entry types, in addition to those defined by POSIX: 7

GNU tar treats type "7" records identically to type "0" records, except on one obscure RTOS where they are used to indicate the pre-allocation of a contiguous file on disk.

D

This indicates a directory entry. Unlike the POSIX-standard "5" typeflag, the header is followed by data records listing the names of files in this directory. Each name is preceded by an ASCII "Y" if the file is stored in this archive or "N" if the file is not stored in this archive. Each name is terminated with a null, and an extra null marks the end of the name list. The purpose of this entry is to support incremental backups; a program restoring from such an archive may wish to delete files on disk that did not exist in the directory when the archive was made. Note that the "D" typeflag specifically violates POSIX, which requires that unrecognized typeflags be restored as normal files. In this case, restoring the "D" entry as a file could interfere with subsequent creation of the like-named directory.

K

The data for this entry is a long linkname for the following regular entry.

L

The data for this entry is a long pathname for the following regular entry.

M

This is a continuation of the last file on the previous volume. GNU multi-volume archives guarantee that each volume begins with a valid entry header. To ensure this, a file may be split, with part stored at the end of one volume, and part stored at the beginning of the next volume. The "M" typeflag indicates that this entry continues an existing file. Such entries can only occur as the first or second entry in an archive (the latter only if the first entry is a volume label). The size field specifies the size of this entry. The offset field at bytes 369-380 specifies the offset where this file fragment begins. The realsize field specifies the total size of the file (which must equal size plus offset). When extracting, GNU tar checks that the header file name is the one it is expecting, that the header offset is in the correct sequence, and that the sum of offset and size is equal to realsize.

N

Type "N" records are no longer generated by GNU tar. They contained a list of files to be renamed or symlinked after extraction; this was originally used to support long names. The contents of this record are a text description of the operations to be done, in the form “Rename %s to %s\n” or “Symlink %s to %s\n”; in either case, both filenames are escaped using K&R C syntax. Due to security concerns, "N" records are now generally ignored when reading archives.

S

This is a “sparse” regular file. Sparse files are stored as a series of fragments. The header contains a list of fragment offset/length pairs. If more than four such entries are required, the header is extended as necessary with “extra” header extensions (an older format that is no longer used), or “sparse” extensions.

V

The name field should be interpreted as a tape/volume header name. This entry should generally be ignored on extraction.

magic

The magic field holds the five characters “ustar” followed by a space. Note that POSIX ustar archives have a trailing null.

version

The version field holds a space character followed by a null. Note that POSIX ustar archives use two copies of the ASCII digit “0”.

atime, ctime

The time the file was last accessed and the time of last change of file information, stored in octal as with mtime.

longnames

This field is apparently no longer used.

Sparse offset / numbytes

Each such structure specifies a single fragment of a sparse file. The two fields store values as octal numbers. The fragments are each padded to a multiple of 512 bytes in the archive. On extraction, the list of fragments is collected from the header (including any extension headers), and the data is then read and written to the file at appropriate offsets.

isextended

If this is set to non-zero, the header will be followed by additional “sparse header” records. Each such record contains information about as many as 21 additional sparse blocks as shown here:

```
struct gnu_sparse_header {
	struct {
		char offset[12];
		char numbytes[12];
	} sparse[21];
	char    isextended[1];
	char    padding[7];
};
```

realsize

A binary representation of the file's complete size, with a much larger range than the POSIX file size. In particular, with M type files, the current entry is only a portion of the file. In that case, the POSIX size field will indicate the size of this entry; the realsize field will indicate the total size of the file.

### GNU tar pax archives
GNU tar 1.14 (XXX check this XXX) and later will write pax interchange format archives when you specify the --posix flag. This format follows the pax interchange format closely, using some SCHILY tags and introducing new keywords to store sparse file information. There have been three iterations of the sparse file support, referred to as “0.0”, “0.1”, and “1.0”.

GNU.sparse.numblocks, GNU.sparse.offset, GNU.sparse.numbytes, GNU.sparse.size

The “0.0” format used an initial GNU.sparse.numblocks attribute to indicate the number of blocks in the file, a pair of GNU.sparse.offset and GNU.sparse.numbytes to indicate the offset and size of each block, and a single GNU.sparse.size to indicate the full size of the file. This is not the same as the size in the tar header because the latter value does not include the size of any holes. This format required that the order of attributes be preserved and relied on readers accepting multiple appearances of the same attribute names, which is not officially permitted by the standards.

GNU.sparse.map

The “0.1” format used a single attribute that stored a comma-separated list of decimal numbers. Each pair of numbers indicated the offset and size, respectively, of a block of data. This does not work well if the archive is extracted by an archiver that does not recognize this extension, since many pax implementations simply discard unrecognized attributes.

GNU.sparse.major, GNU.sparse.minor, GNU.sparse.name, GNU.sparse.realsize

The “1.0” format stores the sparse block map in one or more 512-byte blocks prepended to the file data in the entry body. The pax attributes indicate the existence of this map (via the GNU.sparse.major and GNU.sparse.minor fields) and the full size of the file. The GNU.sparse.name holds the true name of the file. To avoid confusion, the name stored in the regular tar header is a modified name so that extraction errors will be apparent to users.

### Solaris Tar
XXX More Details Needed XXX

Solaris tar (beginning with SunOS XXX 5.7 ?? XXX) supports an “extended” format that is fundamentally similar to pax interchange format, with the following differences:

- Extended attributes are stored in an entry whose type is X, not x, as used by pax interchange format. The detailed format of this entry appears to be the same as detailed above for the x entry.

- An additional A header is used to store an ACL for the following regular entry. The body of this entry contains a seven-digit octal number followed by a zero byte, followed by the textual ACL description. The octal value is the number of ACL entries plus a constant that indicates the ACL type: 01000000 for POSIX.1e ACLs and 03000000 for NFSv4 ACLs.

### AIX Tar
XXX More details needed XXX

AIX Tar uses a ustar-formatted header with the type A for storing coded ACL information. Unlike the Solaris format, AIX tar writes this header after the regular file body to which it applies. The pathname in this header is either NFS4 or AIXC to indicate the type of ACL stored. The actual ACL is stored in platform-specific binary format.

### Mac OS X Tar
The tar distributed with Apple's Mac OS X stores most regular files as two separate files in the tar archive. The two files have the same name except that the first one has “._” prepended to the last path element. This special file stores an AppleDouble-encoded binary blob with additional metadata about the second file, including ACL, extended attributes, and resources. To recreate the original file on disk, each separate file can be extracted and the Mac OS X copyfile() function can be used to unpack the separate metadata file and apply it to th regular file. Conversely, the same function provides a “pack” option to encode the extended metadata from a file into a separate file whose contents can then be put into a tar archive.

Note that the Apple extended attributes interact badly with long filenames. Since each file is stored with the full name, a separate set of extensions needs to be included in the archive for each one, doubling the overhead required for files with long names.

### Summary of tar type codes
The following list is a condensed summary of the type codes used in tar header records generated by different tar implementations. More details about specific implementations can be found above:

NUL

Early tar programs stored a zero byte for regular files.

0

POSIX standard type code for a regular file.

1

POSIX standard type code for a hard link description.

2

POSIX standard type code for a symbolic link description.

3

POSIX standard type code for a character device node.

4

POSIX standard type code for a block device node.

5

POSIX standard type code for a directory.

6

POSIX standard type code for a FIFO.

7

POSIX reserved.

7

GNU tar used for pre-allocated files on some systems.

A

Solaris tar ACL description stored prior to a regular file header.

A

AIX tar ACL description stored after the file body.

D

GNU tar directory dump.

K

GNU tar long linkname for the following header.

L

GNU tar long pathname for the following header.

M

GNU tar multivolume marker, indicating the file is a continuation of a file from the previous volume.

N

GNU tar long filename support. Deprecated.

S

GNU tar sparse regular file.

V

GNU tar tape/volume header name.

X

Solaris tar general-purpose extension header.

g

POSIX pax interchange format global extensions.

x

POSIX pax interchange format per-file extensions.

## SEE ALSO
ar(1), pax(1), tar(1)

## STANDARDS
The tar utility is no longer a part of POSIX or the Single Unix Standard. It last appeared in Version 2 of the Single UNIX Specification (“SUSv2”). It has been supplanted in subsequent standards by pax(1). The ustar format is currently part of the specification for the pax(1) utility. The pax interchange file format is new with IEEE Std 1003.1-2001 (“POSIX.1”).

## HISTORY
A tar command appeared in Seventh Edition Unix, which was released in January, 1979. It replaced the tp program from Fourth Edition Unix which in turn replaced the tap program from First Edition Unix. John Gilmore's pdtar public-domain implementation (circa 1987) was highly influential and formed the basis of GNU tar (circa 1988). Joerg Shilling's star archiver is another open-source (CDDL) archiver (originally developed circa 1985) which features complete support for pax interchange format.

This documentation was written as part of the libarchive and bsdtar project by Tim Kientzle ⟨kientzle@FreeBSD.org⟩.


libaudit.conf

package: libaudit-common

title: libaudit.conf(5)

summary: libaudit configuration file

text:
# libaudit.conf(5)

## NAME
libaudit.conf - libaudit configuration file

## DESCRIPTION
The file /etc/libaudit.conf contains configuration information for user space applications that link to libaudit. The applications are responsible for querying the settings in this file and obeying the admin's preferences. This file contains one configuration keyword per line, an equal sign, and then followed by appropriate configuration information. The keywords recognized are: failure_action. These keywords are described below.

failure_action

This keyword specifies what action the admin wishes a user space application to take when there is a failure to send an audit event to the kernel. The possible values are: IGNORE

- meaning do nothing, LOG - write to syslog the inability to send an audit event, and TERMINATE - the user space application should exit.

## SEE ALSO
get_auditfail_action(3).

## AUTHOR
Steve Grubb


ausearch-expression

package: libaudit-devel

title: ausearch-expression(5)

summary: audit search expression format

text:
# ausearch-expression(5)

## NAME
ausearch-expression - audit search expression format

## OVERVIEW
This man page describes the format of "ausearch expressions". Parsing and evaluation of these expressions is provided by libauparse and is common to applications that use this library.

## LEXICAL STRUCTURE
White space (ASCII space, tab and new-line characters) between tokens is ignored. The following tokens are recognized:

Punctuation

( ) \

Logical operators

! && ||

Comparison operators

< <= == > >= !== i= i!= r= r!=

Unquoted strings

Any non-empty sequence of ASCII letters, digits, and the _ symbol.

Quoted strings

A sequence of characters surrounded by the " quotes. The \ character starts an escape sequence. The only defined escape sequences are \\ and \". The semantics of other escape sequences is undefined.

Regexps

A sequence of characters surrounded by the / characters. The \ character starts an escape sequence. The only defined escape sequences are \\ and \/. The semantics of other escape sequences is undefined.

Anywhere an unquoted string is valid, a quoted string is valid as well, and vice versa. In particular, field names may be specified using quoted strings, and field values may be specified using unquoted strings.

## EXPRESSION SYNTAX
The primary expression has one of the following forms:

field comparison-operator value \regexp string-or-regexp

field is either a string, which specifies the first field with that name within the current audit record, or the \ escape character followed by a string, which specifies a virtual field with the specified name (virtual fields are defined in a later section).

field is a string. operator specifies the comparison to perform

r= r!=

Get the "raw" string of field, and compare it to value. For fields in audit records, the "raw" string is the exact string stored in the audit record (with all escaping and unprintable character encoding left alone); applications can read the "raw" string using auparse_get_field_str(3). Each virtual field may define a "raw" string. If field is not present or does not define a "raw" string, the result of the comparison is false (regardless of the operator).

i= i!=

Get the "interpreted" string of field, and compare it to value. For fields in audit records, the "interpreted" string is an "user-readable" interpretation of the field value; applications can read the "interpreted" string using auparse_interpret_field(3). Each virtual field may define an "interpreted" string. If field is not present or does not define an "interpreted" string, the result of the comparison is false (regardless of the operator).

< <= == > >= !==

Evaluate the "value" of field, and compare it to value. A "value" may be defined for any field or virtual field, but no "value" is currently defined for any audit record field. The rules of parsing value for comparing it with the "value" of field are specific for each field. If field is not present, the result of the comparison is false (regardless of the operator). If field does not define a "value", an error is reported when parsing the expression.

In the special case of \regexp regexp-or-string, the current audit record is taken as a string (without interpreting field values), and matched against regexp-or-string. regexp-or-string is an extended regular expression, using a string or regexp token (in other words, delimited by " or /).

If E1 and E2 are valid expressions, then ! E1, E1 && E2, and E1 || E2 are valid expressions as well, with the usual C semantics and evaluation priorities. Note that ! field op value is interpreted as !(field op value), not as (!field) op value.

## VIRTUAL FIELDS
The following virtual fields are defined:

\timestamp

The value is the timestamp of the current event. value must be formatted as:

```
ts:seconds.milli
```

where seconds and milli are decimal numbers specifying the seconds and milliseconds part of the timestamp, respectively.

\timestamp_ex

This is similar to \timestamp but also includes the event's serial number. value must be formatted as:

```
ts:seconds.milli:serial
```

where serial is a decimal number specifying the event's serial number.

\record_type

The value is the type of the current record. value is either the record type name, or a decimal number specifying the type.

## SEMANTICS
The expression as a whole applies to a single record. The expression is true for a specified event if it is true for any record associated with the event.

## EXAMPLES
As a demonstration of the semantics of handling missing fields, the following expression is true if field is present:

(field r= "") || (field r!= "")

and the same expression surrounded by !( and ) is true if field is not present.

## FUTURE DIRECTIONS
New escape sequences for quoted strings may be defined.

For currently defined virtual fields that do not define a "raw" or "interpreted" string, the definition may be added. Therefore, don't rely on the fact that comparing the "raw" or "interpreted" string of the field with any value is false.

New formats of value constants for the \timestamp virtual field may be added.

## AUTHOR
Miloslav Trmac


org.bluez.Adapter

package: libbluez-devel

title: org.bluez.Adapter(5)

summary: BlueZ D-Bus Adapter API documentation

text:
# org.bluez.Adapter(5)

## Name
org.bluez.Adapter - BlueZ D-Bus Adapter API documentation

## Interface
Service

org.bluez

Interface

org.bluez.Adapter1

Object path

[variable prefix]/{hci0,hci1,...}

Used by

bluetoothctl(1), bluetoothctl-scan(1)

### void StartDiscovery()
Starts device discovery session which may include starting an inquiry and/or scanning procedures and remote device name resolving.

Use StopDiscovery to release the sessions acquired.

This process will start creating Device objects as new devices are discovered.

During discovery RSSI delta-threshold is imposed.

Each client can request a single device discovery session per adapter.

Possible errors:

org.bluez.Error.NotReady

org.bluez.Error.Failed

org.bluez.Error.InProgress

Examples:

bluetoothctl

> scan <on/off/bredr/le>

### void StopDiscovery()
Stops device discovery session started by StartDiscovery.

Note that a discovery procedure is shared between all discovery sessions thus calling StopDiscovery will only release a single session and discovery will stop when all sessions from all clients have finished.

Possible errors:

org.bluez.Error.NotReady

org.bluez.Error.Failed

org.bluez.Error.NotAuthorized

### void RemoveDevice(object device)
Removes the remote device object at the given path including cached information such as bonding information.

Possible errors:

org.bluez.Error.InvalidArguments

org.bluez.Error.Failed

Examples:

bluetoothctl

> remove <dev>

### void SetDiscoveryFilter(dict filter)
Sets the device discovery filter for the caller. When this method is called with no filter parameter, filter is removed.

Possible filter values:

array{string} UUIDs

Filter by service UUIDs, empty means match any UUID. When a remote device is found that advertises any UUID from UUIDs, it will be reported if:

- Pathloss and RSSI are both empty.

- only Pathloss param is set, device advertise TX power, and computed pathloss is less than Pathloss param.

- only RSSI param is set, and received RSSI is higher than RSSI param.

int16 RSSI

RSSI threshold value. PropertiesChanged signals will be emitted for already existing Device objects, with updated RSSI value. If one or more discovery filters have been set, the RSSI delta-threshold, that is imposed by StartDiscovery by default, will not be applied.

uint16 Pathloss

Pathloss threshold value. PropertiesChanged signals will be emitted for already existing Device objects, with updated Pathloss value.

string Transport (Default "auto")

Transport parameter determines the type of scan. Possible values:

"auto"

Interleaved scan, use LE, BREDR, or both, depending on what's currently enabled.

"bredr"

BR/EDR inquiry only.

"le"

LE scan only.

bool DuplicateData (Default false)

Disables duplicate detection of advertisement data. When enabled PropertiesChanged signals will be generated for either ManufacturerData and ServiceData every time they are discovered.

bool Discoverable (Default false)

Make adapter discoverable while discovering, if the adapter is already discoverable setting this filter won't do anything.

string Pattern (Default none)

Discover devices where the pattern matches either the prefix of the address or device name which is convenient way to limited the number of device objects created during a discovery. When set disregards device discoverable flags.

Note: The pattern matching is ignored if there are other client that don't set any pattern as it work as a logical OR, also setting empty string "" pattern will match any device found.

bool AutoConnect (Default false)

Connect to discovered devices automatically if a Pattern has been set and it matches the device address or name and it is connectable.

When discovery filter is set, Device objects will be created as new devices with matching criteria are discovered regardless of they are connectable or discoverable which enables listening to non-connectable and non-discoverable devices.

When multiple clients call SetDiscoveryFilter, their filters are internally merged, and notifications about new devices are sent to all clients. Therefore, each client must check that device updates actually match its filter.

When SetDiscoveryFilter is called multiple times by the same client, last filter passed will be active for given client.

SetDiscoveryFilter can be called before StartDiscovery. It is useful when client will create first discovery session, to ensure that proper scan will be started right after call to StartDiscovery.

Possible errors:

org.bluez.Error.NotReady

org.bluez.Error.NotSupported

org.bluez.Error.Failed

Examples:

bluetoothctl

[scan] > uuids [all/uuid1 uuid2 ...]

bluetoothctl

[scan] > rssi [rssi]

bluetoothctl

[scan] > pathloss [pathloss]

bluetoothctl

[scan] > transport [auto/bredr/le]

bluetoothctl

[scan] > duplicate-data [on/off]

bluetoothctl

[scan] > discoverable [on/off]

bluetoothctl

[scan] > pattern [value]

bluetoothctl

[scan] > clear [filter]

### array{string} GetDiscoveryFilters()
Returns available filters that can be given to SetDiscoveryFilter.

Possible errors: None

### object ConnectDevice(dict properties) [experimental]
Connects to device without need of performing General Discovery.

Connection mechanism is similar to Connect method on org.bluez.Device1(5) interface with exception that this method returns success when physical connection is established and you can specify bearer to connect with parameter.

After this method returns, services discovery will continue and any supported profile will be connected. There is no need for calling Connect on Device1 after this call. If connection was successful this method returns object path to created device object or device that already exist.

Possible properties values:

string Address (Mandatory)

The Bluetooth device address of the remote device.

string AddressType (Default "BR/EDR")

The Bluetooth device Address Type. This is address type that should be used for initial connection. Possible values:

"public"

Public address

"random"

Random address

Possible errors:

org.bluez.Error.InvalidArguments

org.bluez.Error.AlreadyExists

org.bluez.Error.NotSupported

org.bluez.Error.NotReady

org.bluez.Error.Failed

### string Address [readonly]
The Bluetooth device address.

### string AddressType [readonly]
The Bluetooth Address Type. For dual-mode and BR/EDR only adapter this defaults to "public". Single mode LE adapters may have either value. With privacy enabled this contains type of Identity Address and not type of address used for connection.

Possible values:

"public"

Public address.

"random"

Random address.

### string Name [readonly]
The Bluetooth system name (pretty hostname).

This property is either a static system default or controlled by an external daemon providing access to the pretty hostname configuration.

### string Alias [readwrite]
The Bluetooth friendly name. This value can be changed.

In case no alias is set, it will return the system provided name. Setting an empty string as alias will convert it back to the system provided name.

When resetting the alias with an empty string, the property will default back to system name.

On a well configured system, this property never needs to be changed since it defaults to the system name and provides the pretty hostname.

Only if the local name needs to be different from the pretty hostname, this property should be used as last resort.

Examples:

bluetoothctl

> system-alias <name>

bluetoothctl

> reset-alias

### uint32 Class [readonly]
The Bluetooth class of device.

This property represents the value that is either automatically configured by DMI/ACPI information or provided as static configuration.

### boolean Connectable [readwrite]
Set an adapter to connectable or non-connectable. This is a global setting and should only be used by the settings application.

Setting this property to false will set the Discoverable property of the adapter to false as well, which will not be reverted if Connectable is set back to true.

If required, the application will need to manually set Discoverable to true.

Note that this property only affects incoming connections.

### boolean Powered [readwrite]
Switch an adapter on or off. This will also set the appropriate connectable state of the controller.

The value of this property is not persistent. After restart or unplugging of the adapter it will reset back to false.

Examples:

bluetoothctl

> power <on/off>

### string PowerState [readonly, experimental]
The power state of an adapter.

The power state will show whether the adapter is turning off, or turning on, as well as being on or off.

Possible values:

"on"

Powered on.

"off"

Powered off

"off-enabling"

Transitioning from "off" to "on".

"on-disabling"

Transitioning from "on" to "off".

"off-blocked"

Blocked by rfkill.

### boolean Discoverable [readwrite] (Default: false)
Switch an adapter to discoverable or non-discoverable to either make it visible or hide it. This is a global setting and should only be used by the settings application.

If the DiscoverableTimeout is set to a non-zero value then the system will set this value back to false after the timer expired.

In case the adapter is switched off, setting this value will fail.

When changing the Powered property the new state of this property will be updated via a PropertiesChanged signal.

Examples:

bluetoothctl

> discoverable <on/off>

### boolean Pairable [readwrite] (Default: true)
Switch an adapter to pairable or non-pairable. This is a global setting and should only be used by the settings application.

Note that this property only affects incoming pairing requests.

Examples:

bluetoothctl

> pairable <on/off>

### uint32 PairableTimeout [readwrite] (Default: 0)
The pairable timeout in seconds. A value of zero means that the timeout is disabled and it will stay in pairable mode forever.

### uint32 DiscoverableTimeout [readwrite] (Default: 180)
The discoverable timeout in seconds. A value of zero means that the timeout is disabled and it will stay in discoverable/limited mode forever.

Examples:

bluetoothctl

> discoverable-timeout [value]

### boolean Discovering [readonly]
Indicates that a device discovery procedure is active.

### array{string} UUIDs [readonly]
List of 128-bit UUIDs that represents the available local services.

### string Modalias [readonly, optional]
Local Device ID information in modalias format used by the kernel and udev.

### array{string} Roles [readonly]
List of supported roles.

Possible values:

"central"

Supports the central role.

"peripheral"

Supports the peripheral role.

"central-peripheral"

Supports both roles concurrently.

### array{string} ExperimentalFeatures [readonly, optional]
List of 128-bit UUIDs that represents the experimental features currently enabled.

### uint16 Manufacturer [readonly]
The manufacturer of the device, as a uint16 company identifier defined by the Core Bluetooth Specification.

### byte Version [readonly]
The Bluetooth version supported by the device, as a core version code defined by the Core Bluetooth Specification.


org.bluez.AdminPolicySet

title: org.bluez.AdminPolicySet(5)

text:
# org.bluez.AdminPolicySet(5)

## Name
org.bluez.AdminPolicySet - BlueZ D-Bus AdminPolicySet API documentation

## Description
This API provides methods to control the behavior of bluetoothd(8) as an administrator.

Interface AdminPolicySet1 provides methods to set policies. Once the policy is set successfully, it will affect all clients and stay persistently even after restarting bluetoothd(8). The only way to clear it is to overwrite the policy with the same method.

## Interface
Service

org.bluez

Interface

org.bluez.AdminPolicySet1 [experimental]

Object path

[variable prefix]/{hci0,hci1,...}

Used by

bluetoothctl-admin(1)

### void SetServiceAllowList(array{string} UUIDs)
Sets the service allowlist by specifying service UUIDs.

When called, bluetoothd(8) will block incoming and outgoing connections to the service not in UUIDs for all of the clients.

Any subsequent calls to this method will supersede any previously set allowlist values. Calling this method with an empty array will allow any service UUIDs to be used.

The default value is an empty array.

Possible errors:

org.bluez.Error.InvalidArguments

org.bluez.Error.Failed

Examples:

bluetoothctl

> admin.allow [clear/uuid1 uuid2 ...]


org.bluez.AdminPolicyStatus

title: org.bluez.AdminPolicyStatus(5)

text:
# org.bluez.AdminPolicyStatus(5)

## Name
org.bluez.AdminPolicyStatus - BlueZ D-Bus AdminPolicyStatus API documentation

## Description
Interface AdminPolicyStatus1 provides readonly properties to indicate the current values of admin policy affecting the Adapter and Device objects.

## Interface

### Adapter
Service

org.bluez

Interface

org.bluez.AdminPolicyStatus1 [experimental]

Object path

[variable prefix]/{hci0,hci1,...}

Used by

bluetoothctl-admin(1)

### Device
Service

org.bluez

Interface

org.bluez.AdminPolicyStatus1 [experimental]

Object path

[variable prefix]/{hci0,hci1,...}/dev_{BDADDR}

### array{string} ServiceAllowList [readonly, adapter-only]
Current value of service allow list.

### bool IsAffectedByPolicy [readonly, device-only]
Indicate if there is any auto-connect profile in this device is not allowed by admin policy.


org.bluez.AdvertisementMonitor

title: org.bluez.AdvertisementMonitor(5)

text:
# org.bluez.AdvertisementMonitor(5)

## Name
org.bluez.AdvertisementMonitor - BlueZ D-Bus AdvertisementMonitor API documentation

## Description
This API allows an client to specify a job of monitoring advertisements by registering the root of hierarchy and then exposing advertisement monitors under the root with filtering conditions, thresholds of RSSI and timers of RSSI thresholds.

Once a monitoring job is activated by bluetoothd(8), the client can expect to get notified on the targeted advertisements no matter if there is an ongoing discovery session (see StartDiscovery() in org.bluez.Adapter(5)).

## Interface
Service

org.bluez

Interface

org.bluez.AdvertisementMonitor1 [experimental]

Object path

freely definable

Used by

bluetoothctl-monitor(1)

### void Release() [noreply]
This gets called as a signal for a client to perform clean-up when:

- Monitor cannot be activated after it was exposed

- Monitor has been deactivated.

### void Activate() [noreply]
After a monitor was exposed, this gets called as a signal for client to get acknowledged when a monitor has been activated, so the client can expect to receive calls on DeviceFound() or DeviceLost().

### void DeviceFound(object device) [noreply]
This gets called to notify the client of finding the targeted device.

Once receiving the call, the client should start to monitor the corresponding device to retrieve the changes on RSSI and advertisement content.

### void DeviceLost(object device) [noreply]
This gets called to notify the client of losing the targeted device.

Once receiving this call, the client should stop monitoring the corresponding device.

### string Type [read-only]
The type of the monitor. See SupportedMonitorTypes in org.bluez.AdvertisementMonitorManager(5) for the available options.

### int16 RSSILowThreshold [read-only, optional]
Used in conjunction with RSSILowTimeout to determine whether a device becomes out-of-range.

Valid range is -127 to 20 (dBm), while 127 indicates unset.

### int16 RSSIHighThreshold [read-only, optional]
Used in conjunction with RSSIHighTimeout to determine whether a device becomes in-range.

Valid range is -127 to 20 (dBm), while 127 indicates unset.

### uint16 RSSILowTimeout [read-only, optional]
The time it takes to consider a device as out-of-range. If this many seconds elapses without receiving any signal at least as strong as RSSILowThreshold, a currently in-range device will be considered as out-of-range (lost). Valid range is 1 to 300 (seconds), while 0 indicates unset.

### uint16 RSSIHighTimeout [read-only, optional]
The time it takes to consider a device as in-range. If this many seconds elapses while we continuously receive signals at least as strong as RSSIHighThreshold, a currently out-of-range device will be considered as in-range (found).

Valid range is 1 to 300 (seconds), while 0 indicates unset.

### uint16 RSSISamplingPeriod [read-only, optional]
Grouping rules on how to propagate the received advertisement packets to the client.

Possible values:

0

All advertisement packets from in-range devices would be propagated.

255

Only the first advertisement packet of in-range devices would be propagated. If the device becomes lost, then the first packet when it is found again will also be propagated.

1 to 254

Advertisement packets would be grouped into 100ms * N time period. Packets in the same group will only be reported once, with the RSSI value being averaged out. Currently this is unimplemented in user space, so the value is only used to be forwarded to the kernel.

### array{(uint8, uint8, array{byte})} Patterns [read-only, optional]
If the Type property is set to "or_patterns", then this property must exist and have at least one entry in the array.

The structure of a pattern contains the following:

uint8 start_position

The index in an AD data field where the search should start. The beginning of an AD data field is index 0.

uint8 AD_data_type

See <https://www.bluetooth.com/specifications/assigned-numbers/> generic-access-profile/ for the possible allowed value.

array{byte} content_of_pattern

This is the value of the pattern. The maximum length of the bytes is 31.